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
|
||||
|
||||
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
|
@ -0,0 +1,29 @@
|
||||
# Zach Preonic 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 = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
#VARIABLE_TRACE = no # Debug changes to variable values
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
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,95 @@
|
||||
/*
|
||||
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 0x6061
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Ortholinear Keyboards
|
||||
#define PRODUCT The Preonic Keyboard
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/* Planck PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 }
|
||||
#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
|
||||
/* 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)) \
|
||||
)
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
//#define RGB_DI_PIN D1
|
||||
//#define RGBLIGHT_TIMER
|
||||
//#define RGBLED_NUM 28 // Number of LEDs
|
||||
//#define RGBLIGHT_HUE_STEP 10
|
||||
//#define RGBLIGHT_SAT_STEP 17
|
||||
//#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* 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
|
||||
//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality
|
||||
//#define SPACE_CADET // Parenthesis on L/R shift
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,54 @@
|
||||
// Zach Nielsen Custom Preonic Keyboard layout
|
||||
#include "preonic.h"
|
||||
#define PREONIC_YES // This is the Preonic
|
||||
#include "zach_common_functions.c"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_COLEMAK] = { /* Base Layer */
|
||||
{KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_ENT},
|
||||
{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_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______},
|
||||
{KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, XXXXXXX, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR},
|
||||
{_______, KC_COLN, TFLIP, LAROW, RAROW, XXXXXXX, 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_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, RANDIG, RANDIG, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_TOG, MU_TOG},
|
||||
{UNILIN, SUPA2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX},
|
||||
{XXXXXXX, DEGREE, IBANG, LAROW, RAROW, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, BL_INC},
|
||||
{_______, CADKEY, MICRO, WOMEGA, OMEGA, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, BL_DEC},
|
||||
{_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, MUV_DE, MUV_IN, BL_TOGG}
|
||||
},
|
||||
|
||||
[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */
|
||||
{_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
|
||||
{_______, 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,24 @@
|
||||
# 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
|
||||
SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping.
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X(<unicode>) in your keymap.
|
||||
UNICODE_ENABLE =no # Unicode
|
||||
UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows).
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = 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
|
||||
API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -0,0 +1,96 @@
|
||||
/*
|
||||
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_ADMSTROK
|
||||
#define CONFIG_H_ADMSTROK
|
||||
|
||||
#include "config_common.h"
|
||||
#include "../../config.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0003
|
||||
#define MANUFACTURER SATAN
|
||||
#define PRODUCT GH60
|
||||
#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* Backlight configuration */
|
||||
#define BACKLIGHT_LEVELS 4
|
||||
|
||||
/* Underlight configuration */
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 8 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
#define DISABLE_SPACE_CADET_ROLLOVER
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 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,195 @@
|
||||
#include "satan.h"
|
||||
|
||||
static uint16_t key_timer;
|
||||
|
||||
bool checktime(void){
|
||||
return (timer_elapsed(key_timer) < 150) ? true : false;
|
||||
};
|
||||
|
||||
// general keydefs
|
||||
#define norm 0 // Default layer
|
||||
#define elev 1 // Layer directional keys
|
||||
#define supr 2 // F-keys and mediakeys
|
||||
#define spac 3 //
|
||||
#define FNO1 4 //
|
||||
#define FNO2 5 //
|
||||
#define FNO3 6 //
|
||||
#define MAC0 M(0) //
|
||||
#define MAC1 M(1) //
|
||||
#define MAC2 M(2) //
|
||||
#define MAC3 M(3) //
|
||||
#define MAC4 M(4) //
|
||||
#define MAC5 M(5) //
|
||||
#define MAC6 M(6) //
|
||||
#define MAC7 M(7) //
|
||||
#define MAC8 M(8) //
|
||||
#define MAC9 M(9) //
|
||||
#define GRAV KC_GRV //
|
||||
#define MEDI F(FNO1)//
|
||||
|
||||
// General shortenings
|
||||
#define ESCA KC_ESC
|
||||
#define MINS KC_MINS
|
||||
#define EQUL KC_EQL
|
||||
#define BSPC KC_BSPC
|
||||
#define DELE KC_DEL
|
||||
#define LBRC KC_LBRC
|
||||
#define RBRC KC_RBRC
|
||||
#define ALTR KC_RALT
|
||||
#define SCLN KC_SCLN
|
||||
#define QUOT KC_QUOT
|
||||
#define NUHS KC_NUHS
|
||||
#define ENTE KC_ENT
|
||||
#define NUBS KC_NUBS // Less/ greater sign
|
||||
#define COMM KC_COMM // Comma
|
||||
#define FSTO KC_DOT // Full stop
|
||||
#define SLSH KC_SLSH
|
||||
#define ALTL KC_LALT
|
||||
#define GUIL KC_LGUI
|
||||
#define GUIR KC_RGUI
|
||||
#define MENO KC_MENU
|
||||
// The F-row/layer:
|
||||
#define FK01 KC_F1
|
||||
#define FK02 KC_F2
|
||||
#define FK03 KC_F3
|
||||
#define FK04 KC_F4
|
||||
#define FK05 KC_F5
|
||||
#define FK06 KC_F6
|
||||
#define FK07 KC_F7
|
||||
#define FK08 KC_F8
|
||||
#define FK09 KC_F9
|
||||
#define FK10 KC_F10
|
||||
#define FK11 KC_F11
|
||||
#define FK12 KC_F12
|
||||
#define FK13 KC_F13
|
||||
#define FK14 KC_F14
|
||||
// Special Actions and Media Keys
|
||||
#define INSE KC_INS // Insert here
|
||||
#define HOME KC_HOME // Go to beginning of line
|
||||
#define ENDI KC_END // go to end of line
|
||||
#define PSCR KC_PSCR // Print Screen
|
||||
#define SLCK KC_SLCK // go to end of line
|
||||
#define PGDN KC_PGDN // go to end of line
|
||||
#define PGUP KC_PGUP // go to end of line
|
||||
#define PLPS KC_MPLY // Play/Pause
|
||||
#define PAUS KC_PAUS // Pause button
|
||||
#define MUTE KC_MUTE // Mute sound
|
||||
#define VOLU KC_VOLU // Volume increase
|
||||
#define VOLD KC_VOLD // Volume decrease
|
||||
#define MNXT KC_MNXT // next track
|
||||
#define MPRV KC_MPRV // prev track
|
||||
#define MSTP KC_MSTP // stop playing
|
||||
#define MSEL KC_MSEL // Select media (Start playing it)
|
||||
#define MAIL KC_MAIL // Open default mail app
|
||||
#define CALC KC_CALC // Open default calculator app
|
||||
#define MYCM KC_MYCM // Open default file manager
|
||||
//#define LILO KC_XXXXXX // Reserved for later
|
||||
//#define LIHI KC_XXXXXX // Reserved for later
|
||||
|
||||
|
||||
// dual-role shortcuts
|
||||
#define DUTB LT(elev, KC_TAB) // `tabs` layer on hold and tab on tap
|
||||
#define DUSP LT(spac, KC_SPACE) // `spce` layer on hold and space on tap
|
||||
#define LOCK LGUI(KC_L) // lock computer (win)
|
||||
|
||||
// Space Admiral Strokers
|
||||
#define SADL MAC0 // Hold for lshift and { on tap
|
||||
#define SADR MAC1 // Hold for rshift and } on tap
|
||||
#define CADL MAC2 // Hold for lctrl and [ on tap
|
||||
#define CADR MAC3 // Hold for rctrl and ] on tap
|
||||
|
||||
// arrow cluster duality bottom right corner
|
||||
#define ARLF ALT_T(KC_LEFT) // Left arrow
|
||||
#define ARRT CTL_T(KC_RIGHT)// Right arrow
|
||||
#define ARUP SFT_T(KC_UP) // Up arrow
|
||||
#define ARDN GUI_T(KC_DOWN) // Down arrow
|
||||
|
||||
// brackets
|
||||
#define NOCL RALT(KC_7) // [
|
||||
#define NOCR RALT(KC_0) // ]
|
||||
#define NOPL LSFT(KC_8) // (
|
||||
#define NOPR LSFT(KC_9) // )
|
||||
#define NOAL KC_NUBS // <
|
||||
#define NOAR LSFT(KC_NUBS) // >
|
||||
#define NOBL RALT(KC_8) // [
|
||||
#define NOBR RALT(KC_9) // ]
|
||||
|
||||
// increase readability
|
||||
#define XXXX KC_TRNS
|
||||
#define DEAD KC_NO
|
||||
#define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[ norm ] = KEYMAP( // Normal scandinavian mapping (danish has QUOT and SCLN wapped)
|
||||
GRAV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MINS, EQUL, BSPC, DELE,\
|
||||
DUTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, DEAD,\
|
||||
ALTR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLN, QUOT, NUHS, ENTE,\
|
||||
SADL, NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, COMM, FSTO, SLSH, SADR, DEAD,\
|
||||
CADL, ALTL, GUIL, DUSP, GUIR, MEDI, MENO, CADR),
|
||||
|
||||
[ elev ] = KEYMAP( // The f-Row (with f13-14), Special keys and media keys
|
||||
LOCK, FK01, FK02, FK03, FK04, FK05, FK06, FK07, FK08, FK09, FK10, FK11, FK12, FK13, FK14,\
|
||||
XXXX, XXXX, XXXX, XXXX, MAIL, XXXX, XXXX, HOME, INSE, PSCR, SLCK, PAUS, PGUP, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, MYCM, XXXX, XXXX, MPRV, PAUS, MNXT, XXXX, XXXX, PGDN, ENDI,\
|
||||
XXXX, XXXX, XXXX, XXXX, CALC, XXXX, XXXX, XXXX, MUTE, VOLD, VOLU, XXXX, ARUP, DEAD,\
|
||||
XXXX, XXXX, XXXX, PLPS, XXXX, ARLF, ARDN, ARRT),
|
||||
|
||||
[ spac ] = KEYMAP( // The space controls (by pressing space)
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX),
|
||||
|
||||
[ supr ] = KEYMAP( // Additional layer for later use.
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX),
|
||||
};
|
||||
|
||||
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: //MAC0 - Hold for lshift and { on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(LSFT), END );
|
||||
} else {
|
||||
return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END);
|
||||
}; break;
|
||||
case 1: //MAC1 - Hold for rshift and } on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(RSFT), END );
|
||||
} else {
|
||||
return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END);
|
||||
}; break;
|
||||
case 2: //MAC2 - Hold for lctrl and [ on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(LCTL), END );
|
||||
} else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END);
|
||||
}; break;
|
||||
case 3: //MAC3 - Hold for rctrl and ] on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(RCTL), END );
|
||||
} else {
|
||||
return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END);
|
||||
}; break;
|
||||
case 4: //MAC4 reserved for later.
|
||||
if (record->event.pressed) { } else { }; break;
|
||||
case 5: //MAC5 reserved for later.
|
||||
if (record->event.pressed) { } else { }; break;
|
||||
case 6: //MAC6 reserved for later.
|
||||
if (record->event.pressed) { } else { }; break;
|
||||
} return MACRO_NONE;
|
||||
};
|
||||
/*
|
||||
Later use:
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { }
|
||||
enum function_id { };
|
||||
const uint16_t PROGMEM fn_actions[] = { };
|
||||
|
||||
*/
|
@ -0,0 +1,13 @@
|
||||
# Admiral Strokers keymap
|
||||
## For the Satan GH60 PCB
|
||||
The Admiral STN60 is a layout for users of the satan GH60, optimized with some nice features such as mod tap for brackets (Similar to Space Cadett), space mod for F-row/ layer with easy to access media and control keys. The layout below is just as an example and is ISO based, ANSI and JIS layouts will be included later.
|
||||
|
||||
``````
|
||||
[ _tmp ] = KEYMAP( // Copy this to get started. SCAN is scandinavian layout specific.
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
|
||||
XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, SCAN, XXXX,\
|
||||
XXXX, SCAN, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
|
||||
XXXX, XXXX, XXXX, XXXX, SCAN, XXXX, XXXX, XXXX, XXXX),\
|
||||
|
||||
```
|
@ -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 = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = yes # MIDI support (+2400 to 4200, depending on config)
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
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,77 @@
|
||||
#include "satan.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BL 0
|
||||
#define _ML 1
|
||||
|
||||
// readability
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
|
||||
* |-----------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Gui |Alt | Space |Alt |Gui |Midi|Ctrl |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP_ANSI(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
|
||||
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL),
|
||||
|
||||
#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
|
||||
/* Keymap _ML: MIDI Layer (Advanced)
|
||||
* ,------------------------------------------------------------------------.
|
||||
* | Exit | | | | | | | | | | | | | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | Ch+ | | C# | D# | | F# | G# | A# | | C# | D# | | | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | Mod | C | D | E | F | G | A | B | C | D | E | F | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | Sustain |Oct-|Oct+|Mod-|Mod+| | | |Tns-|Tns+|Tns0| Sustain |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | | All notes off | | | | |
|
||||
* `------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ML] = KEYMAP_ANSI(
|
||||
TG(_ML), MI_VEL_1, MI_VEL_2, MI_VEL_3, MI_VEL_4, MI_VEL_5, MI_VEL_6, MI_VEL_7, MI_VEL_8, MI_VEL_9, MI_VEL_10, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
MI_CHU, XXXXXXX, MI_Cs, MI_Ds, XXXXXXX, MI_Fs, MI_Gs, MI_As, XXXXXXX, MI_Cs_1, MI_Ds_1, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \
|
||||
MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \
|
||||
_______, _______, _______, MI_ALLOFF, _______, _______, _______, _______),
|
||||
#elif defined(MIDI_ENABLE) && defined(MIDI_BASIC)
|
||||
/* Keymap _ML: MIDI Layer (Advanced)
|
||||
* ,------------------------------------------------------------------------.
|
||||
* | Exit | | | | | | | | | | | | | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | |MuOn|MuOf|MiOn|MiOf| | | | | | | |
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | | | | | | |
|
||||
* `------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_ML] = KEYMAP_ANSI(
|
||||
TG(_ML), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
#endif
|
||||
};
|
@ -0,0 +1 @@
|
||||
# Satan GH60 layout demonstrating MIDI key mapping
|
@ -0,0 +1,141 @@
|
||||
#include "satan.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 _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _FUNC 3
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK
|
||||
};
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Custom macros
|
||||
#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt
|
||||
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
||||
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt)
|
||||
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _QWERTY: (Base Layer) Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
|
||||
* |-----------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP_ANSI(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||
HPR_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, \
|
||||
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \
|
||||
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL),
|
||||
|
||||
/* Keymap _COLEMAK: (Base Layer) Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \ |
|
||||
* |-----------------------------------------------------------|
|
||||
* |CAPS | A| R| S| T| D| H| N| E| I| O| '|Return |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = KEYMAP_ANSI(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
|
||||
HPR_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, \
|
||||
CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \
|
||||
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL),
|
||||
|
||||
/* Keymap _DVORAK: (Base Layer) Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backsp |
|
||||
* |-----------------------------------------------------------|
|
||||
* |HypTb| '| ,| .| P| Y| F| G| C| R| L| /| =| \ |
|
||||
* |-----------------------------------------------------------|
|
||||
* |CtrlEsc| A| O| E| U| I| D| H| T| N| S| -|Return |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | ;| Q| J| K| X| B| M| W| V| Z|ShiftEnter|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = KEYMAP_ANSI(
|
||||
KC_GRV, 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, \
|
||||
HPR_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, \
|
||||
CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
|
||||
KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \
|
||||
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL),
|
||||
|
||||
/* Keymap _FUNC: Function Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
|
||||
* |-----------------------------------------------------------|
|
||||
* | |Hom| UP|End| | | |Qwt|Cmk|Dvk| |BL-|BL+|BL |
|
||||
* |-----------------------------------------------------------|
|
||||
* | |LFT| DN| RT| | |LFT| DN| UP| RT|Vo+|Pg+| |
|
||||
* |-----------------------------------------------------------|
|
||||
* | | | |Prv|Ply|Nxt| | | |Vo-|Pg-| |
|
||||
* |-----------------------------------------------------------|
|
||||
* |RESET| | | | | | | |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = KEYMAP_ANSI(
|
||||
_______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_DEL, \
|
||||
_______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,BL_DEC ,BL_INC ,BL_TOGG, \
|
||||
_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_VOLU,KC_PGUP ,_______, \
|
||||
_______ ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \
|
||||
RESET ,_______,_______ ,_______ ,_______,_______,_______,_______
|
||||
)
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
return true;
|
||||
}
|
@ -0,0 +1 @@
|
||||
# smt's Satan GH60 layout
|
@ -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
|
@ -1 +1,3 @@
|
||||
# default TADA68 layout
|
||||
|
||||
This layout replicates the default factory layout of the TADA68.
|
||||
|
@ -1,4 +1,15 @@
|
||||
TADA68 keyboard firmware
|
||||
======================
|
||||
========================
|
||||
|
||||
TODO: to be updated.
|
||||
1) from the keyboards/tada68 directory run:
|
||||
```
|
||||
$ make flashbin
|
||||
```
|
||||
|
||||
2) hit the reset button on the TADA, the lights will start flashing.
|
||||
|
||||
3) You'll see a new drive on your computer called TADA68. Backup the original factory `FLASH.BIN` file thats inside it.
|
||||
|
||||
4) Delete `FLASH.BIN` from the TADA drive and copy `tada68_default.bin` that was generated at the root of the qmk directory into the TADA drive.
|
||||
|
||||
5) Hit ESC on the keyboard. The lights will stop flashing and your firmware is loaded!
|
@ -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 = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. 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,12 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#define BACKLIGHT_PIN B2
|
||||
#define BACKLIGHT_LEVELS 7
|
||||
#endif
|
||||
|
||||
#endif
|
@ -0,0 +1,138 @@
|
||||
// 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.
|
||||
//Author: tong92 <tong92power@gmail.com>
|
||||
|
||||
#include "tv44.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define LOWER F(1)
|
||||
#define RAISE F(2)
|
||||
#define FTN MO(4)
|
||||
#define MOUSE M(10)
|
||||
#define GO_DEFT M(99)
|
||||
#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 |
|
||||
* |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | Enter|
|
||||
* |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / |Shift|
|
||||
* |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
* | Ftn1 | GUI | Alt | Space/LOWER | Space/RAISE | ' | [ | ] | Alt |
|
||||
* `--------------------------------------------------------------------------'
|
||||
*/
|
||||
[0] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_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 },
|
||||
{FTN ,KC_LGUI,KC_LALT,LOWER,XXXXXXX,XXXXXXX,XXXXXXX,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT}
|
||||
},
|
||||
/* LOWER
|
||||
* ,--------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ |
|
||||
* |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
* |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
* | | | | | | END | LEFT| Down|RIGHT|
|
||||
* `--------------------------------------------------------------------------'
|
||||
*/
|
||||
[1] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
|
||||
{_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS },
|
||||
{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
|
||||
{XXXXXXX,_______,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
|
||||
},
|
||||
/* RAISE
|
||||
* ,--------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
* |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
|
||||
* |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
* |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
* | | | | | | END | LEFT| Down|RIGHT|
|
||||
* `--------------------------------------------------------------------------'
|
||||
*/
|
||||
[2] ={
|
||||
{KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______ },
|
||||
{_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE },
|
||||
{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
|
||||
{XXXXXXX,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
|
||||
},
|
||||
/* FTN
|
||||
* ,--------------------------------------------------------------------------.
|
||||
* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DELET |
|
||||
* |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
* | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
|
||||
* |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
* | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | Ctrl|
|
||||
* |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
* | | DeskL | DeskR| Task Manager| DeskX | MOUSE| | | LED |
|
||||
* `--------------------------------------------------------------------------'
|
||||
*/
|
||||
[4] = {
|
||||
{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT},
|
||||
{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
|
||||
{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,KC_RCTL},
|
||||
{_______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LCTL(LALT(KC_DELT)),XXXXXXX,XXXXXXX,XXXXXXX,LGUI(LCTL(KC_F4)),MOUSE,XXXXXXX,XXXXXXX,M(0)}
|
||||
},
|
||||
/* MOUSE
|
||||
* ,--------------------------------------------------------------------------.
|
||||
* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| | RESET |
|
||||
* |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
* | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
|
||||
* |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
* | | | | | | | |M_AC0|M_AC1|M_AC2| | |
|
||||
* |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
* | | | | GO_DEFAULT | GO_DEFAULT | | | | |
|
||||
* `--------------------------------------------------------------------------'
|
||||
*/
|
||||
[10] ={
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET},
|
||||
{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX},
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX},
|
||||
{XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX}
|
||||
}
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC),
|
||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (record->event.pressed) {
|
||||
layer_on(10);
|
||||
}
|
||||
break;
|
||||
case 99:
|
||||
if (record->event.pressed) {
|
||||
layer_off(10);
|
||||
layer_off(4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
@ -0,0 +1,52 @@
|
||||
# The tong92's keymap for tv44
|
||||
|
||||
- Arrow Layout (45key)
|
||||
- my keymap for Window User
|
||||
- Mouse Layer : space -> Default Layer
|
||||
|
||||
## Qwerty
|
||||
,--------------------------------------------------------------------------.
|
||||
| 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 | , | . | / |Shift|
|
||||
|--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
| Ftn1 | GUI | Alt | Space/LOWER | Space/RAISE | ' | [ | ] | Alt |
|
||||
`--------------------------------------------------------------------------'
|
||||
|
||||
|
||||
## RAISE
|
||||
,--------------------------------------------------------------------------.
|
||||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
|------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
|
||||
|-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
|
||||
|--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
| | | | | | END | LEFT| Down|RIGHT|
|
||||
`--------------------------------------------------------------------------'
|
||||
|
||||
|
||||
## FTN
|
||||
,--------------------------------------------------------------------------.
|
||||
| ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DELET |
|
||||
|------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
| |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
|
||||
|-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
| |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | Ctrl|
|
||||
|--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
| | DeskL | DeskR| Task Manager| DeskX | MOUSE| | | LED |
|
||||
`--------------------------------------------------------------------------'
|
||||
|
||||
|
||||
## MOUSE
|
||||
,--------------------------------------------------------------------------.
|
||||
| | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| | RESET |
|
||||
|------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
|
||||
| | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
|
||||
|-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
|
||||
| | | | | | | |M_AC0|M_AC1|M_AC2| | |
|
||||
|--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
|
||||
| | | | GO_DEFAULT | GO_DEFAULT | | | | |
|
||||
`--------------------------------------------------------------------------'
|
@ -0,0 +1,13 @@
|
||||
# cheese's Layout
|
||||
Customized xd60 keymap
|
||||
|
||||
![Base Layout](base_layout.png "Base Layout")
|
||||
![Fn Layout](fn_layout.png "Fn Layout")
|
||||
|
||||
## Programming Instructions:
|
||||
`cd` into keymap directory, `make dfu`
|
||||
|
||||
## Features
|
||||
- Media keys and movement keys setup like on the pok3r
|
||||
- Lower right movement keys setup like on the fc660m (fn+direction for home/end/page up and down)
|
||||
- Caps lock can be triggered by pressing both shift keys at the same time (and deactivated the same way)
|
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,67 @@
|
||||
#include "xd60.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
// Each layer gets a name for readability.
|
||||
// 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, and you can also skip them entirely
|
||||
// and just use numbers.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
#define _LS 2
|
||||
#define _RS 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* (Base Layer) Default Layer
|
||||
* ,-----------------------------------------------------------.
|
||||
* |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
|
||||
* |-----------------------------------------------------------|
|
||||
* |FUNCTION| A| S| D| F| G| H| J| K| L| ;| '|Return|
|
||||
* |-----------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
|
||||
* |-----------------------------------------------------------|
|
||||
* |Ctrl|Gui |Alt | Space |FN|Left|Up|Down|Right|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
|
||||
KC_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, KC_NO, KC_ENT, \
|
||||
F(0), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), F(1), F(1), \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT),
|
||||
|
||||
// Function Layer
|
||||
[_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_DEL, KC_DEL, \
|
||||
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CALC, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \
|
||||
KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END),
|
||||
|
||||
// Left Shift Layer
|
||||
[_LS] = KEYMAP(
|
||||
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_CAPS, KC_CAPS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
// Right Shift Layer
|
||||
[_RS] = KEYMAP(
|
||||
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
|
||||
// Custom Actions
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MODS(_LS, MOD_LSFT),
|
||||
[1] = ACTION_LAYER_MODS(_RS, MOD_RSFT),
|
||||
};
|
@ -0,0 +1,264 @@
|
||||
The GNU General Public License, Version 2, June 1991 (GPLv2)
|
||||
============================================================
|
||||
|
||||
> 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.
|
||||
|
||||
|
||||
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.
|
@ -0,0 +1,656 @@
|
||||
The GNU General Public License, Version 3, 29 June 2007 (GPLv3)
|
||||
===============================================================
|
||||
|
||||
> Copyright © 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,32 @@
|
||||
This software is licensed with a Modified BSD License.
|
||||
|
||||
All of this is supposed to be Free Software, Open Source, DFSG-free,
|
||||
GPL-compatible, and OK to use in both free and proprietary applications.
|
||||
Additions and corrections to this file are welcome.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of the copyright holders nor the names of
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
@ -0,0 +1,62 @@
|
||||
#include "audio.h"
|
||||
#include "process_audio.h"
|
||||
|
||||
static float compute_freq_for_midi_note(uint8_t note)
|
||||
{
|
||||
// https://en.wikipedia.org/wiki/MIDI_tuning_standard
|
||||
return pow(2.0, (note - 69) / 12.0) * 440.0f;
|
||||
}
|
||||
|
||||
bool process_audio(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
if (keycode == AU_ON && record->event.pressed) {
|
||||
audio_on();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keycode == AU_OFF && record->event.pressed) {
|
||||
audio_off();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keycode == AU_TOG && record->event.pressed) {
|
||||
if (is_audio_on())
|
||||
{
|
||||
audio_off();
|
||||
}
|
||||
else
|
||||
{
|
||||
audio_on();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keycode == MUV_IN && record->event.pressed) {
|
||||
voice_iterate();
|
||||
music_scale_user();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keycode == MUV_DE && record->event.pressed) {
|
||||
voice_deiterate();
|
||||
music_scale_user();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void process_audio_noteon(uint8_t note) {
|
||||
play_note(compute_freq_for_midi_note(note), 0xF);
|
||||
}
|
||||
|
||||
void process_audio_noteoff(uint8_t note) {
|
||||
stop_note(compute_freq_for_midi_note(note));
|
||||
}
|
||||
|
||||
void process_audio_all_notes_off(void) {
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void audio_on_user() {}
|
@ -0,0 +1,11 @@
|
||||
#ifndef PROCESS_AUDIO_H
|
||||
#define PROCESS_AUDIO_H
|
||||
|
||||
bool process_audio(uint16_t keycode, keyrecord_t *record);
|
||||
void process_audio_noteon(uint8_t note);
|
||||
void process_audio_noteoff(uint8_t note);
|
||||
void process_audio_all_notes_off(void);
|
||||
|
||||
void audio_on_user(void);
|
||||
|
||||
#endif
|
@ -1,68 +1,253 @@
|
||||
/* Copyright 2016 Jack Humbert
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "process_midi.h"
|
||||
|
||||
bool midi_activated = false;
|
||||
uint8_t midi_starting_note = 0x0C;
|
||||
int midi_offset = 7;
|
||||
|
||||
bool process_midi(uint16_t keycode, keyrecord_t *record) {
|
||||
if (keycode == MI_ON && record->event.pressed) {
|
||||
midi_activated = true;
|
||||
#ifdef AUDIO_ENABLE
|
||||
music_scale_user();
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#ifdef MIDI_ENABLE
|
||||
#include "midi.h"
|
||||
|
||||
#ifdef MIDI_BASIC
|
||||
|
||||
void process_midi_basic_noteon(uint8_t note)
|
||||
{
|
||||
midi_send_noteon(&midi_device, 0, note, 128);
|
||||
}
|
||||
|
||||
void process_midi_basic_noteoff(uint8_t note)
|
||||
{
|
||||
midi_send_noteoff(&midi_device, 0, note, 0);
|
||||
}
|
||||
|
||||
void process_midi_all_notes_off(void)
|
||||
{
|
||||
midi_send_cc(&midi_device, 0, 0x7B, 0);
|
||||
}
|
||||
|
||||
#endif // MIDI_BASIC
|
||||
|
||||
#ifdef MIDI_ADVANCED
|
||||
|
||||
#include "timer.h"
|
||||
|
||||
static uint8_t tone_status[MIDI_TONE_COUNT];
|
||||
|
||||
static uint8_t midi_modulation;
|
||||
static int8_t midi_modulation_step;
|
||||
static uint16_t midi_modulation_timer;
|
||||
|
||||
inline uint8_t compute_velocity(uint8_t setting)
|
||||
{
|
||||
return (setting + 1) * (128 / (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN + 1));
|
||||
}
|
||||
|
||||
if (keycode == MI_OFF && record->event.pressed) {
|
||||
midi_activated = false;
|
||||
midi_send_cc(&midi_device, 0, 0x7B, 0);
|
||||
return false;
|
||||
void midi_init(void)
|
||||
{
|
||||
midi_config.octave = MI_OCT_2 - MIDI_OCTAVE_MIN;
|
||||
midi_config.transpose = 0;
|
||||
midi_config.velocity = (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN);
|
||||
midi_config.channel = 0;
|
||||
midi_config.modulation_interval = 8;
|
||||
|
||||
for (uint8_t i = 0; i < MIDI_TONE_COUNT; i++)
|
||||
{
|
||||
tone_status[i] = MIDI_INVALID_NOTE;
|
||||
}
|
||||
|
||||
if (midi_activated) {
|
||||
if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) {
|
||||
if (record->event.pressed) {
|
||||
midi_starting_note++; // Change key
|
||||
midi_send_cc(&midi_device, 0, 0x7B, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) {
|
||||
if (record->event.pressed) {
|
||||
midi_starting_note--; // Change key
|
||||
midi_send_cc(&midi_device, 0, 0x7B, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) {
|
||||
midi_offset++; // Change scale
|
||||
midi_send_cc(&midi_device, 0, 0x7B, 0);
|
||||
return false;
|
||||
}
|
||||
if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) {
|
||||
midi_offset--; // Change scale
|
||||
midi_send_cc(&midi_device, 0, 0x7B, 0);
|
||||
return false;
|
||||
}
|
||||
// basic
|
||||
// uint8_t note = (midi_starting_note + SCALE[record->event.key.col + midi_offset])+12*(MATRIX_ROWS - record->event.key.row);
|
||||
// advanced
|
||||
// uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+12*(MATRIX_ROWS - record->event.key.row);
|
||||
// guitar
|
||||
uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+5*(MATRIX_ROWS - record->event.key.row);
|
||||
// violin
|
||||
// uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+7*(MATRIX_ROWS - record->event.key.row);
|
||||
|
||||
if (record->event.pressed) {
|
||||
// midi_send_noteon(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127);
|
||||
midi_send_noteon(&midi_device, 0, note, 127);
|
||||
} else {
|
||||
// midi_send_noteoff(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127);
|
||||
midi_send_noteoff(&midi_device, 0, note, 127);
|
||||
}
|
||||
|
||||
if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through
|
||||
return false;
|
||||
midi_modulation = 0;
|
||||
midi_modulation_step = 0;
|
||||
midi_modulation_timer = 0;
|
||||
}
|
||||
|
||||
void midi_task(void)
|
||||
{
|
||||
if (timer_elapsed(midi_modulation_timer) < midi_config.modulation_interval)
|
||||
return;
|
||||
midi_modulation_timer = timer_read();
|
||||
|
||||
if (midi_modulation_step != 0)
|
||||
{
|
||||
dprintf("midi modulation %d\n", midi_modulation);
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x1, midi_modulation);
|
||||
|
||||
if (midi_modulation_step < 0 && midi_modulation < -midi_modulation_step) {
|
||||
midi_modulation = 0;
|
||||
midi_modulation_step = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
midi_modulation += midi_modulation_step;
|
||||
|
||||
if (midi_modulation > 127)
|
||||
midi_modulation = 127;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8_t midi_compute_note(uint16_t keycode)
|
||||
{
|
||||
return 12 * midi_config.octave + (keycode - MIDI_TONE_MIN) + midi_config.transpose;
|
||||
}
|
||||
|
||||
bool process_midi(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
switch (keycode) {
|
||||
case MIDI_TONE_MIN ... MIDI_TONE_MAX:
|
||||
{
|
||||
uint8_t channel = midi_config.channel;
|
||||
uint8_t tone = keycode - MIDI_TONE_MIN;
|
||||
uint8_t velocity = compute_velocity(midi_config.velocity);
|
||||
if (record->event.pressed) {
|
||||
uint8_t note = midi_compute_note(keycode);
|
||||
midi_send_noteon(&midi_device, channel, note, velocity);
|
||||
dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity);
|
||||
tone_status[tone] = note;
|
||||
}
|
||||
else {
|
||||
uint8_t note = tone_status[tone];
|
||||
if (note != MIDI_INVALID_NOTE)
|
||||
{
|
||||
midi_send_noteoff(&midi_device, channel, note, velocity);
|
||||
dprintf("midi noteoff channel:%d note:%d velocity:%d\n", channel, note, velocity);
|
||||
}
|
||||
tone_status[tone] = MIDI_INVALID_NOTE;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case MIDI_OCTAVE_MIN ... MIDI_OCTAVE_MAX:
|
||||
if (record->event.pressed) {
|
||||
midi_config.octave = keycode - MIDI_OCTAVE_MIN;
|
||||
dprintf("midi octave %d\n", midi_config.octave);
|
||||
}
|
||||
return false;
|
||||
case MI_OCTD:
|
||||
if (record->event.pressed && midi_config.octave > 0) {
|
||||
midi_config.octave--;
|
||||
dprintf("midi octave %d\n", midi_config.octave);
|
||||
}
|
||||
return false;
|
||||
case MI_OCTU:
|
||||
if (record->event.pressed && midi_config.octave < (MIDI_OCTAVE_MAX - MIDI_OCTAVE_MIN)) {
|
||||
midi_config.octave++;
|
||||
dprintf("midi octave %d\n", midi_config.octave);
|
||||
}
|
||||
return false;
|
||||
case MIDI_TRANSPOSE_MIN ... MIDI_TRANSPOSE_MAX:
|
||||
if (record->event.pressed) {
|
||||
midi_config.transpose = keycode - MI_TRNS_0;
|
||||
dprintf("midi transpose %d\n", midi_config.transpose);
|
||||
}
|
||||
return false;
|
||||
case MI_TRNSD:
|
||||
if (record->event.pressed && midi_config.transpose > (MIDI_TRANSPOSE_MIN - MI_TRNS_0)) {
|
||||
midi_config.transpose--;
|
||||
dprintf("midi transpose %d\n", midi_config.transpose);
|
||||
}
|
||||
return false;
|
||||
case MI_TRNSU:
|
||||
if (record->event.pressed && midi_config.transpose < (MIDI_TRANSPOSE_MAX - MI_TRNS_0)) {
|
||||
const bool positive = midi_config.transpose > 0;
|
||||
midi_config.transpose++;
|
||||
if (positive && midi_config.transpose < 0)
|
||||
midi_config.transpose--;
|
||||
dprintf("midi transpose %d\n", midi_config.transpose);
|
||||
}
|
||||
return false;
|
||||
case MIDI_VELOCITY_MIN ... MIDI_VELOCITY_MAX:
|
||||
if (record->event.pressed) {
|
||||
midi_config.velocity = keycode - MIDI_VELOCITY_MIN;
|
||||
dprintf("midi velocity %d\n", midi_config.velocity);
|
||||
}
|
||||
return false;
|
||||
case MI_VELD:
|
||||
if (record->event.pressed && midi_config.velocity > 0) {
|
||||
midi_config.velocity--;
|
||||
dprintf("midi velocity %d\n", midi_config.velocity);
|
||||
}
|
||||
return false;
|
||||
case MI_VELU:
|
||||
if (record->event.pressed) {
|
||||
midi_config.velocity++;
|
||||
dprintf("midi velocity %d\n", midi_config.velocity);
|
||||
}
|
||||
return false;
|
||||
case MIDI_CHANNEL_MIN ... MIDI_CHANNEL_MAX:
|
||||
if (record->event.pressed) {
|
||||
midi_config.channel = keycode - MIDI_CHANNEL_MIN;
|
||||
dprintf("midi channel %d\n", midi_config.channel);
|
||||
}
|
||||
return false;
|
||||
case MI_CHD:
|
||||
if (record->event.pressed) {
|
||||
midi_config.channel--;
|
||||
dprintf("midi channel %d\n", midi_config.channel);
|
||||
}
|
||||
return false;
|
||||
case MI_CHU:
|
||||
if (record->event.pressed) {
|
||||
midi_config.channel++;
|
||||
dprintf("midi channel %d\n", midi_config.channel);
|
||||
}
|
||||
return false;
|
||||
case MI_ALLOFF:
|
||||
if (record->event.pressed) {
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0);
|
||||
dprintf("midi all notes off\n");
|
||||
}
|
||||
return false;
|
||||
case MI_SUS:
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x40, record->event.pressed ? 127 : 0);
|
||||
dprintf("midi sustain %d\n", record->event.pressed);
|
||||
return false;
|
||||
case MI_PORT:
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x41, record->event.pressed ? 127 : 0);
|
||||
dprintf("midi portamento %d\n", record->event.pressed);
|
||||
return false;
|
||||
case MI_SOST:
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x42, record->event.pressed ? 127 : 0);
|
||||
dprintf("midi sostenuto %d\n", record->event.pressed);
|
||||
return false;
|
||||
case MI_SOFT:
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0);
|
||||
dprintf("midi soft %d\n", record->event.pressed);
|
||||
return false;
|
||||
case MI_LEG:
|
||||
midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0);
|
||||
dprintf("midi legato %d\n", record->event.pressed);
|
||||
return false;
|
||||
case MI_MOD:
|
||||
midi_modulation_step = record->event.pressed ? 1 : -1;
|
||||
return false;
|
||||
case MI_MODSD:
|
||||
if (record->event.pressed) {
|
||||
midi_config.modulation_interval++;
|
||||
// prevent overflow
|
||||
if (midi_config.modulation_interval == 0)
|
||||
midi_config.modulation_interval--;
|
||||
dprintf("midi modulation interval %d\n", midi_config.modulation_interval);
|
||||
}
|
||||
return false;
|
||||
case MI_MODSU:
|
||||
if (record->event.pressed && midi_config.modulation_interval > 0) {
|
||||
midi_config.modulation_interval--;
|
||||
dprintf("midi modulation interval %d\n", midi_config.modulation_interval);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // MIDI_ADVANCED
|
||||
|
||||
#endif // MIDI_ENABLE
|
||||
|
@ -1,207 +1,56 @@
|
||||
/* Copyright 2016 Jack Humbert
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PROCESS_MIDI_H
|
||||
#define PROCESS_MIDI_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
bool process_midi(uint16_t keycode, keyrecord_t *record);
|
||||
#ifdef MIDI_ENABLE
|
||||
|
||||
#ifdef MIDI_BASIC
|
||||
void process_midi_basic_noteon(uint8_t note);
|
||||
void process_midi_basic_noteoff(uint8_t note);
|
||||
void process_midi_all_notes_off(void);
|
||||
#endif
|
||||
|
||||
#define MIDI(n) ((n) | 0x6000)
|
||||
#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000
|
||||
#ifdef MIDI_ADVANCED
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
uint8_t octave :4;
|
||||
int8_t transpose :4;
|
||||
uint8_t velocity :4;
|
||||
uint8_t channel :4;
|
||||
uint8_t modulation_interval :4;
|
||||
};
|
||||
} midi_config_t;
|
||||
|
||||
midi_config_t midi_config;
|
||||
|
||||
void midi_init(void);
|
||||
void midi_task(void);
|
||||
bool process_midi(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#define CHNL(note, channel) (note + (channel << 8))
|
||||
#define MIDI_INVALID_NOTE 0xFF
|
||||
#define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1)
|
||||
|
||||
#define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \
|
||||
0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \
|
||||
0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \
|
||||
0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \
|
||||
0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), }
|
||||
uint8_t midi_compute_note(uint16_t keycode);
|
||||
#endif // MIDI_ADVANCED
|
||||
|
||||
#define N_CN1 (0x600C + (12 * -1) + 0 )
|
||||
#define N_CN1S (0x600C + (12 * -1) + 1 )
|
||||
#define N_DN1F (0x600C + (12 * -1) + 1 )
|
||||
#define N_DN1 (0x600C + (12 * -1) + 2 )
|
||||
#define N_DN1S (0x600C + (12 * -1) + 3 )
|
||||
#define N_EN1F (0x600C + (12 * -1) + 3 )
|
||||
#define N_EN1 (0x600C + (12 * -1) + 4 )
|
||||
#define N_FN1 (0x600C + (12 * -1) + 5 )
|
||||
#define N_FN1S (0x600C + (12 * -1) + 6 )
|
||||
#define N_GN1F (0x600C + (12 * -1) + 6 )
|
||||
#define N_GN1 (0x600C + (12 * -1) + 7 )
|
||||
#define N_GN1S (0x600C + (12 * -1) + 8 )
|
||||
#define N_AN1F (0x600C + (12 * -1) + 8 )
|
||||
#define N_AN1 (0x600C + (12 * -1) + 9 )
|
||||
#define N_AN1S (0x600C + (12 * -1) + 10)
|
||||
#define N_BN1F (0x600C + (12 * -1) + 10)
|
||||
#define N_BN1 (0x600C + (12 * -1) + 11)
|
||||
#define N_C0 (0x600C + (12 * 0) + 0 )
|
||||
#define N_C0S (0x600C + (12 * 0) + 1 )
|
||||
#define N_D0F (0x600C + (12 * 0) + 1 )
|
||||
#define N_D0 (0x600C + (12 * 0) + 2 )
|
||||
#define N_D0S (0x600C + (12 * 0) + 3 )
|
||||
#define N_E0F (0x600C + (12 * 0) + 3 )
|
||||
#define N_E0 (0x600C + (12 * 0) + 4 )
|
||||
#define N_F0 (0x600C + (12 * 0) + 5 )
|
||||
#define N_F0S (0x600C + (12 * 0) + 6 )
|
||||
#define N_G0F (0x600C + (12 * 0) + 6 )
|
||||
#define N_G0 (0x600C + (12 * 0) + 7 )
|
||||
#define N_G0S (0x600C + (12 * 0) + 8 )
|
||||
#define N_A0F (0x600C + (12 * 0) + 8 )
|
||||
#define N_A0 (0x600C + (12 * 0) + 9 )
|
||||
#define N_A0S (0x600C + (12 * 0) + 10)
|
||||
#define N_B0F (0x600C + (12 * 0) + 10)
|
||||
#define N_B0 (0x600C + (12 * 0) + 11)
|
||||
#define N_C1 (0x600C + (12 * 1) + 0 )
|
||||
#define N_C1S (0x600C + (12 * 1) + 1 )
|
||||
#define N_D1F (0x600C + (12 * 1) + 1 )
|
||||
#define N_D1 (0x600C + (12 * 1) + 2 )
|
||||
#define N_D1S (0x600C + (12 * 1) + 3 )
|
||||
#define N_E1F (0x600C + (12 * 1) + 3 )
|
||||
#define N_E1 (0x600C + (12 * 1) + 4 )
|
||||
#define N_F1 (0x600C + (12 * 1) + 5 )
|
||||
#define N_F1S (0x600C + (12 * 1) + 6 )
|
||||
#define N_G1F (0x600C + (12 * 1) + 6 )
|
||||
#define N_G1 (0x600C + (12 * 1) + 7 )
|
||||
#define N_G1S (0x600C + (12 * 1) + 8 )
|
||||
#define N_A1F (0x600C + (12 * 1) + 8 )
|
||||
#define N_A1 (0x600C + (12 * 1) + 9 )
|
||||
#define N_A1S (0x600C + (12 * 1) + 10)
|
||||
#define N_B1F (0x600C + (12 * 1) + 10)
|
||||
#define N_B1 (0x600C + (12 * 1) + 11)
|
||||
#define N_C2 (0x600C + (12 * 2) + 0 )
|
||||
#define N_C2S (0x600C + (12 * 2) + 1 )
|
||||
#define N_D2F (0x600C + (12 * 2) + 1 )
|
||||
#define N_D2 (0x600C + (12 * 2) + 2 )
|
||||
#define N_D2S (0x600C + (12 * 2) + 3 )
|
||||
#define N_E2F (0x600C + (12 * 2) + 3 )
|
||||
#define N_E2 (0x600C + (12 * 2) + 4 )
|
||||
#define N_F2 (0x600C + (12 * 2) + 5 )
|
||||
#define N_F2S (0x600C + (12 * 2) + 6 )
|
||||
#define N_G2F (0x600C + (12 * 2) + 6 )
|
||||
#define N_G2 (0x600C + (12 * 2) + 7 )
|
||||
#define N_G2S (0x600C + (12 * 2) + 8 )
|
||||
#define N_A2F (0x600C + (12 * 2) + 8 )
|
||||
#define N_A2 (0x600C + (12 * 2) + 9 )
|
||||
#define N_A2S (0x600C + (12 * 2) + 10)
|
||||
#define N_B2F (0x600C + (12 * 2) + 10)
|
||||
#define N_B2 (0x600C + (12 * 2) + 11)
|
||||
#define N_C3 (0x600C + (12 * 3) + 0 )
|
||||
#define N_C3S (0x600C + (12 * 3) + 1 )
|
||||
#define N_D3F (0x600C + (12 * 3) + 1 )
|
||||
#define N_D3 (0x600C + (12 * 3) + 2 )
|
||||
#define N_D3S (0x600C + (12 * 3) + 3 )
|
||||
#define N_E3F (0x600C + (12 * 3) + 3 )
|
||||
#define N_E3 (0x600C + (12 * 3) + 4 )
|
||||
#define N_F3 (0x600C + (12 * 3) + 5 )
|
||||
#define N_F3S (0x600C + (12 * 3) + 6 )
|
||||
#define N_G3F (0x600C + (12 * 3) + 6 )
|
||||
#define N_G3 (0x600C + (12 * 3) + 7 )
|
||||
#define N_G3S (0x600C + (12 * 3) + 8 )
|
||||
#define N_A3F (0x600C + (12 * 3) + 8 )
|
||||
#define N_A3 (0x600C + (12 * 3) + 9 )
|
||||
#define N_A3S (0x600C + (12 * 3) + 10)
|
||||
#define N_B3F (0x600C + (12 * 3) + 10)
|
||||
#define N_B3 (0x600C + (12 * 3) + 11)
|
||||
#define N_C4 (0x600C + (12 * 4) + 0 )
|
||||
#define N_C4S (0x600C + (12 * 4) + 1 )
|
||||
#define N_D4F (0x600C + (12 * 4) + 1 )
|
||||
#define N_D4 (0x600C + (12 * 4) + 2 )
|
||||
#define N_D4S (0x600C + (12 * 4) + 3 )
|
||||
#define N_E4F (0x600C + (12 * 4) + 3 )
|
||||
#define N_E4 (0x600C + (12 * 4) + 4 )
|
||||
#define N_F4 (0x600C + (12 * 4) + 5 )
|
||||
#define N_F4S (0x600C + (12 * 4) + 6 )
|
||||
#define N_G4F (0x600C + (12 * 4) + 6 )
|
||||
#define N_G4 (0x600C + (12 * 4) + 7 )
|
||||
#define N_G4S (0x600C + (12 * 4) + 8 )
|
||||
#define N_A4F (0x600C + (12 * 4) + 8 )
|
||||
#define N_A4 (0x600C + (12 * 4) + 9 )
|
||||
#define N_A4S (0x600C + (12 * 4) + 10)
|
||||
#define N_B4F (0x600C + (12 * 4) + 10)
|
||||
#define N_B4 (0x600C + (12 * 4) + 11)
|
||||
#define N_C5 (0x600C + (12 * 5) + 0 )
|
||||
#define N_C5S (0x600C + (12 * 5) + 1 )
|
||||
#define N_D5F (0x600C + (12 * 5) + 1 )
|
||||
#define N_D5 (0x600C + (12 * 5) + 2 )
|
||||
#define N_D5S (0x600C + (12 * 5) + 3 )
|
||||
#define N_E5F (0x600C + (12 * 5) + 3 )
|
||||
#define N_E5 (0x600C + (12 * 5) + 4 )
|
||||
#define N_F5 (0x600C + (12 * 5) + 5 )
|
||||
#define N_F5S (0x600C + (12 * 5) + 6 )
|
||||
#define N_G5F (0x600C + (12 * 5) + 6 )
|
||||
#define N_G5 (0x600C + (12 * 5) + 7 )
|
||||
#define N_G5S (0x600C + (12 * 5) + 8 )
|
||||
#define N_A5F (0x600C + (12 * 5) + 8 )
|
||||
#define N_A5 (0x600C + (12 * 5) + 9 )
|
||||
#define N_A5S (0x600C + (12 * 5) + 10)
|
||||
#define N_B5F (0x600C + (12 * 5) + 10)
|
||||
#define N_B5 (0x600C + (12 * 5) + 11)
|
||||
#define N_C6 (0x600C + (12 * 6) + 0 )
|
||||
#define N_C6S (0x600C + (12 * 6) + 1 )
|
||||
#define N_D6F (0x600C + (12 * 6) + 1 )
|
||||
#define N_D6 (0x600C + (12 * 6) + 2 )
|
||||
#define N_D6S (0x600C + (12 * 6) + 3 )
|
||||
#define N_E6F (0x600C + (12 * 6) + 3 )
|
||||
#define N_E6 (0x600C + (12 * 6) + 4 )
|
||||
#define N_F6 (0x600C + (12 * 6) + 5 )
|
||||
#define N_F6S (0x600C + (12 * 6) + 6 )
|
||||
#define N_G6F (0x600C + (12 * 6) + 6 )
|
||||
#define N_G6 (0x600C + (12 * 6) + 7 )
|
||||
#define N_G6S (0x600C + (12 * 6) + 8 )
|
||||
#define N_A6F (0x600C + (12 * 6) + 8 )
|
||||
#define N_A6 (0x600C + (12 * 6) + 9 )
|
||||
#define N_A6S (0x600C + (12 * 6) + 10)
|
||||
#define N_B6F (0x600C + (12 * 6) + 10)
|
||||
#define N_B6 (0x600C + (12 * 6) + 11)
|
||||
#define N_C7 (0x600C + (12 * 7) + 0 )
|
||||
#define N_C7S (0x600C + (12 * 7) + 1 )
|
||||
#define N_D7F (0x600C + (12 * 7) + 1 )
|
||||
#define N_D7 (0x600C + (12 * 7) + 2 )
|
||||
#define N_D7S (0x600C + (12 * 7) + 3 )
|
||||
#define N_E7F (0x600C + (12 * 7) + 3 )
|
||||
#define N_E7 (0x600C + (12 * 7) + 4 )
|
||||
#define N_F7 (0x600C + (12 * 7) + 5 )
|
||||
#define N_F7S (0x600C + (12 * 7) + 6 )
|
||||
#define N_G7F (0x600C + (12 * 7) + 6 )
|
||||
#define N_G7 (0x600C + (12 * 7) + 7 )
|
||||
#define N_G7S (0x600C + (12 * 7) + 8 )
|
||||
#define N_A7F (0x600C + (12 * 7) + 8 )
|
||||
#define N_A7 (0x600C + (12 * 7) + 9 )
|
||||
#define N_A7S (0x600C + (12 * 7) + 10)
|
||||
#define N_B7F (0x600C + (12 * 7) + 10)
|
||||
#define N_B7 (0x600C + (12 * 7) + 11)
|
||||
#define N_C8 (0x600C + (12 * 8) + 0 )
|
||||
#define N_C8S (0x600C + (12 * 8) + 1 )
|
||||
#define N_D8F (0x600C + (12 * 8) + 1 )
|
||||
#define N_D8 (0x600C + (12 * 8) + 2 )
|
||||
#define N_D8S (0x600C + (12 * 8) + 3 )
|
||||
#define N_E8F (0x600C + (12 * 8) + 3 )
|
||||
#define N_E8 (0x600C + (12 * 8) + 4 )
|
||||
#define N_F8 (0x600C + (12 * 8) + 5 )
|
||||
#define N_F8S (0x600C + (12 * 8) + 6 )
|
||||
#define N_G8F (0x600C + (12 * 8) + 6 )
|
||||
#define N_G8 (0x600C + (12 * 8) + 7 )
|
||||
#define N_G8S (0x600C + (12 * 8) + 8 )
|
||||
#define N_A8F (0x600C + (12 * 8) + 8 )
|
||||
#define N_A8 (0x600C + (12 * 8) + 9 )
|
||||
#define N_A8S (0x600C + (12 * 8) + 10)
|
||||
#define N_B8F (0x600C + (12 * 8) + 10)
|
||||
#define N_B8 (0x600C + (12 * 8) + 11)
|
||||
#define N_C8 (0x600C + (12 * 8) + 0 )
|
||||
#define N_C8S (0x600C + (12 * 8) + 1 )
|
||||
#define N_D8F (0x600C + (12 * 8) + 1 )
|
||||
#define N_D8 (0x600C + (12 * 8) + 2 )
|
||||
#define N_D8S (0x600C + (12 * 8) + 3 )
|
||||
#define N_E8F (0x600C + (12 * 8) + 3 )
|
||||
#define N_E8 (0x600C + (12 * 8) + 4 )
|
||||
#define N_F8 (0x600C + (12 * 8) + 5 )
|
||||
#define N_F8S (0x600C + (12 * 8) + 6 )
|
||||
#define N_G8F (0x600C + (12 * 8) + 6 )
|
||||
#define N_G8 (0x600C + (12 * 8) + 7 )
|
||||
#define N_G8S (0x600C + (12 * 8) + 8 )
|
||||
#define N_A8F (0x600C + (12 * 8) + 8 )
|
||||
#define N_A8 (0x600C + (12 * 8) + 9 )
|
||||
#define N_A8S (0x600C + (12 * 8) + 10)
|
||||
#define N_B8F (0x600C + (12 * 8) + 10)
|
||||
#define N_B8 (0x600C + (12 * 8) + 11)
|
||||
#endif // MIDI_ENABLE
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,3 +1,18 @@
|
||||
# Copyright 2013 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 MAKEFILE_INCLUDED
|
||||
include ../../Makefile
|
||||
endif
|
||||
endif
|
||||
|
Loading…
Reference in new issue