Merge branch 'master' into master
commit
27aa185222
@ -1,339 +0,0 @@
|
|||||||
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.
|
|
@ -1,674 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. 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
|
|
||||||
them 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 prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. 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.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey 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;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If 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 convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU 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 that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
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.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
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
|
|
||||||
state 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 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General 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/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program 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, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU 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. But first, please read
|
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,175 @@
|
|||||||
|
/* This is the Atreus62 keyboard layout by Xyverz aka u/Zrevyx on r/mk
|
||||||
|
I've blatantly stolen what works for me from the Planck and Preonic
|
||||||
|
layouts and modified this file to fit me. Initial credet goes to
|
||||||
|
u/profet23 for the doing all the work and adding this keyboard to
|
||||||
|
QMK in the first place.
|
||||||
|
|
||||||
|
I've got Dvorak, Qwerty, and Colemak layouts at this time, with the
|
||||||
|
possibility of adding more in the future.
|
||||||
|
|
||||||
|
The bottom row is fairly Kinesis-ish since the Contour and Advantage
|
||||||
|
keyboards have been my daily drivers for the last 17 years. I hope
|
||||||
|
You can get some enjoyment out of this layout should you chose it!
|
||||||
|
|
||||||
|
CHANGELOG:
|
||||||
|
|
||||||
|
0.1 - Initial commit. Based off of Profet's default keymap.
|
||||||
|
0.2 - Converted to a more Planck/Preonic keymap style file with
|
||||||
|
persistent layers enabled. Renamed layers to reflect OLKB maps.
|
||||||
|
Added a TODO list.
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
|
||||||
|
* Make the layout more efficient, even if it means changing the RAISE
|
||||||
|
and LOWER functionality.
|
||||||
|
* Add legends in comments for each layer. Maybe.
|
||||||
|
* Add a gaming layer.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 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 "atreus62.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _DVORAK 0
|
||||||
|
#define _QWERTY 1
|
||||||
|
#define _COLEMAK 2
|
||||||
|
#define _WOW 3
|
||||||
|
#define _LOWER 4
|
||||||
|
#define _RAISE 5
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum atreus52_keycodes {
|
||||||
|
DVORAK = SAFE_RANGE,
|
||||||
|
QWERTY,
|
||||||
|
COLEMAK,
|
||||||
|
WOW,
|
||||||
|
LOWER,
|
||||||
|
RAISE
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_DVORAK] = { /* dvorak */
|
||||||
|
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
|
||||||
|
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
|
||||||
|
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS },
|
||||||
|
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
|
||||||
|
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL }
|
||||||
|
},
|
||||||
|
|
||||||
|
[_QWERTY] = { /* qwerty */
|
||||||
|
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
|
||||||
|
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL },
|
||||||
|
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
|
||||||
|
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
|
||||||
|
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL }
|
||||||
|
},
|
||||||
|
|
||||||
|
[_COLEMAK] = { /* colemak */
|
||||||
|
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
|
||||||
|
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL },
|
||||||
|
{ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT },
|
||||||
|
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
|
||||||
|
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_WOW] = { /* Dvorak with minor modifications for playing World of Warcraft */
|
||||||
|
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
|
||||||
|
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
|
||||||
|
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS },
|
||||||
|
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
|
||||||
|
{ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
|
||||||
|
},
|
||||||
|
|
||||||
|
[_LOWER] = {
|
||||||
|
{ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
|
||||||
|
{ KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______ },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______ },
|
||||||
|
{ _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ }
|
||||||
|
},
|
||||||
|
[_RAISE] = {
|
||||||
|
{ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
|
||||||
|
{ KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______ },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______ },
|
||||||
|
{ _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ }
|
||||||
|
},
|
||||||
|
[_ADJUST] = {
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||||
|
{ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||||
|
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case WOW:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_WOW);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
@ -0,0 +1,49 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# On command line:
|
||||||
|
#
|
||||||
|
# make all = Make software.
|
||||||
|
#
|
||||||
|
# make clean = Clean out built project files.
|
||||||
|
#
|
||||||
|
# make coff = Convert ELF to AVR COFF.
|
||||||
|
#
|
||||||
|
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||||
|
#
|
||||||
|
# make program = Download the hex file to the device.
|
||||||
|
# Please customize your programmer settings(PROGRAM_CMD)
|
||||||
|
#
|
||||||
|
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||||
|
# (must have teensy_loader_cli installed).
|
||||||
|
#
|
||||||
|
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||||
|
# have dfu-programmer installed).
|
||||||
|
#
|
||||||
|
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||||
|
# have Atmel FLIP installed).
|
||||||
|
#
|
||||||
|
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||||
|
# (must have dfu-programmer installed).
|
||||||
|
#
|
||||||
|
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||||
|
# (must have Atmel FLIP installed).
|
||||||
|
#
|
||||||
|
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||||
|
# with avr-gdb or avr-insight as the front end for debugging.
|
||||||
|
#
|
||||||
|
# make filename.s = Just compile filename.c into the assembler code only.
|
||||||
|
#
|
||||||
|
# make filename.i = Create a preprocessed source file for use in submitting
|
||||||
|
# bug reports to the GCC project.
|
||||||
|
#
|
||||||
|
# To rebuild project do "make clean" then "make all".
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the makefile.mk in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,111 @@
|
|||||||
|
// Xyverz' keymap.
|
||||||
|
// It's based on the default keymap, but Dvorak!
|
||||||
|
|
||||||
|
#include "clueboard.h"
|
||||||
|
|
||||||
|
// Used for SHIFT_ESC
|
||||||
|
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _RS 2
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,--------------------------------------------------------------------------. ,----.
|
||||||
|
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP|
|
||||||
|
* |--------------------------------------------------------------------------| |----|
|
||||||
|
* | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN|
|
||||||
|
* |--------------------------------------------------------------------------| `----'
|
||||||
|
* |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent|
|
||||||
|
* |-----------------------------------------------------------------------------.
|
||||||
|
* |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP|
|
||||||
|
* |------------------------------------------------------------------------|----|----.
|
||||||
|
* | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
|
||||||
|
* `----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = KEYMAP(
|
||||||
|
F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \
|
||||||
|
LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \
|
||||||
|
KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,--------------------------------------------------------------------------. ,----.
|
||||||
|
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
|
||||||
|
* |--------------------------------------------------------------------------| |----|
|
||||||
|
* | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
|
||||||
|
* |--------------------------------------------------------------------------| `----'
|
||||||
|
* | | | _RS| | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | |PGUP|
|
||||||
|
* |------------------------------------------------------------------------|----|----.
|
||||||
|
* | | | | | | | | | | _FL|HOME|PGDN| END|
|
||||||
|
* `----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = 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, BL_STEP, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END),
|
||||||
|
|
||||||
|
/* Keymap _RS: Reset layer
|
||||||
|
* ,--------------------------------------------------------------------------. ,----.
|
||||||
|
* | | | | | | | | | | | | | | | RGB| |VAL+|
|
||||||
|
* |--------------------------------------------------------------------------| |----|
|
||||||
|
* | | | | |RESET| | | | | | | | | | |VAL-|
|
||||||
|
* |--------------------------------------------------------------------------| `----'
|
||||||
|
* | | | _RS| | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | |SAT+|
|
||||||
|
* |------------------------------------------------------------------------|----|----.
|
||||||
|
* | | | | | | | | | | _FL|HUE-|SAT-|HUE+|
|
||||||
|
* `----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RS] = KEYMAP(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \
|
||||||
|
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, RGB_VAD, \
|
||||||
|
KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,223 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#define BASE 0 // default layer
|
||||||
|
#define SYMB 1 // symbols
|
||||||
|
#define MDIA 2 // media keys
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||||
|
EPRM,
|
||||||
|
VRSN,
|
||||||
|
RGB_SLD
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap 0: Basic layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | \ | 1 | 2 | 3 | 4 | 5 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | TT1 | | TT1 | Y | U | I | O | P | è |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Caps | A | S | D | F | G |------| |------| H | J | K | L | ò | à |
|
||||||
|
* |--------+------+------+------+------+------| Alt | | Alt |------+------+------+------+------+--------|
|
||||||
|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | ù |-/RShift|
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |</Win | + | - | * |//Ctr | |ì/RAlt| Left | Down | Up | Right | ~L1 |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Ins | LGui | | Win | Ctrl |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* |Backsp| Del |------| |------| Enter |Space |
|
||||||
|
* |ace | | End | | PgDn | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
|
// Otherwise, it needs KC_*
|
||||||
|
[BASE] = KEYMAP( // layer 0 : default
|
||||||
|
// left hand
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TT(SYMB),
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT,
|
||||||
|
MT(MOD_LGUI,KC_NONUS_BSLASH),KC_PPLS, KC_PMNS,KC_PAST,MT(MOD_LCTL,KC_PSLS),
|
||||||
|
KC_INS, KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC,KC_DEL, KC_END,
|
||||||
|
// right hand
|
||||||
|
TG(MDIA), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
TT(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LALT, KC_N, KC_M, KC_COMM,KC_DOT, KC_BSLASH, MT(MOD_RSFT,KC_SLSH),
|
||||||
|
MT(MOD_RALT,KC_EQL), KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,
|
||||||
|
KC_LGUI, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, KC_ENT, KC_SPC
|
||||||
|
),
|
||||||
|
/* Keymap 1: Symbol Layer
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | | F12 |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | [ | ] | & |------| |------| | 4 | 5 | 6 | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | ( | ) | | | | | | 1 | 2 | 3 | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | . | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | 0 |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
KC_TRNS, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, KC_TRNS,
|
||||||
|
KC_TRNS, RALT(KC_QUOT), KC_DLR, RALT(KC_LBRC), RALT(KC_RBRC), KC_CIRC,
|
||||||
|
KC_TRNS, KC_PERC, LSFT(KC_EQL), LSFT(KC_8), LSFT(KC_9), KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_TRNS, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
|
||||||
|
KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_0
|
||||||
|
),
|
||||||
|
/* Keymap 2: Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | Lclk | Rclk | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[MDIA] = KEYMAP(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
// right hand
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_WBAK
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
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) {
|
||||||
|
// dynamically generate these.
|
||||||
|
case EPRM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case VRSN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RGB_SLD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_mode(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
ergodox_board_led_off();
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
switch (layer) {
|
||||||
|
// TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
case 1:
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// none
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,72 @@
|
|||||||
|
# ErgoDox Italian layout
|
||||||
|
|
||||||
|
## Layer 0
|
||||||
|
```
|
||||||
|
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| \ | 1 | 2 | 3 | 4 | 5 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | E | R | T | TT1 | | TT1 | Y | U | I | O | P | è |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| Caps | A | S | D | F | G |------| |------| H | J | K | L | ò | à |
|
||||||
|
|--------+------+------+------+------+------| Alt | | Alt |------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B | | | | N | M | , | . | ù |-/RShift|
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
|</Win | + | - | * |//Ctr | |ì/RAlt| Left | Down | Up | Right | ~L1 |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| Ins | LGui | | Win | Ctrl |
|
||||||
|
,------|------|------| |------+--------+------.
|
||||||
|
| | | Home | | PgUp | | |
|
||||||
|
|Backsp| Del |------| |------| Enter |Space |
|
||||||
|
|ace | | End | | PgDn | | |
|
||||||
|
`--------------------' `----------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 1
|
||||||
|
```
|
||||||
|
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
|Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| | ! | @ | { | } | | | | | | | 7 | 8 | 9 | | F12 |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | # | $ | [ | ] | & |------| |------| | 4 | 5 | 6 | | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | % | ^ | ( | ) | | | | | | 1 | 2 | 3 | | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | | . | | | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | | |
|
||||||
|
| | |------| |------| | 0 |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer 2
|
||||||
|
```
|
||||||
|
|
||||||
|
,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
| | | | | | | | | | | | | | | |
|
||||||
|
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
| | | | MsUp | | | | | | Lclk | Rclk | | | | |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
| | | | | | | | | | | | Prev | Next | | |
|
||||||
|
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
| | | | | | |VolUp |VolDn | Mute | | |
|
||||||
|
`----------------------------------' `----------------------------------'
|
||||||
|
,-------------. ,-------------.
|
||||||
|
| | | | | |
|
||||||
|
,------|------|------| |------+------+------.
|
||||||
|
| | | | | | |Brwser|
|
||||||
|
| | |------| |------| |Back |
|
||||||
|
| | | | | | | |
|
||||||
|
`--------------------' `--------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,147 @@
|
|||||||
|
/*
|
||||||
|
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 Bathroom Epiphanies
|
||||||
|
#define PRODUCT frosty_flake
|
||||||
|
#define DESCRIPTION Frosty Flake controller for the CM Storm Quick Fire Rapid
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies
|
||||||
|
* Ported from the Bathroom Epiphanies TMK Firmware:
|
||||||
|
* https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic
|
||||||
|
#define MATRIX_COLS 18 // ColA - ColR in the schematic
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*/
|
||||||
|
#define UNUSED_PINS { B0, C4, D3 }
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,63 @@
|
|||||||
|
#include "frosty_flake.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
DDRB |= (1<<7);
|
||||||
|
DDRC |= (1<<5) | (1<<6);
|
||||||
|
|
||||||
|
print_dec(usb_led);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||||
|
PORTC &= ~(1<<5);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<5);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||||
|
PORTB &= ~(1<<7);
|
||||||
|
else
|
||||||
|
PORTB |= (1<<7);
|
||||||
|
|
||||||
|
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||||
|
PORTC &= ~(1<<6);
|
||||||
|
else
|
||||||
|
PORTC |= (1<<6);
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
#ifndef FROSTY_FLAKE_H
|
||||||
|
#define FROSTY_FLAKE_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
// The following is an example using the Planck MIT layout
|
||||||
|
// The first section contains all of the arguements
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
|
||||||
|
/*
|
||||||
|
Matrix col/row mapping
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
| J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
|
||||||
|
`----' `-------------------' `-------------------' `-------------------' `--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------. ,-------------------.
|
||||||
|
| J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
|
||||||
|
|-------------------------------------------------------------------------| |--------------| |-------------------|
|
||||||
|
| J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
|
||||||
|
|-------------------------------------------------------------------------| '--------------' |-------------- |
|
||||||
|
| O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
|
||||||
|
|-------------------------------------------------------------------------| ,----. |-------------------|
|
||||||
|
| N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------. |-------------- |
|
||||||
|
| A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
|
||||||
|
`-------------------------------------------------------------------------' `--------------' `-------------------'
|
||||||
|
*/
|
||||||
|
#define KEYMAP( \
|
||||||
|
KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
|
||||||
|
KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
|
||||||
|
KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
|
||||||
|
KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
|
||||||
|
KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
|
||||||
|
KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
/* Columns and rows need to be swapped in the below definition */ \
|
||||||
|
/* A B C D E F G H I J K L M N O P Q R */ \
|
||||||
|
/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \
|
||||||
|
/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \
|
||||||
|
/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \
|
||||||
|
/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \
|
||||||
|
/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
|
||||||
|
/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \
|
||||||
|
/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \
|
||||||
|
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,21 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,11 @@
|
|||||||
|
#include "frosty_flake.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = KEYMAP(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
# The default keymap for frosty_flake
|
@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Gabriel Young <gabeplaysdrums@live.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
#ifndef DEBOUNCING_DELAY
|
||||||
|
# define DEBOUNCING_DELAY 5
|
||||||
|
#endif
|
||||||
|
static uint8_t debouncing = DEBOUNCING_DELAY;
|
||||||
|
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static matrix_row_t scan_col(void) {
|
||||||
|
return (
|
||||||
|
(PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) |
|
||||||
|
(PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) |
|
||||||
|
(PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) |
|
||||||
|
(PINB&(1<<6) ? 0 : ((matrix_row_t)1<<3)) |
|
||||||
|
(PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) |
|
||||||
|
(PINB&(1<<2) ? 0 : ((matrix_row_t)1<<5)) |
|
||||||
|
(PINB&(1<<3) ? 0 : ((matrix_row_t)1<<6)) |
|
||||||
|
(PINB&(1<<0) ? 0 : ((matrix_row_t)1<<7))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void select_col(uint8_t col) {
|
||||||
|
switch (col) {
|
||||||
|
case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break;
|
||||||
|
case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break;
|
||||||
|
case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break;
|
||||||
|
case 3: PORTD = (PORTD & ~0b01111011) | 0b01111001; break;
|
||||||
|
case 4: PORTD = (PORTD & ~0b01111011) | 0b01100010; break;
|
||||||
|
case 5: PORTD = (PORTD & ~0b01111011) | 0b01110001; break;
|
||||||
|
case 6: PORTD = (PORTD & ~0b01111011) | 0b01100001; break;
|
||||||
|
case 7: PORTD = (PORTD & ~0b01111011) | 0b01110000; break;
|
||||||
|
case 8: PORTD = (PORTD & ~0b01111011) | 0b01100000; break;
|
||||||
|
case 9: PORTD = (PORTD & ~0b01111011) | 0b01101000; break;
|
||||||
|
case 10: PORTD = (PORTD & ~0b01111011) | 0b00101011; break;
|
||||||
|
case 11: PORTD = (PORTD & ~0b01111011) | 0b00110011; break;
|
||||||
|
case 12: PORTD = (PORTD & ~0b01111011) | 0b00100011; break;
|
||||||
|
case 13: PORTD = (PORTD & ~0b01111011) | 0b01111000; break;
|
||||||
|
case 14: PORTD = (PORTD & ~0b01111011) | 0b00010011; break;
|
||||||
|
case 15: PORTD = (PORTD & ~0b01111011) | 0b01101001; break;
|
||||||
|
case 16: PORTD = (PORTD & ~0b01111011) | 0b00001011; break;
|
||||||
|
case 17: PORTD = (PORTD & ~0b01111011) | 0b00111011; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void) {
|
||||||
|
/* Row output pins */
|
||||||
|
DDRD |= 0b01111011;
|
||||||
|
/* Column input pins */
|
||||||
|
DDRC &= ~0b10000000;
|
||||||
|
DDRB &= ~0b01111111;
|
||||||
|
PORTC |= 0b10000000;
|
||||||
|
PORTB |= 0b01111111;
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++)
|
||||||
|
matrix[i] = matrix_debouncing[i] = 0;
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void) {
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
select_col(col);
|
||||||
|
_delay_us(3);
|
||||||
|
matrix_row_t col_scan = scan_col();
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
|
||||||
|
bool curr_bit = col_scan & (1<<row);
|
||||||
|
if (prev_bit != curr_bit) {
|
||||||
|
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
|
||||||
|
debouncing = DEBOUNCING_DELAY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (debouncing) {
|
||||||
|
if (--debouncing)
|
||||||
|
_delay_ms(1);
|
||||||
|
else
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++)
|
||||||
|
matrix[i] = matrix_debouncing[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline matrix_row_t matrix_get_row(uint8_t row) {
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void) {
|
||||||
|
print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
matrix_row_t matrix_row = matrix_get_row(row);
|
||||||
|
xprintf("%02X: ", row);
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
bool curr_bit = matrix_row & (1<<col);
|
||||||
|
xprintf("%c", curr_bit ? '*' : '.');
|
||||||
|
}
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void) {
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++)
|
||||||
|
count += bitpop32(matrix[row]);
|
||||||
|
return count;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
frosty_flake keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
This is the firmware for Rev. 20140521 of the Frosty Flake controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Cooler Master Quick Fire Rapid](http://www.coolermaster.com/peripheral/keyboards/quickfirerapid/).
|
||||||
|
|
||||||
|
The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers), but has been cleaned up to match the [schematic](https://deskthority.net/wiki/File:Frosty_Flake_Schematics.pdf) and gone through some minor refactoring for QMK.
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme](/).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and navigate to the keyboards/frosty_flake folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
||||||
|
|
||||||
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
|
### Default
|
||||||
|
|
||||||
|
To build with the default keymap, simply run `make default`.
|
||||||
|
|
||||||
|
### Other Keymaps
|
||||||
|
|
||||||
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
||||||
|
|
||||||
|
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make [default|jack|<name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
@ -0,0 +1,71 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1287
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC += matrix.c
|
@ -0,0 +1,111 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# On command line:
|
||||||
|
#
|
||||||
|
# make all = Make software.
|
||||||
|
#
|
||||||
|
# make clean = Clean out built project files.
|
||||||
|
#
|
||||||
|
# make coff = Convert ELF to AVR COFF.
|
||||||
|
#
|
||||||
|
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||||
|
#
|
||||||
|
# make program = Download the hex file to the device.
|
||||||
|
# Please customize your programmer settings(PROGRAM_CMD)
|
||||||
|
#
|
||||||
|
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||||
|
# (must have teensy_loader_cli installed).
|
||||||
|
#
|
||||||
|
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||||
|
# have dfu-programmer installed).
|
||||||
|
#
|
||||||
|
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||||
|
# have Atmel FLIP installed).
|
||||||
|
#
|
||||||
|
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||||
|
# (must have dfu-programmer installed).
|
||||||
|
#
|
||||||
|
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||||
|
# (must have Atmel FLIP installed).
|
||||||
|
#
|
||||||
|
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||||
|
# with avr-gdb or avr-insight as the front end for debugging.
|
||||||
|
#
|
||||||
|
# make filename.s = Just compile filename.c into the assembler code only.
|
||||||
|
#
|
||||||
|
# make filename.i = Create a preprocessed source file for use in submitting
|
||||||
|
# bug reports to the GCC project.
|
||||||
|
#
|
||||||
|
# To rebuild project do "make clean" then "make all".
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# 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
|
||||||
|
KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||||
|
# MIDI_ENABLE ?= YES # MIDI controls
|
||||||
|
# UNICODE_ENABLE ?= YES # Unicode
|
||||||
|
# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE ?= no # Enable RGB Underglow
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,88 @@
|
|||||||
|
#include "gh60.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
|
||||||
|
#define _DEFAULT 0
|
||||||
|
#define _FN 1
|
||||||
|
|
||||||
|
int esc_led = 0;
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define ______ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty gui/alt/space/alt/gui
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* |LGUI | LAlt | Space | RAlt |RGUI |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \
|
||||||
|
______, KC_LGUI, KC_LALT, KC_SPC, ______, KC_RALT, KC_RGUI, ______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Led | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | Stop | |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FN] = KEYMAP_HHKB( /* Layer 1 */
|
||||||
|
F(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
||||||
|
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
|
||||||
|
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
|
||||||
|
______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
|
||||||
|
______, ______, ______, ______, ______, KC_MSTP, ______, ______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum function_id {
|
||||||
|
LED_TOGGLE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_FUNCTION(LED_TOGGLE)
|
||||||
|
};
|
||||||
|
|
||||||
|
void esc_led_toggle(void) {
|
||||||
|
if (esc_led == 0){
|
||||||
|
esc_led = 1;
|
||||||
|
gh60_esc_led_on();
|
||||||
|
} else {
|
||||||
|
esc_led = 0;
|
||||||
|
gh60_esc_led_off();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
switch (id) {
|
||||||
|
case LED_TOGGLE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
esc_led_toggle();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,149 @@
|
|||||||
|
#include "gh60.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 _QW 0
|
||||||
|
#define _DV 1
|
||||||
|
#define _CM 2
|
||||||
|
#define _FL 3
|
||||||
|
|
||||||
|
// Macro name shortcuts
|
||||||
|
#define QWERTY M(_QW)
|
||||||
|
#define DVORAK M(_DV)
|
||||||
|
#define COLEMAK M(_CM)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _QW: Qwerty Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QW] = { /* Layer 0: Qwerty */
|
||||||
|
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT },
|
||||||
|
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
|
||||||
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _DV: Dvorak Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| Backsp|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Fn | A| O| E| U| I| D| H| T| N| S| -| Return|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DV] = { /* Layer 1: Dvorak */
|
||||||
|
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC},
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS},
|
||||||
|
{MO(_FL), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT },
|
||||||
|
{KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, XXXXXXX, KC_RSFT},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
|
||||||
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _CM: Colemak Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Fn | A| R| S| T| D| H| N| E| I| O| '| Return|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_CM] = { /* Layer 2: Colemak */
|
||||||
|
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC},
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{MO(_FL), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT },
|
||||||
|
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT},
|
||||||
|
{KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
|
||||||
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _FL: Function Layer
|
||||||
|
* ,-----------------------------------------------------------.
|
||||||
|
* | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del|
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | | | | | | |PgU| Up|PgD|PSc|SLk|Pau| |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |CAPS | |Mut|VlD|VlU| |End| | | | | |
|
||||||
|
* |-----------------------------------------------------------|
|
||||||
|
* |_QW |_DV |_CM | | | | | |
|
||||||
|
* `-----------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = { /* Layer 3: Functions */
|
||||||
|
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL },
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______},
|
||||||
|
{_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, XXXXXXX, _______},
|
||||||
|
{KC_CAPS, XXXXXXX, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, XXXXXXX, _______},
|
||||||
|
{QWERTY, DVORAK, COLEMAK, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case _DV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_DV);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _QW:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QW);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _CM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_CM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,10 @@
|
|||||||
|
#include "atreus50.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// Turn status LED on
|
||||||
|
//DDRE |= (1<<6);
|
||||||
|
PORTE |= (1<<6);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef ATREUS50_H
|
||||||
|
#define ATREUS50_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// 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, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define COMPACT_KEYMAP( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
|
||||||
|
{ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
|
||||||
|
{ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
|
||||||
|
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
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 0xBB80
|
||||||
|
#define PRODUCT_ID 0x040D
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Hexwire
|
||||||
|
#define PRODUCT Atreus 50 Keyboard
|
||||||
|
#define DESCRIPTION Atreus layout with extra column
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 13
|
||||||
|
|
||||||
|
/* Planck PCB default pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { D3, D2, D1, D0 }
|
||||||
|
#define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN C6
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,6 @@
|
|||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,250 @@
|
|||||||
|
#include "atreus50.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _COLEMAK 1
|
||||||
|
#define _DVORAK 2
|
||||||
|
#define _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _MOVEMENT 5
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
MOVEMENT,
|
||||||
|
BACKLIT
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC
|
||||||
|
#define KC_X1 LOWER
|
||||||
|
#define KC_X2 RAISE
|
||||||
|
#define KC_X3 MO(_MOVEMENT)
|
||||||
|
#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = COMPACT_KEYMAP(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
|
||||||
|
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||||
|
GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||||
|
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_COLEMAK] = COMPACT_KEYMAP(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
|
||||||
|
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||||
|
GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||||
|
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_DVORAK] = COMPACT_KEYMAP(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
|
||||||
|
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||||
|
GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||||
|
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = COMPACT_KEYMAP(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
|
||||||
|
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
|
||||||
|
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = COMPACT_KEYMAP(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , ,
|
||||||
|
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
|
||||||
|
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MOVEMENT] = COMPACT_KEYMAP(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
|
||||||
|
//|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
|
||||||
|
, , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY
|
||||||
|
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* |------+------+------+------+------+------. ,------+------+------+------+------+------|
|
||||||
|
* | | Reset| | | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Musoff|Mus on| | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* `-------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = KEYMAP( \
|
||||||
|
_______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \
|
||||||
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||||
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_startup[][2] = {
|
||||||
|
{NOTE_B5, 20},
|
||||||
|
{NOTE_B6, 8},
|
||||||
|
{NOTE_DS6, 20},
|
||||||
|
{NOTE_B6, 8}
|
||||||
|
};
|
||||||
|
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
|
||||||
|
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
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) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,16 @@
|
|||||||
|
Handwired Atreus50
|
||||||
|
==================
|
||||||
|
|
||||||
|
This firmware is for a Handwired Atreus50 using an Arduino Pro Micro.
|
||||||
|
|
||||||
|
## Pinout
|
||||||
|
|
||||||
|
The following pins are used:
|
||||||
|
- Columns 1-13: D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4
|
||||||
|
- Rows 1-4: D3, D2, D1, D0
|
||||||
|
|
||||||
|
## Compiling and loading the firmware
|
||||||
|
|
||||||
|
To build the firmware, run `make`.
|
||||||
|
|
||||||
|
To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button.
|
@ -0,0 +1,81 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 ?= yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE ?= 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
|
||||||
|
|
||||||
|
avrdude: build
|
||||||
|
ls /dev/tty* > /tmp/1; \
|
||||||
|
echo "Reset your Pro Micro now"; \
|
||||||
|
while [[ -z $$USB ]]; do \
|
||||||
|
sleep 1; \
|
||||||
|
ls /dev/tty* > /tmp/2; \
|
||||||
|
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
|
||||||
|
done; \
|
||||||
|
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
|
||||||
|
|
||||||
|
.PHONY: avrdude
|
@ -0,0 +1,3 @@
|
|||||||
|
ifndef MAKEFILE_INCLUDED
|
||||||
|
include ../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,167 @@
|
|||||||
|
/*
|
||||||
|
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 fudanchii
|
||||||
|
#define PRODUCT kbod
|
||||||
|
#define DESCRIPTION Keyboard of Disapproval
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5, B6, B7, D6 }
|
||||||
|
#define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#undef TAPPING_TOGGLE
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,28 @@
|
|||||||
|
#include "kbod.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef KBOD_H
|
||||||
|
#define KBOD_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47 }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,21 @@
|
|||||||
|
# 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.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,104 @@
|
|||||||
|
#include "kbod.h"
|
||||||
|
|
||||||
|
#define _____ KC_TRNS
|
||||||
|
|
||||||
|
#define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn)))
|
||||||
|
|
||||||
|
#define SET_WHETHER(mask, btn1, btn2) \
|
||||||
|
if (record->event.pressed) { \
|
||||||
|
if (mask) { \
|
||||||
|
add_key(btn2); \
|
||||||
|
send_keyboard_report(); \
|
||||||
|
} else { \
|
||||||
|
add_key(btn1); \
|
||||||
|
send_keyboard_report(); \
|
||||||
|
} \
|
||||||
|
} else { \
|
||||||
|
if (mask) { \
|
||||||
|
del_key(btn2); \
|
||||||
|
send_keyboard_report(); \
|
||||||
|
} else { \
|
||||||
|
del_key(btn1); \
|
||||||
|
send_keyboard_report(); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
KEYMAP( /* Base */
|
||||||
|
F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT,
|
||||||
|
TT(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
|
||||||
|
),
|
||||||
|
KEYMAP( /* Cursor layer */
|
||||||
|
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
|
TT(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT,
|
||||||
|
TT(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____,
|
||||||
|
_____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP,
|
||||||
|
_____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
KEYMAP( /* Keypad layer */
|
||||||
|
TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC,
|
||||||
|
_____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____,
|
||||||
|
_____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____,
|
||||||
|
_____, _____, _____, _____, _____, _____, _____, KC_P0, KC_PDOT, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2,
|
||||||
|
_____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3
|
||||||
|
),
|
||||||
|
KEYMAP( /* Multimedia layer */
|
||||||
|
TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____,
|
||||||
|
_____, _____, KC_WAKE, _____, _____, _____, _____, _____, _____, _____, KC_MSTP, KC_MPRV, KC_MNXT, _____,
|
||||||
|
_____, _____, KC_SLEP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
|
||||||
|
_____, _____, KC_PWR, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2,
|
||||||
|
_____, _____, _____, KC_MPLY, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_FUNCTION(0),
|
||||||
|
[1] = ACTION_FUNCTION(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
static uint8_t shift_esc_mask;
|
||||||
|
static uint8_t alt_mask;
|
||||||
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
shift_esc_mask = MODS_PRESSED(SHIFT);
|
||||||
|
SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
alt_mask = MODS_PRESSED(ALT);
|
||||||
|
SET_WHETHER(alt_mask, KC_4, KC_F4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & _BV(USB_LED_CAPS_LOCK)) {
|
||||||
|
PORTB |= _BV(PB0);
|
||||||
|
} else {
|
||||||
|
PORTB &= ~_BV(PB0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
DDRB |= _BV(PB0);
|
||||||
|
DDRC |= _BV(PC7);
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
if (layer) {
|
||||||
|
PORTC |= _BV(PC7);
|
||||||
|
} else {
|
||||||
|
PORTC &= ~_BV(PC7);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
# The default keymap for kbod
|
||||||
|
|
||||||
|
This is the default keymap for kbod,
|
||||||
|
|
||||||
|
it consists of a base layer with QWERTY layout, a momentary cursor-layer, and mouse-keys and multimedia layers.
|
@ -0,0 +1,21 @@
|
|||||||
|
KBOD keyboard firmware
|
||||||
|
======================
|
||||||
|
|
||||||
|
KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It's utilize 8x8 matrix and has layout similar to GH-60
|
||||||
|
|
||||||
|
## Quantum MK Firmware
|
||||||
|
|
||||||
|
For the full Quantum feature list, see [the parent readme](/).
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Download or clone the whole firmware and use ```make handwired-kbod-default``` to generate the .hex file. You may flash it with avrdude
|
||||||
|
|
||||||
|
## Flashing
|
||||||
|
Something along this line:
|
||||||
|
|
||||||
|
```
|
||||||
|
avrdude -p m32u4 -c avr109 -P <COM PORT> -C <avrdude conf file> -e -u flash:w:handwired_kbod_default.hex
|
||||||
|
```
|
||||||
|
|
||||||
|
[More info](https://github.com/fudanchii/keyboard_of_disapproval)
|
@ -0,0 +1,68 @@
|
|||||||
|
# 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 yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
@ -0,0 +1,21 @@
|
|||||||
|
# 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 = 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 = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,302 @@
|
|||||||
|
#include "kinesis.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _DV 0 // Dvorak layer
|
||||||
|
#define _QW 1 // Qwerty layer
|
||||||
|
#define _CM 2 // Colemak layer
|
||||||
|
#define _MD 3 // Media Layer
|
||||||
|
#define _KP 4 // Keypad Layer
|
||||||
|
|
||||||
|
// Macro name shortcuts
|
||||||
|
#define DVORAK M(_DV)
|
||||||
|
#define QWERTY M(_QW)
|
||||||
|
#define COLEMAK M(_CM)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Function Keys on All Layers (Keypad toggles):
|
||||||
|
,-----------------------------------------------------------------.
|
||||||
|
| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 |
|
||||||
|
`-----------------------------------------------------------------'
|
||||||
|
,-----------------------------------------------------------------.
|
||||||
|
| F9 | F10 | F11 | F12 | PScr | SLck | Paus | Keypad | RESET |
|
||||||
|
`-----------------------------------------------------------------'
|
||||||
|
|
||||||
|
Dvorak layer:
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| ] | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | [ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Tab | ' | , | . | P | Y || F | G | C | R | L | \ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| CapsLk | A | O | E | U | I || D | H | T | N | S | - |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | X || B | M | W | V | Z | RShift |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| ` | INS | Left | Rght | | Up | Dn | / | = |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,--------------.,--------------.
|
||||||
|
| LCtl | LAlt || RGUI | RCtl |
|
||||||
|
,------|-------|------||------+-------+-------.
|
||||||
|
| | Del | Home || PgUp | Enter | |
|
||||||
|
| BkSp | / |------||------| / | Space |
|
||||||
|
| | Media | End || PgDn | KeyPd | |
|
||||||
|
`---------------------'`----------------------'
|
||||||
|
|
||||||
|
QWERTY layer:
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | E | R | T || Y | U | I | O | P | \ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| CapsLk | A | S | D | F | G || H | J | K | L | ; | ' |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B || N | M | , | . | / | RShift |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| ` | INS | Left | Rght | | Up | Dn | [ | ] |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,--------------.,--------------.
|
||||||
|
| LCtl | LAlt || RGUI | RCtl |
|
||||||
|
,------|-------|------||------+-------+-------.
|
||||||
|
| | Del | Home || PgUp | Enter | |
|
||||||
|
| BkSp | / |------||------| / | Space |
|
||||||
|
| | Media | End || PgDn | KeyPd | |
|
||||||
|
`---------------------'`----------------------'
|
||||||
|
|
||||||
|
Colemak layer:
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | F | P | G || J | L | U | Y | ; | \ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| BkSpc | A | R | S | T | D || H | N | E | I | O | ' |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B || K | M | , | . | / | RShift |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| ` | INS | Left | Rght | | Up | Dn | [ | ] |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,--------------.,--------------.
|
||||||
|
| LCtl | LAlt || RGUI | RCtl |
|
||||||
|
,------|-------|------||------+-------+-------.
|
||||||
|
| | Del | Home || PgUp | Enter | |
|
||||||
|
| BkSp | / |------||------| / | Space |
|
||||||
|
| | Media | End || PgDn | KeyPd | |
|
||||||
|
`---------------------'`----------------------'
|
||||||
|
|
||||||
|
Media layer:
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || | | | | | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || | Mute | Vol- | Vol+ | | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || Stop | Prev | Play | Next | Sel | |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| | || | |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | || | | |
|
||||||
|
| | |------||------| | |
|
||||||
|
| | | || | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
|
||||||
|
Keypad layer:
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| Power | | | | | || | NmLk | KP = | KP / | KP * | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Sleep | | | | | || | KP 7 | KP 8 | KP 9 | KP - | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Wake | |QWERTY|Colemk|Dvorak| || | KP 4 | KP 5 | KP 6 | KP + | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | KP . |KP Ent| |
|
||||||
|
`---------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| | || | |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | || | | |
|
||||||
|
| | |------||------| | KP 0 |
|
||||||
|
| | | || | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_DV] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
|
||||||
|
KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y,
|
||||||
|
KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X,
|
||||||
|
KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
|
// Left Thumb
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC, LT(_MD, KC_DEL), KC_END,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), RESET,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC,
|
||||||
|
KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
|
||||||
|
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||||
|
KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, KC_SLSH, KC_EQL,
|
||||||
|
// Right Thumb
|
||||||
|
KC_RGUI, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, LT(_KP, KC_ENT), KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
[_QW] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||||
|
KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
|
// Left Thumb
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC, LT(_MD, KC_DEL), KC_END,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), RESET,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||||
|
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL ,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC,
|
||||||
|
// Right Thumb
|
||||||
|
KC_RGUI, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, LT(_KP, KC_ENT), KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
[_CM] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G,
|
||||||
|
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||||
|
KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
|
||||||
|
// Left Thumb
|
||||||
|
KC_LCTL, KC_LALT,
|
||||||
|
KC_HOME,
|
||||||
|
KC_BSPC, LT(_MD, KC_DEL), KC_END,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), RESET,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL,
|
||||||
|
KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC,
|
||||||
|
// Right Thumb
|
||||||
|
KC_RGUI, KC_RCTL,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN, LT(_KP, KC_ENT), KC_SPC
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MD] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
// Left Thumb
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
|
||||||
|
KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
// Right Thumb
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_KP] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_PWR, _______, _______, _______, _______, _______,
|
||||||
|
KC_SLEP, _______, _______, _______, _______, _______,
|
||||||
|
KC_WAKE, _______, QWERTY, COLEMAK, DVORAK, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
// Left Thumb
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
|
||||||
|
// Right Hand */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______,
|
||||||
|
_______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______,
|
||||||
|
_______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
|
||||||
|
_______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
|
||||||
|
_______, _______, KC_PDOT, KC_PENT,
|
||||||
|
// Right Thumb
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, KC_P0
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case _DV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_DV);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _QW:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QW);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _CM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_CM);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,128 @@
|
|||||||
|
# Xyverz's Kinesis Keymap
|
||||||
|
|
||||||
|
## About this keymap:
|
||||||
|
|
||||||
|
The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my QMK Kinesis.
|
||||||
|
|
||||||
|
The QWERTY layout shown here is based entirely on the Kinesis Advantage layout. The Colemak layout is merely an adaptation of that.
|
||||||
|
|
||||||
|
I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
|
||||||
|
|
||||||
|
## Still to do:
|
||||||
|
|
||||||
|
* Implement the CapsLock, NumLock, and ScrLck LEDs on the off-chance that I decide to actually solder some to the keyboard.
|
||||||
|
|
||||||
|
### Function Keys on All Layers (keypad toggles):
|
||||||
|
,-----------------------------------------------------------------.
|
||||||
|
| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 |
|
||||||
|
`-----------------------------------------------------------------'
|
||||||
|
,-----------------------------------------------------------------.
|
||||||
|
| F9 | F10 | F11 | F12 | PScr | SLck | Paus | Keypad | Reset |
|
||||||
|
`-----------------------------------------------------------------'
|
||||||
|
|
||||||
|
### Layer 0: Dvorak layer
|
||||||
|
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| ] | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | [ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Tab | ' | , | . | P | Y || F | G | C | R | L | \ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| CapsLk | A | O | E | U | I || D | H | T | N | S | - |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | X || B | M | W | V | Z | RShift |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| ` | Ins | Left | Rght | | Up | Dn | / | = |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,--------------.,--------------.
|
||||||
|
| LCtl | LAlt || RGUI | RCtl |
|
||||||
|
,------|-------|------||------+-------+-------.
|
||||||
|
| | Del | Home || PgUp | Enter | |
|
||||||
|
| BkSp | / |------||------| / | Space |
|
||||||
|
| | Media | End || PgDn | KeyPd | |
|
||||||
|
`---------------------'`----------------------'
|
||||||
|
|
||||||
|
### Layer 1: QWERTY layer
|
||||||
|
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | E | R | T || Y | U | I | O | P | \ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| CapsLk | A | S | D | F | G || H | J | K | L | ; | ' |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B || N | M | , | . | / | RShift |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| ` | Ins | Left | Rght | | Up | Dn | [ | ] |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,--------------.,--------------.
|
||||||
|
| LCtl | LAlt || RGUI | RCtl |
|
||||||
|
,------|-------|------||------+-------+-------.
|
||||||
|
| | Del | Home || PgUp | Enter | |
|
||||||
|
| BkSp | / |------||------| / | Space |
|
||||||
|
| | Media | End || PgDn | KeyPd | |
|
||||||
|
`---------------------'`----------------------'
|
||||||
|
|
||||||
|
### Keymap 2: Colemak layer
|
||||||
|
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Tab | Q | W | F | P | G || J | L | U | Y | ; | \ |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| BkSpc | A | R | S | T | D || H | N | E | I | O | ' |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| LShift | Z | X | C | V | B || K | M | , | . | / | RShift |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| ` | Ins | Left | Rght | | Up | Dn | [ | ] |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,--------------.,--------------.
|
||||||
|
| LCtl | LAlt || RGUI | RCtl |
|
||||||
|
,------|-------|------||------+-------+-------.
|
||||||
|
| | Del | Home || PgUp | Enter | |
|
||||||
|
| BkSp | / |------||------| / | Space |
|
||||||
|
| | Media | End || PgDn | KeyPd | |
|
||||||
|
`---------------------'`----------------------'
|
||||||
|
|
||||||
|
### layer 3 : Media layer
|
||||||
|
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || | | | | | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || | Mute | Vol- | Vol+ | | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || Stop | Prev | Play | Next | Sel | |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | | |
|
||||||
|
`---------------------------' `---------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| | || | |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | || | | |
|
||||||
|
| | |------||------| | |
|
||||||
|
| | | || | | |
|
||||||
|
`--------------------'`--------------------'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Keymap 4: Keypad layer
|
||||||
|
|
||||||
|
,-------------------------------------------.,-------------------------------------------.
|
||||||
|
| Power | | | | | || | NmLk | KP = | KP / | KP * | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Sleep | | | | | || | KP 7 | KP 8 | KP 9 | KP - | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| Wake | |QWERTY|Colemk|Dvorak| || | KP 4 | KP 5 | KP 6 | KP + | |
|
||||||
|
|--------+------+------+------+------+------||------+------+------+------+------+--------|
|
||||||
|
| | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| |
|
||||||
|
`--------+------+------+------+------+------'`------+------+------+------+------+--------'
|
||||||
|
| | | | | | | | KP . |KP Ent| |
|
||||||
|
`---------------------------' `----------------------------------'
|
||||||
|
,-------------.,-------------.
|
||||||
|
| | || | |
|
||||||
|
,------|------|------||------+------+------.
|
||||||
|
| | | || | | |
|
||||||
|
| | |------||------| | KP 0 |
|
||||||
|
| | | || | | |
|
||||||
|
`--------------------'`--------------------'
|
@ -1 +1,5 @@
|
|||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
#ifndef COMPACT_KEYMAP_H
|
|
||||||
#define COMPACT_KEYMAP_H
|
|
||||||
|
|
||||||
#define COMPACT_KEYMAP( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
|
|
||||||
k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
|
|
||||||
k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \
|
|
||||||
{ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \
|
|
||||||
{ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \
|
|
||||||
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \
|
|
||||||
{ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \
|
|
||||||
{ KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \
|
|
||||||
{ KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \
|
|
||||||
{ KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
#endif
|
|
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#ifdef SUBPROJECT_rev1
|
||||||
|
#include "../../rev1/config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev2
|
||||||
|
#include "../../rev2/config.h"
|
||||||
|
/* RGB Underglow */
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 8
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev2fliphalf
|
||||||
|
#include "../../rev2fliphalf/config.h"
|
||||||
|
#endif
|
@ -0,0 +1,191 @@
|
|||||||
|
#include "lets_split.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 _COLEMAK 1
|
||||||
|
#define _DVORAK 2
|
||||||
|
#define _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = KEYMAP ( \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\
|
||||||
|
KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = KEYMAP ( \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||||
|
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | " | , | . | P | Y | F | G | C | R | L | / |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | D | H | T | N | S | - |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = KEYMAP ( \
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \
|
||||||
|
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = KEYMAP ( \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||||
|
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \
|
||||||
|
_______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = KEYMAP ( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||||
|
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, \
|
||||||
|
_______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = KEYMAP ( \
|
||||||
|
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \
|
||||||
|
_______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef SSD1306_H
|
||||||
|
#define SSD1306_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
bool iota_gfx_init(void);
|
||||||
|
void iota_gfx_task(void);
|
||||||
|
bool iota_gfx_off(void);
|
||||||
|
bool iota_gfx_on(void);
|
||||||
|
void iota_gfx_flush(void);
|
||||||
|
void iota_gfx_write_char(uint8_t c);
|
||||||
|
void iota_gfx_write(const char *data);
|
||||||
|
void iota_gfx_write_P(const char *data);
|
||||||
|
void iota_gfx_clear_screen(void);
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,4 @@
|
|||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
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 MANUFACTURER Ortholinear Keyboards
|
||||||
|
#define PRODUCT The Planck Keyboard
|
||||||
|
#define DESCRIPTION A compact ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* Planck PCB default pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
|
||||||
|
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define AUDIO_VOICES
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* Tap Dance */
|
||||||
|
#define TAPPING_TERM 150
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#ifdef SUBPROJECT_rev3
|
||||||
|
#include "rev3/config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev4
|
||||||
|
#include "rev4/config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,336 @@
|
|||||||
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
// this is the style you want to emulate.
|
||||||
|
|
||||||
|
#include "planck.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
#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 _COLEMAK 1
|
||||||
|
#define _DVORAK 2
|
||||||
|
#define _LOWER 3
|
||||||
|
#define _RAISE 4
|
||||||
|
#define _PLOVER 5
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
PLOVER,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT,
|
||||||
|
EXT_PLV
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// Tap Dance Declarations
|
||||||
|
enum {
|
||||||
|
ESC_CAP = 0,
|
||||||
|
LFT_HOM,
|
||||||
|
DWN_PDN,
|
||||||
|
UPP_PUP,
|
||||||
|
RGT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
// Dylan's additions
|
||||||
|
#define C_A_DEL LALT(LCTL(KC_DEL))
|
||||||
|
#define C_A_INS LALT(LCTL(KC_INS))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
|
||||||
|
{TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = {
|
||||||
|
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||||
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = {
|
||||||
|
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||||
|
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||||
|
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||||
|
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | END | HOME |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = {
|
||||||
|
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||||
|
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_END, KC_HOME, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PG DN |PG UP |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = {
|
||||||
|
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
|
||||||
|
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||||
|
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Plover layer (http://opensteno.org)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Exit | | | A | O | | E | U | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_PLOVER] = {
|
||||||
|
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||||
|
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||||
|
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||||
|
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = {
|
||||||
|
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
|
||||||
|
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||||
|
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_INS, C_A_DEL}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[ESC_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
|
||||||
|
[LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME),
|
||||||
|
[DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN),
|
||||||
|
[UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP),
|
||||||
|
[RGT_END] = ACTION_TAP_DANCE_DOUBLE(KC_RGHT, KC_END)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
float tone_startup[][2] = SONG(SONIC_RING); //plug in
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
float music_scale[][2] = SONG(ZELDA_PUZZLE); //music mode
|
||||||
|
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
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) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||||
|
#endif
|
||||||
|
persistant_default_layer_set(1UL<<_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EXT_PLV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
startup_user();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
|
||||||
|
void startup_user()
|
||||||
|
{
|
||||||
|
_delay_ms(20); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user()
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void)
|
||||||
|
{
|
||||||
|
music_scale_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_scale_user(void)
|
||||||
|
{
|
||||||
|
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,6 @@
|
|||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
# Zach Planck Makefile
|
||||||
|
# Max .hex size is about 28636 bytes
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
TAP_DANCE_ENABLE = yes # Enable TapDance functionality
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
USB_6KRO_ENABLE = no # 6key Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
#VARIABLE_TRACE = no # Debug changes to variable values
|
||||||
|
UNICODE_ENABLE = no # Unicode (can't be used with unicodemap)
|
||||||
|
UNICODEMAP_ENABLE = yes # Enable extended 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
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
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 MANUFACTURER Ortholinear Keyboards
|
||||||
|
#define PRODUCT The Planck Keyboard
|
||||||
|
#define DESCRIPTION A compact ortholinear keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* Planck PCB default pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
|
||||||
|
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
//#define BACKLIGHT_BREATHING // LED breathing
|
||||||
|
/* number of backlight levels */
|
||||||
|
#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
|
||||||
|
#undef LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
//#define LOCKING_RESYNC_ENABLE
|
||||||
|
#undef LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
#undef NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality
|
||||||
|
//#define SPACE_CADET // Parenthesis on L/R shift
|
||||||
|
|
||||||
|
#ifdef SUBPROJECT_rev3
|
||||||
|
#include "rev3/config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev4
|
||||||
|
#include "rev4/config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,48 @@
|
|||||||
|
// Zach Nielsen Custom Planck Keyboard layout
|
||||||
|
#include "planck.h"
|
||||||
|
#define PLANCK_YES // This is the Planck
|
||||||
|
#include "zach_common_functions.c"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_COLEMAK] = { /* Base Layer */
|
||||||
|
{KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC},
|
||||||
|
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT},
|
||||||
|
{SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
|
||||||
|
{CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_SWCOLE] = { /* Software Colemak */
|
||||||
|
{_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______},
|
||||||
|
{_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______},
|
||||||
|
{_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_RAISE] = { /* RAISE - Numpad and Unicode symbols */
|
||||||
|
{KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______},
|
||||||
|
{KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR},
|
||||||
|
{_______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS},
|
||||||
|
{_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */
|
||||||
|
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL},
|
||||||
|
{KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP},
|
||||||
|
{CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN},
|
||||||
|
{_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */
|
||||||
|
{UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX},
|
||||||
|
{UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX},
|
||||||
|
{_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX},
|
||||||
|
{_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||||
|
},
|
||||||
|
|
||||||
|
[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */
|
||||||
|
{_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______},
|
||||||
|
{KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______},
|
||||||
|
{XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX},
|
||||||
|
{_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______}
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,23 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. 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
|
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// Number of backlight levels
|
||||||
|
#undef BACKLIGHT_LEVELS
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#undef RGB_DI_PIN
|
||||||
|
#define RGB_DI_PIN B3
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 11 // Number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -1 +0,0 @@
|
|||||||
AUDIO_ENABLE = yes
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue