Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3448d5d487 | ||
|
|
ec35fea264 | ||
|
|
2b4efaba53 | ||
|
|
caab4d7e45 | ||
|
|
d1e66e2e07 | ||
|
|
7e54332890 | ||
|
|
b9225a28f2 | ||
|
|
200ae0c519 | ||
|
|
eedb767279 | ||
|
|
ccbdf90f02 | ||
|
|
3a1ee48cda | ||
|
|
b441468795 | ||
|
|
3f3f208113 | ||
|
|
8994fca4ee | ||
|
|
d359b55520 | ||
|
|
338edcabd7 | ||
|
|
d145a1192f | ||
|
|
71da013995 | ||
|
|
2366ebfbbd | ||
|
|
c782b269b6 | ||
|
|
4d2be0281c | ||
|
|
942f2ccee4 | ||
|
|
d6e51d2008 | ||
|
|
23839b8c6d | ||
|
|
b83ae5ae5c | ||
|
|
49f547dd8e | ||
|
|
6de7e5d8dc | ||
|
|
85cac39529 | ||
|
|
3fdc45b4e9 | ||
|
|
411cd4fae2 | ||
|
|
f504082f7f | ||
|
|
256abc64d5 | ||
|
|
1b821eca66 | ||
|
|
37b7539af3 | ||
|
|
c72ca58528 | ||
|
|
48dfc77718 | ||
|
|
62faa20ef6 | ||
|
|
d5ee0194ab | ||
|
|
5e4daf1c6d | ||
|
|
7e37daa2ce | ||
|
|
71857ebc3f | ||
|
|
25f2295ba8 | ||
|
|
8775a13658 | ||
|
|
0520341ce4 | ||
|
|
edfb50ea56 | ||
|
|
1968ec4c24 | ||
|
|
25a7c94174 | ||
|
|
515b4dd1f7 | ||
|
|
0734f56940 | ||
|
|
d11962aeb2 | ||
|
|
976c856966 | ||
|
|
b911e1966f | ||
|
|
a64ae10662 | ||
|
|
ea14ed122f | ||
|
|
1000799d1e | ||
|
|
525be99ee9 | ||
|
|
64eecfc530 | ||
|
|
ed15973a3f | ||
|
|
d1fe24ad9f | ||
|
|
ae0752dff5 | ||
|
|
5e6097f015 | ||
|
|
dd8f8e6bae | ||
|
|
7c5e510fe2 | ||
|
|
f67aefc522 | ||
|
|
a4163466cb | ||
|
|
f2b2e05f12 | ||
|
|
e405ab4bc6 | ||
|
|
5ae1411fc3 | ||
|
|
d1fb51976a | ||
|
|
18cc05e2f7 | ||
|
|
80c5ada339 | ||
|
|
f388bb5bda | ||
|
|
4c0aa02b2e | ||
|
|
c07ef5c6ab | ||
|
|
59bef40aab |
No files matched your search
+22
-14
@@ -23,9 +23,9 @@ ifdef master
|
|||||||
MASTER = $(master)
|
MASTER = $(master)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MASTER),right)
|
ifeq ($(MASTER),right)
|
||||||
OPT_DEFS += -DMASTER_IS_ON_RIGHT
|
OPT_DEFS += -DMASTER_IS_ON_RIGHT
|
||||||
else
|
else
|
||||||
ifneq ($(MASTER),left)
|
ifneq ($(MASTER),left)
|
||||||
$(error MASTER does not have a valid value(left/right))
|
$(error MASTER does not have a valid value(left/right))
|
||||||
endif
|
endif
|
||||||
@@ -38,7 +38,7 @@ KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
|
|||||||
|
|
||||||
ifneq ("$(wildcard $(KEYBOARD_C))","")
|
ifneq ("$(wildcard $(KEYBOARD_C))","")
|
||||||
include $(KEYBOARD_PATH)/rules.mk
|
include $(KEYBOARD_PATH)/rules.mk
|
||||||
else
|
else
|
||||||
$(error "$(KEYBOARD_C)" does not exist)
|
$(error "$(KEYBOARD_C)" does not exist)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ ifneq ($(SUBPROJECT),)
|
|||||||
ifneq ("$(wildcard $(SUBPROJECT_C))","")
|
ifneq ("$(wildcard $(SUBPROJECT_C))","")
|
||||||
OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
|
OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
|
||||||
include $(SUBPROJECT_PATH)/rules.mk
|
include $(SUBPROJECT_PATH)/rules.mk
|
||||||
else
|
else
|
||||||
$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
|
$(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -83,7 +83,7 @@ ifneq ($(SUBPROJECT),)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Save the defines and includes here, so we don't include any keymap specific ones
|
# Save the defines and includes here, so we don't include any keymap specific ones
|
||||||
PROJECT_DEFS := $(OPT_DEFS)
|
PROJECT_DEFS := $(OPT_DEFS)
|
||||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
|
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
|
||||||
PROJECT_CONFIG := $(CONFIG_H)
|
PROJECT_CONFIG := $(CONFIG_H)
|
||||||
@@ -139,11 +139,27 @@ ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
|||||||
MIDI_ENABLE=yes
|
MIDI_ENABLE=yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
MUSIC_ENABLE := 0
|
||||||
|
|
||||||
|
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||||
|
OPT_DEFS += -DAUDIO_ENABLE
|
||||||
|
MUSIC_ENABLE := 1
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||||
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||||
OPT_DEFS += -DMIDI_ENABLE
|
OPT_DEFS += -DMIDI_ENABLE
|
||||||
|
MUSIC_ENABLE := 1
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(MUSIC_ENABLE), 1)
|
||||||
|
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||||
OPT_DEFS += -DCOMBO_ENABLE
|
OPT_DEFS += -DCOMBO_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||||
@@ -153,14 +169,6 @@ ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
|||||||
OPT_DEFS += -DVIRTSER_ENABLE
|
OPT_DEFS += -DVIRTSER_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|
||||||
OPT_DEFS += -DAUDIO_ENABLE
|
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
|
||||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
|
||||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
|
||||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||||
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||||
@@ -250,7 +258,7 @@ endif
|
|||||||
|
|
||||||
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
||||||
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
||||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
||||||
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
||||||
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
|
$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
|
||||||
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC)
|
$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC)
|
||||||
|
|||||||
@@ -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>.
|
|
||||||
+143
-89
@@ -1,15 +1,30 @@
|
|||||||
Keymap framework - how to define your keymap
|
Keymap framework - how to define your keymap
|
||||||
============================================
|
============================================
|
||||||
***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.***
|
***NOTE: This is updated for QMK but this is still work in progress. This may still be inconsistent with the source code.***
|
||||||
|
|
||||||
|
QMK is based on TMK. Understanding the essential changes made should help you understand variable names etc.
|
||||||
|
|
||||||
|
## TMK vs. QMK
|
||||||
|
|
||||||
|
| Firmware |TMK |QMK |
|
||||||
|
|---------------------------|-----------------------|-------------------------|
|
||||||
|
| Maintainer |hasu |Jack Humbert et al. |
|
||||||
|
| Build path customization | `TMK_DIR = ...` | `include .../Makefile` |
|
||||||
|
| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** |
|
||||||
|
| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 1D array of `uint16_t` holding **action code** |
|
||||||
|
|
||||||
|
Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code.
|
||||||
|
|
||||||
## 0. Keymap and layers
|
## 0. Keymap and layers
|
||||||
**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most.
|
In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most.
|
||||||
**Layer** is an array of **keycodes** to define **actions** for each physical keys.
|
|
||||||
respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
|
|
||||||
|
|
||||||
Keymap: 32 Layers Layer: Keycode matrix
|
For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**.
|
||||||
|
|
||||||
|
Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
|
||||||
|
|
||||||
|
Keymap: 32 Layers Layer: action code matrix
|
||||||
----------------- ---------------------
|
----------------- ---------------------
|
||||||
stack of layers array_of_keycode[row][column]
|
stack of layers array_of_action_code[row][column]
|
||||||
____________ precedence _______________________
|
____________ precedence _______________________
|
||||||
/ / | high / ESC / F1 / F2 / F3 ....
|
/ / | high / ESC / F1 / F2 / F3 ....
|
||||||
31 /___________// | /-----/-----/-----/-----
|
31 /___________// | /-----/-----/-----/-----
|
||||||
@@ -22,11 +37,15 @@ respective layers can be validated simultaneously. Layers are indexed with 0 to
|
|||||||
0 /___________/ V low 0 `--------------------------
|
0 /___________/ V low 0 `--------------------------
|
||||||
|
|
||||||
|
|
||||||
|
Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
|
||||||
|
|
||||||
### 0.1 Keymap status
|
### 0.1 Keymap layer status
|
||||||
Keymap has its state in two parameters:
|
Keymap layer has its state in two 32 bit parameters:
|
||||||
**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
|
|
||||||
|
|
||||||
|
* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
|
||||||
|
* **`layer_state`** () has current on/off status of the layer on its each bit.
|
||||||
|
|
||||||
|
Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
|
||||||
Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
|
Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
|
||||||
To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
|
To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
|
||||||
|
|
||||||
@@ -67,97 +86,132 @@ On the other hand, you shall change `layer_state` to overlay base layer with som
|
|||||||
### 0.2 Layer Precedence and Transparency
|
### 0.2 Layer Precedence and Transparency
|
||||||
Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred.
|
Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred.
|
||||||
|
|
||||||
You can place `KC_TRNS` on overlay layer changes just part of layout to fall back on lower or base layer.
|
You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
|
||||||
Key with `KC_TRANS` doesn't has its own keycode and refers to lower valid layers for keycode, instead.
|
Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
|
||||||
See example below.
|
See example below.
|
||||||
|
|
||||||
|
|
||||||
### 0.3 Keymap Example
|
### 0.3 Keymap Example
|
||||||
Keymap is **`keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array.
|
Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. It holds the 16 bit quantum keycode (action code).
|
||||||
|
|
||||||
|
> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code).
|
||||||
|
|
||||||
This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
|
This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
|
||||||
This example has three layers, 'Qwerty' as base layer, 'Cursor' and 'Mousekey'.
|
This example has three layers, 'QWERTY' as base layer, 'FN' and 'MOUSE'.
|
||||||
|
|
||||||
In this example,
|
In this example,
|
||||||
|
|
||||||
`Fn0` is a **momentary layer switching** key, you can use keys on Cursor layer while holding the key.
|
`MO(layer)` is a **momentary layer switching** key.
|
||||||
|
|
||||||
`Fn1` is a momentary layer switching key with tapping feature, you can get semicolon **';'** with taping the key and switch layers while holding the key. The word **'tap'** or **'tapping'** mean to press and release a key quickly.
|
|
||||||
|
|
||||||
`Fn2` is a **toggle layer switch** key, you can stay switched layer after releasing the key unlike momentary switching.
|
|
||||||
|
|
||||||
You can find other keymap definitions in file `keymap.c` located on project directories.
|
You can find other keymap definitions in file `keymap.c` located on project directories.
|
||||||
|
```
|
||||||
|
/*
|
||||||
|
* dbroqua HHKB Layout
|
||||||
|
*/
|
||||||
|
#include "hhkb.h"
|
||||||
|
|
||||||
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
#define BASE 0
|
||||||
/* 0: Qwerty
|
#define FN 1
|
||||||
* ,-----------------------------------------------------------.
|
#define MOUSE 2
|
||||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Contro| A| S| D| F| G| H| J| K| L|Fn1| '|Enter |
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0|
|
|
||||||
* `-----------------------------------------------------------'
|
|
||||||
* |Gui|Alt |Space |Alt |Fn2|
|
|
||||||
* `-------------------------------------------'
|
|
||||||
*/
|
|
||||||
KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \
|
|
||||||
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \
|
|
||||||
LCTL,A, S, D, F, G, H, J, K, L, FN1, QUOT,ENT, \
|
|
||||||
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \
|
|
||||||
LGUI,LALT, SPC, RALT,FN2),
|
|
||||||
/* 1: Cursor(HHKB mode)
|
|
||||||
* ,-----------------------------------------------------------.
|
|
||||||
* |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs|
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter |
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Shift | | | | | | +| -|End|PgD|Dow|Shift | |
|
|
||||||
* `-----------------------------------------------------------'
|
|
||||||
* |Gui |Alt |Space |Alt |Gui|
|
|
||||||
* `--------------------------------------------'
|
|
||||||
*/
|
|
||||||
KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
|
|
||||||
CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,UP, TRNS,BSPC, \
|
|
||||||
LCTL,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \
|
|
||||||
LSFT,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \
|
|
||||||
LGUI,LALT, SPC, RALT,RGUI),
|
|
||||||
/* 2: Mousekey
|
|
||||||
* ,-----------------------------------------------------------.
|
|
||||||
* |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs|
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Contro| | | | | |McL|McD|McU|McR| | |Return |
|
|
||||||
* |-----------------------------------------------------------|
|
|
||||||
* |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | |
|
|
||||||
* `-----------------------------------------------------------'
|
|
||||||
* |Gui |Alt |Mb1 |Alt | |
|
|
||||||
* `--------------------------------------------'
|
|
||||||
* Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel
|
|
||||||
*/
|
|
||||||
KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
|
|
||||||
TAB, TRNS,TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_U,WH_R,TRNS,TRNS,TRNS,BSPC, \
|
|
||||||
LCTL,TRNS,ACL0,ACL1,ACL2,TRNS,MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \
|
|
||||||
LSFT,TRNS,TRNS,TRNS,TRNS,BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,TRNS, \
|
|
||||||
LGUI,LALT, BTN1, RALT,TRNS),
|
|
||||||
};
|
|
||||||
|
|
||||||
static const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
ACTION_LAYER_MOMENTARY(1), // FN0
|
/* BASE Level: Default Layer
|
||||||
ACTION_LAYER_TAP_KEY(2, KC_SCLN), // FN1
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
ACTION_LAYER_TOGGLE(2), // FN2
|
* | 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 | , | . | / | Shift | fn |
|
||||||
|
* +-----------------------------------------------------------------------------------------+
|
||||||
|
* | Gui | Alt | Space | AltGr |Mouse|
|
||||||
|
* `----------------------------------------------------------------´
|
||||||
|
*/
|
||||||
|
[BASE] = 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_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, MO(MOUSE)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del|
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | |
|
||||||
|
* +-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | Stop | |
|
||||||
|
* `----------------------------------------------------------------´
|
||||||
|
*/
|
||||||
|
[FN] = KEYMAP(
|
||||||
|
KC_PWR, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* MOUSE Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | WUp | | | | | | | | Btn1| Up | Btn2| |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | WLt | WDn | WRt | | | | | | | Left |Right| |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | Btn3| Down| | |
|
||||||
|
* +-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | |
|
||||||
|
* `----------------------------------------------------------------´
|
||||||
|
*/
|
||||||
|
[MOUSE] = 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, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## 1. Keycode
|
## 1. Keycode
|
||||||
See [`common/keycode.h`](../common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
|
See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range.
|
||||||
|
|
||||||
***In `KEYMAP()` macro you should omit prefix part `KC_` of keycode to keep keymap compact.*** For example, just use `A` instead you place `KC_A` in `KEYMAP()`. Some keycodes has 4-letter **short name** in addition to descriptive name, you'll prefer short one in `KEYMAP()`.
|
Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
|
||||||
|
|
||||||
|
keymaps[]
|
||||||
|
|
||||||
|
In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`. But this doesn't apply for QMK.
|
||||||
|
|
||||||
|
The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection.
|
||||||
|
|
||||||
|
Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`.
|
||||||
|
|
||||||
### 1.0 Other key
|
### 1.0 Other key
|
||||||
- `KC_NO` for no action
|
- `KC_NO` for no action
|
||||||
@@ -192,7 +246,10 @@ There are 8 modifiers which has discrimination between left and right.
|
|||||||
- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
|
- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
|
||||||
|
|
||||||
### 1.5 Fn key
|
### 1.5 Fn key
|
||||||
`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.***
|
You don't need to use this functionality under QMK since this is a backward compatibility functionality. Unlike TMK, you can write action code itself directly in **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc.
|
||||||
|
|
||||||
|
`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.***
|
||||||
|
|
||||||
|
|
||||||
### 1.6 Keycode Table
|
### 1.6 Keycode Table
|
||||||
See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
|
See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
|
||||||
@@ -584,15 +641,11 @@ Similar to layer tap toggle, this works as a momentary modifier when holding, bu
|
|||||||
|
|
||||||
|
|
||||||
## 5. Legacy Keymap
|
## 5. Legacy Keymap
|
||||||
This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.***
|
In QMK, `tmk_core/common/keymap.c` is missing and its replacement `quantum/keymap_common.c` lacks Legacy Keymap support.
|
||||||
|
|
||||||
To enable Legacy Keymap support define this macro in `config.h`.
|
|
||||||
|
|
||||||
#define USE_LEGACY_KEYMAP
|
|
||||||
|
|
||||||
Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
|
Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
|
||||||
|
|
||||||
In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
|
In the following legacy keymap setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
|
||||||
|
|
||||||
static const uint8_t PROGMEM fn_layer[] = {
|
static const uint8_t PROGMEM fn_layer[] = {
|
||||||
1, // Fn0
|
1, // Fn0
|
||||||
@@ -606,6 +659,7 @@ In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2
|
|||||||
KC_SPC, // Fn2
|
KC_SPC, // Fn2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Under QMK, these can be realized using action code ACTION_LAYER_TAP_KEY(1, KC_NO), ACTION_LAYER_TAP_KEY(2, KC_NO), and ACTION_LAYER_TAP_KEY(2, KC_SPC) in the `keymaps` directly.
|
||||||
|
|
||||||
## 6. Terminology
|
## 6. Terminology
|
||||||
***TBD***
|
***TBD***
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_QW] = { /* Qwerty */
|
[_QW] = { /* Qwerty */
|
||||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
|
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
|
||||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
|
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
|
||||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
|
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
|
||||||
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
|
{KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* ! @ up { } || pgup 7 8 9 *
|
* ! @ up { } || pgup 7 8 9 *
|
||||||
@@ -27,8 +27,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_RS] = { /* [> RAISE <] */
|
[_RS] = { /* [> RAISE <] */
|
||||||
{KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
{KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
|
||||||
{KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
{KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
|
||||||
{KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LALT, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS},
|
{KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS},
|
||||||
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
|
{TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* insert home up end pgup || up F7 F8 F9 F10
|
* insert home up end pgup || up F7 F8 F9 F10
|
||||||
@@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_LW] = { /* [> LOWER <] */
|
[_LW] = { /* [> LOWER <] */
|
||||||
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
|
{KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||||
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
|
{KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||||
{KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
{KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LCTL, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||||
{KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS}
|
{KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS}
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# The Easy Way
|
# The Easy Way
|
||||||
|
|
||||||
If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood.
|
If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood.
|
||||||
|
|
||||||
If you can find firmware someone else has made that does what you want, that
|
If you can find firmware someone else has made that does what you want, that
|
||||||
is the easiest way to customize your ErgoDox. It requires no programming
|
is the easiest way to customize your ErgoDox. It requires no programming
|
||||||
@@ -69,12 +69,16 @@ files. Check them out with:
|
|||||||
|
|
||||||
The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html).
|
The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html).
|
||||||
|
|
||||||
Linux users need to modify udev rules as described on the Teensy Linux page.
|
Linux users need to modify udev rules as described on the [Teensy
|
||||||
Some distributions provide a binary, maybe called `teensy-loader-cli`).
|
Linux page]. Some distributions provide a binary, maybe called
|
||||||
|
`teensy-loader-cli`.
|
||||||
|
|
||||||
|
[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html
|
||||||
|
|
||||||
To flash the firmware:
|
To flash the firmware:
|
||||||
|
|
||||||
- Build the firmware with `make keymapname`, for example `make default`
|
- Build the firmware with `make keymapname`, for example `make default`
|
||||||
|
|
||||||
- This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g.
|
- This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g.
|
||||||
`ergodox_ez_default.hex`
|
`ergodox_ez_default.hex`
|
||||||
|
|
||||||
@@ -87,6 +91,15 @@ To flash the firmware:
|
|||||||
|
|
||||||
- Click the button in the Teensy app to download the firmware.
|
- Click the button in the Teensy app to download the firmware.
|
||||||
|
|
||||||
|
To flash with ´teensy-loader-cli´:
|
||||||
|
|
||||||
|
- Build the firmware with `make keymapname`, for example `make default`
|
||||||
|
|
||||||
|
- Run ´<path/to/>teensy_loader_cli --mcu=atmega32u4 -w ergodox_ez_<keymap>.hex´
|
||||||
|
|
||||||
|
- Press the Reset button by inserting a paperclip gently into the reset hole
|
||||||
|
in the top right corder.
|
||||||
|
|
||||||
## ErgoDox Infinity
|
## ErgoDox Infinity
|
||||||
|
|
||||||
The Infinity is two completely independent keyboards, and needs to be flashed
|
The Infinity is two completely independent keyboards, and needs to be flashed
|
||||||
|
|||||||
@@ -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 <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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
|
||||||
@@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* MOVE
|
/* MOVE
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc |
|
* | H(F7)| H(F8)| H(6) | H(5) | H(4) | H(F9)|H(F10)| Home | Up | End | H(A) | Esc |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del |
|
* | H(F3)| H(F4)| H(3) | H(2) | H(1) | H(F5)| H(F6)| Left | Down | Right| Caps | Del |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | |
|
* | | H(0) | H(9) | H(8) | H(7) | H(F1)| H(F2)| Pg Dn| Pg Up|H(F11)|H(F12)| |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | |
|
* | | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_MOVE] = {
|
[_MOVE] = {
|
||||||
{H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),H(KC_8), KC_HOME, KC_UP, KC_END, H(KC_7), KC_ESC },
|
{H(KC_F7),H(KC_F8),H(KC_6), H(KC_5), H(KC_4), H(KC_F9),H(KC_F10),KC_HOME,KC_UP, KC_END, H(KC_A), KC_ESC },
|
||||||
{H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),H(KC_9),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
|
{H(KC_F3),H(KC_F4),H(KC_3), H(KC_2), H(KC_1), H(KC_F5),H(KC_F6),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
|
||||||
{_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), H(KC_A), KC_PGDN, KC_PGUP, H(KC_5), H(KC_6), _______},
|
{_______, H(KC_0), H(KC_9), H(KC_8), H(KC_7), H(KC_F1),H(KC_F2),KC_PGDN,KC_PGUP,H(KC_F11),H(KC_F12),_______},
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -14,4 +14,27 @@
|
|||||||
#define RGBLIGHT_HUE_STEP 10
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
#define RGBLIGHT_SAT_STEP 17
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
#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
|
||||||
@@ -6,4 +6,27 @@
|
|||||||
#define FORCE_NKRO
|
#define FORCE_NKRO
|
||||||
#define WORKMAN_SOUND COLEMAK_SOUND
|
#define WORKMAN_SOUND COLEMAK_SOUND
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
#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
|
||||||
@@ -20,4 +20,27 @@
|
|||||||
sei(); \
|
sei(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
#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 @@
|
|||||||
|
# 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 <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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,447 @@
|
|||||||
|
#ifndef ZACH_COMMON_FUNCTIONS
|
||||||
|
#define ZACH_COMMON_FUNCTIONS
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "keymap_colemak.h"
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
#define C(n) RCTL(n)
|
||||||
|
#define CADKEY RCTL(RALT(KC_DEL))
|
||||||
|
|
||||||
|
void tap(uint16_t keycode){
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer){
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Automatic number generation of important keywords
|
||||||
|
enum my_keycodes{
|
||||||
|
// Layer numbers
|
||||||
|
_COLEMAK = 0,
|
||||||
|
_SWCOLE,
|
||||||
|
_RAISE,
|
||||||
|
_LOWER,
|
||||||
|
_ADJUST,
|
||||||
|
_UNICODES,
|
||||||
|
// These use process_record_user()
|
||||||
|
COLEMAK = SAFE_RANGE,
|
||||||
|
SWCOLE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
SHFT_CAP,
|
||||||
|
CTRLB,
|
||||||
|
CPYPST,
|
||||||
|
FACE,
|
||||||
|
UNIWIN,
|
||||||
|
UNILIN,
|
||||||
|
DISFACE,
|
||||||
|
TFLIP,
|
||||||
|
TPUT,
|
||||||
|
SHRUG,
|
||||||
|
RANDIG,
|
||||||
|
// Tap_Dance nums
|
||||||
|
RAI = 0,
|
||||||
|
LOW,
|
||||||
|
SUP
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
float tone_swcole[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||||
|
float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||||
|
float tone_ctrl_mod[][2] = SONG(COIN_SOUND);
|
||||||
|
float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
|
||||||
|
float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
|
||||||
|
float uniwin[][2] = SONG(UNICODE_WINDOWS);
|
||||||
|
float unilin[][2] = SONG(UNICODE_LINUX);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TAP_DANCE_ENABLE
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap
|
||||||
|
switch(state->count){ // Only turn the layer on once
|
||||||
|
case 1:
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
|
||||||
|
switch(state->count){
|
||||||
|
case 1: // Normal action. Turn off layers
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap
|
||||||
|
switch(state->count){
|
||||||
|
case 1: // Turn on lower
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
|
||||||
|
switch(state->count){
|
||||||
|
case 1: // Normal action. Turn off layers
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
break;
|
||||||
|
case 2: // Turn on _UNICODES layer
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
layer_on(_UNICODES);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down
|
||||||
|
if(state->count == 1){
|
||||||
|
register_code(KC_LGUI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout
|
||||||
|
switch(state->count){
|
||||||
|
case 2:
|
||||||
|
register_code(KC_LGUI);
|
||||||
|
tap(KC_L);
|
||||||
|
unregister_code(KC_LGUI);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up
|
||||||
|
unregister_code(KC_LGUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift),
|
||||||
|
[LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift),
|
||||||
|
[SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#ifdef UNICODE_ENABLE
|
||||||
|
// Unicode shortcuts
|
||||||
|
#define IBANG X(0x203D)
|
||||||
|
#define RAROW X(0x2192)
|
||||||
|
#define LAROW X(0x2190)
|
||||||
|
#define DEGREE X(0x00B0)
|
||||||
|
#define OMEGA X(0x03A9)
|
||||||
|
#define WOMEGA X(0x03C9)
|
||||||
|
#define MICRO X(0x00B5)
|
||||||
|
#define PLUMIN X(0x00B1)
|
||||||
|
#define SUPA2 X(0x00B2)
|
||||||
|
#define ROMAN1 X(0x2160)
|
||||||
|
#define ROMAN2 X(0x2161)
|
||||||
|
#define ROMAN3 X(0x2162)
|
||||||
|
#define ROMAN4 X(0x2163)
|
||||||
|
#define ROMAN5 X(0x2164)
|
||||||
|
#define ROMAN6 X(0x2165)
|
||||||
|
#define ROMAN7 X(0x2166)
|
||||||
|
#define roman1 X(0x2170)
|
||||||
|
#define roman2 X(0x2171)
|
||||||
|
#define roman3 X(0x2172)
|
||||||
|
#define roman4 X(0x2173)
|
||||||
|
#define roman5 X(0x2174)
|
||||||
|
#define roman6 X(0x2175)
|
||||||
|
#define roman7 X(0x2176)
|
||||||
|
|
||||||
|
#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X(<unicode>)
|
||||||
|
enum Ext_Unicode{
|
||||||
|
PENGUIN = 0,
|
||||||
|
BOAR,
|
||||||
|
MONKEY,
|
||||||
|
DRAGON,
|
||||||
|
CHICK,
|
||||||
|
TUMBLER
|
||||||
|
};
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
[PENGUIN] = 0x1F427,
|
||||||
|
[BOAR] = 0x1F417,
|
||||||
|
[MONKEY] = 0x1F412,
|
||||||
|
[DRAGON] = 0x1F409,
|
||||||
|
[CHICK] = 0x1F425,
|
||||||
|
[TUMBLER] = 0x1F943
|
||||||
|
};
|
||||||
|
#define PENGY X(PENGUIN)
|
||||||
|
#define BOARY X(BOAR)
|
||||||
|
#define MNKY X(MONKEY)
|
||||||
|
#define DRGN X(DRAGON)
|
||||||
|
#define DUCK X(CHICK)
|
||||||
|
#define TMBL X(TUMBLER)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
static uint16_t key_timer;
|
||||||
|
static uint8_t caps_status = 0;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case COLEMAK:
|
||||||
|
if(record->event.pressed){
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SWCOLE:
|
||||||
|
if(record->event.pressed){
|
||||||
|
persistant_default_layer_set(1UL<<_SWCOLE);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_swcole, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
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 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 SHFT_CAP:
|
||||||
|
if(record->event.pressed){
|
||||||
|
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||||
|
register_code(KC_LSHIFT);
|
||||||
|
} else { // this means the key was just released (tap or "held down")
|
||||||
|
if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap.
|
||||||
|
tap(KC_CAPS);
|
||||||
|
if(caps_status == 0){
|
||||||
|
caps_status = 1;
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_capslock_on, false, 0);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
caps_status = 0;
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_capslock_off, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unregister_code(KC_LSHIFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case CTRLB: // Control-B on tap (bold)
|
||||||
|
if(record->event.pressed){
|
||||||
|
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
} else { // this means the key was just released (tap or "held down")
|
||||||
|
if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap.
|
||||||
|
tap(KC_B);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
|
||||||
|
#endif
|
||||||
|
#ifdef BACKLIGHT_BREATHING
|
||||||
|
breathing_speed_set(2);
|
||||||
|
breathing_pulse();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case CPYPST: // One key copy/paste
|
||||||
|
if(record->event.pressed){
|
||||||
|
key_timer = timer_read();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed(key_timer) > 152) { // Hold, copy
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
tap(KC_C);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_copy, false, 0);
|
||||||
|
#endif
|
||||||
|
} else { // Tap, paste
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
tap(KC_V);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_paste, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
#ifdef UNICODE_ENABLE
|
||||||
|
case UNIWIN:
|
||||||
|
if(record->event.pressed){
|
||||||
|
set_unicode_input_mode(UC_WIN);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(uniwin, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case UNILIN:
|
||||||
|
if(record->event.pressed){
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(unilin, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DISFACE: // ಠ_ಠ
|
||||||
|
if(record->event.pressed){
|
||||||
|
process_unicode((0x0CA0|QK_UNICODE), record); // Eye
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_MINS);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x0CA0|QK_UNICODE), record); // Eye
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TFLIP: // (╯°□°)╯ ︵ ┻━┻
|
||||||
|
if(record->event.pressed){
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_9);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x256F|QK_UNICODE), record); // Arm
|
||||||
|
process_unicode((0x00B0|QK_UNICODE), record); // Eye
|
||||||
|
process_unicode((0x25A1|QK_UNICODE), record); // Mouth
|
||||||
|
process_unicode((0x00B0|QK_UNICODE), record); // Eye
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_0);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x256F|QK_UNICODE), record); // Arm
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x0361|QK_UNICODE), record); // Flippy
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x253B|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x2501|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x253B|QK_UNICODE), record); // Table
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TPUT: // ┬──┬ ノ( ゜-゜ノ)
|
||||||
|
if(record->event.pressed){
|
||||||
|
process_unicode((0x252C|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x2500|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x2500|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x252C|QK_UNICODE), record); // Table
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x30CE|QK_UNICODE), record); // Arm
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_9);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x309C|QK_UNICODE), record); // Eye
|
||||||
|
tap(KC_MINS);
|
||||||
|
process_unicode((0x309C|QK_UNICODE), record); // Eye
|
||||||
|
process_unicode((0x30CE|QK_UNICODE), record); // Arm
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_0);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SHRUG: // ¯\_(ツ)_/¯
|
||||||
|
if(record->event.pressed){
|
||||||
|
process_unicode((0x00AF|QK_UNICODE), record); // Hand
|
||||||
|
tap(KC_BSLS); // Arm
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_UNDS); // Arm
|
||||||
|
tap(KC_LPRN); // Head
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x30C4|QK_UNICODE), record); // Face
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_RPRN); // Head
|
||||||
|
tap(KC_UNDS); // Arm
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap(KC_SLSH); // Arm
|
||||||
|
process_unicode((0x00AF|QK_UNICODE), record); // Hand
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case FACE: // (o_O)
|
||||||
|
if(record->event.pressed){
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_LPRN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap(KC_O);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_UNDS);
|
||||||
|
tap(KC_O);
|
||||||
|
tap(KC_RPRN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RANDIG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
tap_random_base64();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void){ // Run once at startup
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
_delay_ms(50); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
void play_goodbye_tone(void){
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user(){
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void){ // Run when the music layer is turned on
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_off_user(void){ // Run when music is turned off
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#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 @@
|
|||||||
|
# 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 <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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,447 @@
|
|||||||
|
#ifndef ZACH_COMMON_FUNCTIONS
|
||||||
|
#define ZACH_COMMON_FUNCTIONS
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "keymap_colemak.h"
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
#define C(n) RCTL(n)
|
||||||
|
#define CADKEY RCTL(RALT(KC_DEL))
|
||||||
|
|
||||||
|
void tap(uint16_t keycode){
|
||||||
|
register_code(keycode);
|
||||||
|
unregister_code(keycode);
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer){
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Automatic number generation of important keywords
|
||||||
|
enum my_keycodes{
|
||||||
|
// Layer numbers
|
||||||
|
_COLEMAK = 0,
|
||||||
|
_SWCOLE,
|
||||||
|
_RAISE,
|
||||||
|
_LOWER,
|
||||||
|
_ADJUST,
|
||||||
|
_UNICODES,
|
||||||
|
// These use process_record_user()
|
||||||
|
COLEMAK = SAFE_RANGE,
|
||||||
|
SWCOLE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
SHFT_CAP,
|
||||||
|
CTRLB,
|
||||||
|
CPYPST,
|
||||||
|
FACE,
|
||||||
|
UNIWIN,
|
||||||
|
UNILIN,
|
||||||
|
DISFACE,
|
||||||
|
TFLIP,
|
||||||
|
TPUT,
|
||||||
|
SHRUG,
|
||||||
|
RANDIG,
|
||||||
|
// Tap_Dance nums
|
||||||
|
RAI = 0,
|
||||||
|
LOW,
|
||||||
|
SUP
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||||
|
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
float tone_swcole[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||||
|
float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||||
|
float tone_ctrl_mod[][2] = SONG(COIN_SOUND);
|
||||||
|
float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
|
||||||
|
float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
|
||||||
|
float uniwin[][2] = SONG(UNICODE_WINDOWS);
|
||||||
|
float unilin[][2] = SONG(UNICODE_LINUX);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TAP_DANCE_ENABLE
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap
|
||||||
|
switch(state->count){ // Only turn the layer on once
|
||||||
|
case 1:
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
|
||||||
|
switch(state->count){
|
||||||
|
case 1: // Normal action. Turn off layers
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap
|
||||||
|
switch(state->count){
|
||||||
|
case 1: // Turn on lower
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
|
||||||
|
switch(state->count){
|
||||||
|
case 1: // Normal action. Turn off layers
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
layer_off(_UNICODES);
|
||||||
|
break;
|
||||||
|
case 2: // Turn on _UNICODES layer
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
layer_on(_UNICODES);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down
|
||||||
|
if(state->count == 1){
|
||||||
|
register_code(KC_LGUI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout
|
||||||
|
switch(state->count){
|
||||||
|
case 2:
|
||||||
|
register_code(KC_LGUI);
|
||||||
|
tap(KC_L);
|
||||||
|
unregister_code(KC_LGUI);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up
|
||||||
|
unregister_code(KC_LGUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift),
|
||||||
|
[LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift),
|
||||||
|
[SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift)
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#ifdef UNICODE_ENABLE
|
||||||
|
// Unicode shortcuts
|
||||||
|
#define IBANG X(0x203D)
|
||||||
|
#define RAROW X(0x2192)
|
||||||
|
#define LAROW X(0x2190)
|
||||||
|
#define DEGREE X(0x00B0)
|
||||||
|
#define OMEGA X(0x03A9)
|
||||||
|
#define WOMEGA X(0x03C9)
|
||||||
|
#define MICRO X(0x00B5)
|
||||||
|
#define PLUMIN X(0x00B1)
|
||||||
|
#define SUPA2 X(0x00B2)
|
||||||
|
#define ROMAN1 X(0x2160)
|
||||||
|
#define ROMAN2 X(0x2161)
|
||||||
|
#define ROMAN3 X(0x2162)
|
||||||
|
#define ROMAN4 X(0x2163)
|
||||||
|
#define ROMAN5 X(0x2164)
|
||||||
|
#define ROMAN6 X(0x2165)
|
||||||
|
#define ROMAN7 X(0x2166)
|
||||||
|
#define roman1 X(0x2170)
|
||||||
|
#define roman2 X(0x2171)
|
||||||
|
#define roman3 X(0x2172)
|
||||||
|
#define roman4 X(0x2173)
|
||||||
|
#define roman5 X(0x2174)
|
||||||
|
#define roman6 X(0x2175)
|
||||||
|
#define roman7 X(0x2176)
|
||||||
|
|
||||||
|
#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X(<unicode>)
|
||||||
|
enum Ext_Unicode{
|
||||||
|
PENGUIN = 0,
|
||||||
|
BOAR,
|
||||||
|
MONKEY,
|
||||||
|
DRAGON,
|
||||||
|
CHICK,
|
||||||
|
TUMBLER
|
||||||
|
};
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
[PENGUIN] = 0x1F427,
|
||||||
|
[BOAR] = 0x1F417,
|
||||||
|
[MONKEY] = 0x1F412,
|
||||||
|
[DRAGON] = 0x1F409,
|
||||||
|
[CHICK] = 0x1F425,
|
||||||
|
[TUMBLER] = 0x1F943
|
||||||
|
};
|
||||||
|
#define PENGY X(PENGUIN)
|
||||||
|
#define BOARY X(BOAR)
|
||||||
|
#define MNKY X(MONKEY)
|
||||||
|
#define DRGN X(DRAGON)
|
||||||
|
#define DUCK X(CHICK)
|
||||||
|
#define TMBL X(TUMBLER)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
static uint16_t key_timer;
|
||||||
|
static uint8_t caps_status = 0;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case COLEMAK:
|
||||||
|
if(record->event.pressed){
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SWCOLE:
|
||||||
|
if(record->event.pressed){
|
||||||
|
persistant_default_layer_set(1UL<<_SWCOLE);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_swcole, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
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 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 SHFT_CAP:
|
||||||
|
if(record->event.pressed){
|
||||||
|
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||||
|
register_code(KC_LSHIFT);
|
||||||
|
} else { // this means the key was just released (tap or "held down")
|
||||||
|
if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap.
|
||||||
|
tap(KC_CAPS);
|
||||||
|
if(caps_status == 0){
|
||||||
|
caps_status = 1;
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_capslock_on, false, 0);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
caps_status = 0;
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_capslock_off, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unregister_code(KC_LSHIFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case CTRLB: // Control-B on tap (bold)
|
||||||
|
if(record->event.pressed){
|
||||||
|
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
} else { // this means the key was just released (tap or "held down")
|
||||||
|
if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap.
|
||||||
|
tap(KC_B);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
|
||||||
|
#endif
|
||||||
|
#ifdef BACKLIGHT_BREATHING
|
||||||
|
breathing_speed_set(2);
|
||||||
|
breathing_pulse();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case CPYPST: // One key copy/paste
|
||||||
|
if(record->event.pressed){
|
||||||
|
key_timer = timer_read();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed(key_timer) > 152) { // Hold, copy
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
tap(KC_C);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_copy, false, 0);
|
||||||
|
#endif
|
||||||
|
} else { // Tap, paste
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
tap(KC_V);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_paste, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
#ifdef UNICODE_ENABLE
|
||||||
|
case UNIWIN:
|
||||||
|
if(record->event.pressed){
|
||||||
|
set_unicode_input_mode(UC_WIN);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(uniwin, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case UNILIN:
|
||||||
|
if(record->event.pressed){
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(unilin, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DISFACE: // ಠ_ಠ
|
||||||
|
if(record->event.pressed){
|
||||||
|
process_unicode((0x0CA0|QK_UNICODE), record); // Eye
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_MINS);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x0CA0|QK_UNICODE), record); // Eye
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TFLIP: // (╯°□°)╯ ︵ ┻━┻
|
||||||
|
if(record->event.pressed){
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_9);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x256F|QK_UNICODE), record); // Arm
|
||||||
|
process_unicode((0x00B0|QK_UNICODE), record); // Eye
|
||||||
|
process_unicode((0x25A1|QK_UNICODE), record); // Mouth
|
||||||
|
process_unicode((0x00B0|QK_UNICODE), record); // Eye
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_0);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x256F|QK_UNICODE), record); // Arm
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x0361|QK_UNICODE), record); // Flippy
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x253B|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x2501|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x253B|QK_UNICODE), record); // Table
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TPUT: // ┬──┬ ノ( ゜-゜ノ)
|
||||||
|
if(record->event.pressed){
|
||||||
|
process_unicode((0x252C|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x2500|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x2500|QK_UNICODE), record); // Table
|
||||||
|
process_unicode((0x252C|QK_UNICODE), record); // Table
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x30CE|QK_UNICODE), record); // Arm
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_9);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap(KC_SPC);
|
||||||
|
process_unicode((0x309C|QK_UNICODE), record); // Eye
|
||||||
|
tap(KC_MINS);
|
||||||
|
process_unicode((0x309C|QK_UNICODE), record); // Eye
|
||||||
|
process_unicode((0x30CE|QK_UNICODE), record); // Arm
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_0);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SHRUG: // ¯\_(ツ)_/¯
|
||||||
|
if(record->event.pressed){
|
||||||
|
process_unicode((0x00AF|QK_UNICODE), record); // Hand
|
||||||
|
tap(KC_BSLS); // Arm
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_UNDS); // Arm
|
||||||
|
tap(KC_LPRN); // Head
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
process_unicode((0x30C4|QK_UNICODE), record); // Face
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_RPRN); // Head
|
||||||
|
tap(KC_UNDS); // Arm
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap(KC_SLSH); // Arm
|
||||||
|
process_unicode((0x00AF|QK_UNICODE), record); // Hand
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case FACE: // (o_O)
|
||||||
|
if(record->event.pressed){
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_LPRN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
tap(KC_O);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
tap(KC_UNDS);
|
||||||
|
tap(KC_O);
|
||||||
|
tap(KC_RPRN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RANDIG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
tap_random_base64();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void){ // Run once at startup
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
_delay_ms(50); // gets rid of tick
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
void play_goodbye_tone(void){
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shutdown_user(){
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
_delay_ms(150);
|
||||||
|
stop_all_notes();
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_on_user(void){ // Run when the music layer is turned on
|
||||||
|
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void music_off_user(void){ // Run when music is turned off
|
||||||
|
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -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 <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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,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,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.
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2015 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// Simple analog to digitial conversion
|
// Simple analog to digitial conversion
|
||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2015 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _analog_h_included__
|
#ifndef _analog_h_included__
|
||||||
#define _analog_h_included__
|
#define _analog_h_included__
|
||||||
|
|
||||||
|
|||||||
+17
-1
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 "api.h"
|
#include "api.h"
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
@@ -176,4 +192,4 @@ void process_api(uint16_t length, uint8_t * data) {
|
|||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+17
-1
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 _API_H_
|
#ifndef _API_H_
|
||||||
#define _API_H_
|
#define _API_H_
|
||||||
|
|
||||||
@@ -56,4 +72,4 @@ bool process_api_keyboard(uint8_t length, uint8_t * data);
|
|||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
bool process_api_user(uint8_t length, uint8_t * data);
|
bool process_api_user(uint8_t length, uint8_t * data);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Jack Humbert, Fred Sundvik
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 "api_sysex.h"
|
#include "api_sysex.h"
|
||||||
#include "sysex_tools.h"
|
#include "sysex_tools.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
|
|||||||
+17
-1
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 _API_SYSEX_H_
|
#ifndef _API_SYSEX_H_
|
||||||
#define _API_SYSEX_H_
|
#define _API_SYSEX_H_
|
||||||
|
|
||||||
@@ -7,4 +23,4 @@ void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes,
|
|||||||
|
|
||||||
#define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l)
|
#define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
+165
-144
@@ -1,3 +1,18 @@
|
|||||||
|
/* 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 <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include <math.h>
|
//#include <math.h>
|
||||||
@@ -89,15 +104,15 @@ void audio_init()
|
|||||||
}
|
}
|
||||||
audio_config.raw = eeconfig_read_audio();
|
audio_config.raw = eeconfig_read_audio();
|
||||||
|
|
||||||
// Set port PC6 (OC3A and /OC4A) as output
|
// Set port PC6 (OC3A and /OC4A) as output
|
||||||
DDRC |= _BV(PORTC6);
|
DDRC |= _BV(PORTC6);
|
||||||
|
|
||||||
DISABLE_AUDIO_COUNTER_3_ISR;
|
DISABLE_AUDIO_COUNTER_3_ISR;
|
||||||
|
|
||||||
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
|
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
|
||||||
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
|
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
|
||||||
// Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
|
// Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
|
||||||
// Clock Select (CS3n) = 0b010 = Clock / 8
|
// Clock Select (CS3n) = 0b010 = Clock / 8
|
||||||
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
|
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
|
||||||
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
|
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
|
||||||
|
|
||||||
@@ -106,6 +121,8 @@ void audio_init()
|
|||||||
|
|
||||||
void stop_all_notes()
|
void stop_all_notes()
|
||||||
{
|
{
|
||||||
|
dprintf("audio stop all notes");
|
||||||
|
|
||||||
if (!audio_initialized) {
|
if (!audio_initialized) {
|
||||||
audio_init();
|
audio_init();
|
||||||
}
|
}
|
||||||
@@ -128,6 +145,8 @@ void stop_all_notes()
|
|||||||
|
|
||||||
void stop_note(float freq)
|
void stop_note(float freq)
|
||||||
{
|
{
|
||||||
|
dprintf("audio stop note freq=%d", (int)freq);
|
||||||
|
|
||||||
if (playing_note) {
|
if (playing_note) {
|
||||||
if (!audio_initialized) {
|
if (!audio_initialized) {
|
||||||
audio_init();
|
audio_init();
|
||||||
@@ -183,159 +202,161 @@ float vibrato(float average_freq) {
|
|||||||
|
|
||||||
ISR(TIMER3_COMPA_vect)
|
ISR(TIMER3_COMPA_vect)
|
||||||
{
|
{
|
||||||
float freq;
|
float freq;
|
||||||
|
|
||||||
if (playing_note) {
|
if (playing_note) {
|
||||||
if (voices > 0) {
|
if (voices > 0) {
|
||||||
if (polyphony_rate > 0) {
|
if (polyphony_rate > 0) {
|
||||||
if (voices > 1) {
|
if (voices > 1) {
|
||||||
voice_place %= voices;
|
voice_place %= voices;
|
||||||
if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) {
|
if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) {
|
||||||
voice_place = (voice_place + 1) % voices;
|
voice_place = (voice_place + 1) % voices;
|
||||||
place = 0.0;
|
place = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VIBRATO_ENABLE
|
#ifdef VIBRATO_ENABLE
|
||||||
if (vibrato_strength > 0) {
|
if (vibrato_strength > 0) {
|
||||||
freq = vibrato(frequencies[voice_place]);
|
freq = vibrato(frequencies[voice_place]);
|
||||||
} else {
|
} else {
|
||||||
freq = frequencies[voice_place];
|
freq = frequencies[voice_place];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
freq = frequencies[voice_place];
|
freq = frequencies[voice_place];
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (glissando) {
|
if (glissando) {
|
||||||
if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
|
if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
|
||||||
frequency = frequency * pow(2, 440/frequency/12/2);
|
frequency = frequency * pow(2, 440/frequency/12/2);
|
||||||
} else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) {
|
} else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) {
|
||||||
frequency = frequency * pow(2, -440/frequency/12/2);
|
frequency = frequency * pow(2, -440/frequency/12/2);
|
||||||
} else {
|
} else {
|
||||||
frequency = frequencies[voices - 1];
|
frequency = frequencies[voices - 1];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
frequency = frequencies[voices - 1];
|
frequency = frequencies[voices - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VIBRATO_ENABLE
|
#ifdef VIBRATO_ENABLE
|
||||||
if (vibrato_strength > 0) {
|
if (vibrato_strength > 0) {
|
||||||
freq = vibrato(frequency);
|
freq = vibrato(frequency);
|
||||||
} else {
|
} else {
|
||||||
freq = frequency;
|
freq = frequency;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
freq = frequency;
|
freq = frequency;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (envelope_index < 65535) {
|
if (envelope_index < 65535) {
|
||||||
envelope_index++;
|
envelope_index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
freq = voice_envelope(freq);
|
freq = voice_envelope(freq);
|
||||||
|
|
||||||
if (freq < 30.517578125) {
|
if (freq < 30.517578125) {
|
||||||
freq = 30.52;
|
freq = 30.52;
|
||||||
}
|
}
|
||||||
|
|
||||||
TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
|
TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
|
||||||
TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
|
TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playing_notes) {
|
if (playing_notes) {
|
||||||
if (note_frequency > 0) {
|
if (note_frequency > 0) {
|
||||||
#ifdef VIBRATO_ENABLE
|
#ifdef VIBRATO_ENABLE
|
||||||
if (vibrato_strength > 0) {
|
if (vibrato_strength > 0) {
|
||||||
freq = vibrato(note_frequency);
|
freq = vibrato(note_frequency);
|
||||||
} else {
|
} else {
|
||||||
freq = note_frequency;
|
freq = note_frequency;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
freq = note_frequency;
|
freq = note_frequency;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (envelope_index < 65535) {
|
if (envelope_index < 65535) {
|
||||||
envelope_index++;
|
envelope_index++;
|
||||||
}
|
}
|
||||||
freq = voice_envelope(freq);
|
freq = voice_envelope(freq);
|
||||||
|
|
||||||
TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
|
TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
|
||||||
TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
|
TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
|
||||||
} else {
|
} else {
|
||||||
TIMER_3_PERIOD = 0;
|
TIMER_3_PERIOD = 0;
|
||||||
TIMER_3_DUTY_CYCLE = 0;
|
TIMER_3_DUTY_CYCLE = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
note_position++;
|
note_position++;
|
||||||
bool end_of_note = false;
|
bool end_of_note = false;
|
||||||
if (TIMER_3_PERIOD > 0) {
|
if (TIMER_3_PERIOD > 0) {
|
||||||
end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF));
|
end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF));
|
||||||
} else {
|
} else {
|
||||||
end_of_note = (note_position >= (note_length * 0x7FF));
|
end_of_note = (note_position >= (note_length * 0x7FF));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end_of_note) {
|
if (end_of_note) {
|
||||||
current_note++;
|
current_note++;
|
||||||
if (current_note >= notes_count) {
|
if (current_note >= notes_count) {
|
||||||
if (notes_repeat) {
|
if (notes_repeat) {
|
||||||
current_note = 0;
|
current_note = 0;
|
||||||
} else {
|
} else {
|
||||||
DISABLE_AUDIO_COUNTER_3_ISR;
|
DISABLE_AUDIO_COUNTER_3_ISR;
|
||||||
DISABLE_AUDIO_COUNTER_3_OUTPUT;
|
DISABLE_AUDIO_COUNTER_3_OUTPUT;
|
||||||
playing_notes = false;
|
playing_notes = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!note_resting && (notes_rest > 0)) {
|
if (!note_resting && (notes_rest > 0)) {
|
||||||
note_resting = true;
|
note_resting = true;
|
||||||
note_frequency = 0;
|
note_frequency = 0;
|
||||||
note_length = notes_rest;
|
note_length = notes_rest;
|
||||||
current_note--;
|
current_note--;
|
||||||
} else {
|
} else {
|
||||||
note_resting = false;
|
note_resting = false;
|
||||||
envelope_index = 0;
|
envelope_index = 0;
|
||||||
note_frequency = (*notes_pointer)[current_note][0];
|
note_frequency = (*notes_pointer)[current_note][0];
|
||||||
note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
|
note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
note_position = 0;
|
note_position = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!audio_config.enable) {
|
if (!audio_config.enable) {
|
||||||
playing_notes = false;
|
playing_notes = false;
|
||||||
playing_note = false;
|
playing_note = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void play_note(float freq, int vol) {
|
void play_note(float freq, int vol) {
|
||||||
|
|
||||||
|
dprintf("audio play note freq=%d vol=%d", (int)freq, vol);
|
||||||
|
|
||||||
if (!audio_initialized) {
|
if (!audio_initialized) {
|
||||||
audio_init();
|
audio_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (audio_config.enable && voices < 8) {
|
if (audio_config.enable && voices < 8) {
|
||||||
DISABLE_AUDIO_COUNTER_3_ISR;
|
DISABLE_AUDIO_COUNTER_3_ISR;
|
||||||
|
|
||||||
// Cancel notes if notes are playing
|
// Cancel notes if notes are playing
|
||||||
if (playing_notes)
|
if (playing_notes)
|
||||||
stop_all_notes();
|
stop_all_notes();
|
||||||
|
|
||||||
playing_note = true;
|
playing_note = true;
|
||||||
|
|
||||||
envelope_index = 0;
|
envelope_index = 0;
|
||||||
|
|
||||||
if (freq > 0) {
|
if (freq > 0) {
|
||||||
frequencies[voices] = freq;
|
frequencies[voices] = freq;
|
||||||
volumes[voices] = vol;
|
volumes[voices] = vol;
|
||||||
voices++;
|
voices++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ENABLE_AUDIO_COUNTER_3_ISR;
|
ENABLE_AUDIO_COUNTER_3_ISR;
|
||||||
ENABLE_AUDIO_COUNTER_3_OUTPUT;
|
ENABLE_AUDIO_COUNTER_3_OUTPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,37 +367,37 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
|
|||||||
audio_init();
|
audio_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (audio_config.enable) {
|
if (audio_config.enable) {
|
||||||
|
|
||||||
DISABLE_AUDIO_COUNTER_3_ISR;
|
DISABLE_AUDIO_COUNTER_3_ISR;
|
||||||
|
|
||||||
// Cancel note if a note is playing
|
// Cancel note if a note is playing
|
||||||
if (playing_note)
|
if (playing_note)
|
||||||
stop_all_notes();
|
stop_all_notes();
|
||||||
|
|
||||||
playing_notes = true;
|
playing_notes = true;
|
||||||
|
|
||||||
notes_pointer = np;
|
notes_pointer = np;
|
||||||
notes_count = n_count;
|
notes_count = n_count;
|
||||||
notes_repeat = n_repeat;
|
notes_repeat = n_repeat;
|
||||||
notes_rest = n_rest;
|
notes_rest = n_rest;
|
||||||
|
|
||||||
place = 0;
|
place = 0;
|
||||||
current_note = 0;
|
current_note = 0;
|
||||||
|
|
||||||
note_frequency = (*notes_pointer)[current_note][0];
|
note_frequency = (*notes_pointer)[current_note][0];
|
||||||
note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
|
note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
|
||||||
note_position = 0;
|
note_position = 0;
|
||||||
|
|
||||||
|
|
||||||
ENABLE_AUDIO_COUNTER_3_ISR;
|
ENABLE_AUDIO_COUNTER_3_ISR;
|
||||||
ENABLE_AUDIO_COUNTER_3_OUTPUT;
|
ENABLE_AUDIO_COUNTER_3_OUTPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_playing_notes(void) {
|
bool is_playing_notes(void) {
|
||||||
return playing_notes;
|
return playing_notes;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_audio_on(void) {
|
bool is_audio_on(void) {
|
||||||
|
|||||||
+16
-1
@@ -1,3 +1,18 @@
|
|||||||
|
/* 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 AUDIO_H
|
#ifndef AUDIO_H
|
||||||
#define AUDIO_H
|
#define AUDIO_H
|
||||||
|
|
||||||
@@ -88,4 +103,4 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
|
|||||||
|
|
||||||
bool is_playing_notes(void);
|
bool is_playing_notes(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* 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 <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include <math.h>
|
//#include <math.h>
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2016 IBNobody
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
|||||||
+17
-1
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2016 IBNobody
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
@@ -12,4 +28,4 @@
|
|||||||
extern const float vibrato_lut[VIBRATO_LUT_LENGTH];
|
extern const float vibrato_lut[VIBRATO_LUT_LENGTH];
|
||||||
extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH];
|
extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH];
|
||||||
|
|
||||||
#endif /* LUTS_H */
|
#endif /* LUTS_H */
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 MUSICAL_NOTES_H
|
#ifndef MUSICAL_NOTES_H
|
||||||
#define MUSICAL_NOTES_H
|
#define MUSICAL_NOTES_H
|
||||||
|
|
||||||
@@ -214,4 +230,4 @@
|
|||||||
#define NOTE_BF8 NOTE_AS8
|
#define NOTE_BF8 NOTE_AS8
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,8 +1,27 @@
|
|||||||
|
/* 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 "musical_notes.h"
|
#include "musical_notes.h"
|
||||||
|
|
||||||
#ifndef SONG_LIST_H
|
#ifndef SONG_LIST_H
|
||||||
#define SONG_LIST_H
|
#define SONG_LIST_H
|
||||||
|
|
||||||
|
#define COIN_SOUND \
|
||||||
|
E__NOTE(_A5 ),\
|
||||||
|
HD_NOTE(_E6 ),
|
||||||
|
|
||||||
#define ODE_TO_JOY \
|
#define ODE_TO_JOY \
|
||||||
Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \
|
Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \
|
||||||
Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \
|
Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \
|
||||||
@@ -122,6 +141,14 @@
|
|||||||
E__NOTE(_E5), \
|
E__NOTE(_E5), \
|
||||||
E__NOTE(_D5),
|
E__NOTE(_D5),
|
||||||
|
|
||||||
|
#define UNICODE_WINDOWS \
|
||||||
|
E__NOTE(_B5), \
|
||||||
|
S__NOTE(_E6),
|
||||||
|
|
||||||
|
#define UNICODE_LINUX \
|
||||||
|
E__NOTE(_E6), \
|
||||||
|
S__NOTE(_B5),
|
||||||
|
|
||||||
#define COIN_SOUND \
|
#define COIN_SOUND \
|
||||||
E__NOTE(_A5 ), \
|
E__NOTE(_A5 ), \
|
||||||
HD_NOTE(_E6 ),
|
HD_NOTE(_E6 ),
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* 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 "voices.h"
|
#include "voices.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
|
|||||||
+16
-1
@@ -1,3 +1,18 @@
|
|||||||
|
/* 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 <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
@@ -32,4 +47,4 @@ void set_voice(voice_type v);
|
|||||||
void voice_iterate(void);
|
void voice_iterate(void);
|
||||||
void voice_deiterate(void);
|
void voice_deiterate(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
+17
-1
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
@@ -262,4 +278,4 @@ const uint8_t sinewave[] PROGMEM= //2048 values
|
|||||||
0x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79,
|
0x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79,
|
||||||
0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7c,0x7c,
|
0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7c,0x7c,
|
||||||
0x7c,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f
|
0x7c,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f
|
||||||
};
|
};
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_DEFINITIONS_H
|
#ifndef CONFIG_DEFINITIONS_H
|
||||||
#define CONFIG_DEFINITIONS_H
|
#define CONFIG_DEFINITIONS_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
|
/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
|
||||||
#ifndef DYNAMIC_MACROS_H
|
#ifndef DYNAMIC_MACROS_H
|
||||||
#define DYNAMIC_MACROS_H
|
#define DYNAMIC_MACROS_H
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 "keycode_config.h"
|
#include "keycode_config.h"
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
@@ -71,4 +87,4 @@ uint16_t keycode_config(uint16_t keycode) {
|
|||||||
default:
|
default:
|
||||||
return keycode;
|
return keycode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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 "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
#include "keycode.h"
|
#include "keycode.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012,2013 Jun Wako <[email protected]>
|
Copyright 2012-2016 Jun Wako <[email protected]>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012,2013 Jun Wako <[email protected]>
|
Copyright 2012-2017 Jun Wako <[email protected]>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Didier Loiseau
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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/>.
|
||||||
|
*/
|
||||||
/* Keymap macros for the French BÉPO layout - http://bepo.fr */
|
/* Keymap macros for the French BÉPO layout - http://bepo.fr */
|
||||||
#ifndef KEYMAP_BEPO_H
|
#ifndef KEYMAP_BEPO_H
|
||||||
#define KEYMAP_BEPO_H
|
#define KEYMAP_BEPO_H
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Didier Loiseau
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_CANADIAN_MULTILINGUAG_H
|
#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H
|
||||||
#define KEYMAP_CANADIAN_MULTILINGUAG_H
|
#define KEYMAP_CANADIAN_MULTILINGUAG_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2015-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 KEYMAP_COLEMAK_H
|
#ifndef KEYMAP_COLEMAK_H
|
||||||
#define KEYMAP_COLEMAK_H
|
#define KEYMAP_COLEMAK_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2015-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 KEYMAP_DVORAK_H
|
#ifndef KEYMAP_DVORAK_H
|
||||||
#define KEYMAP_DVORAK_H
|
#define KEYMAP_DVORAK_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2016 Artyom Mironov
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_DVP_H
|
#ifndef KEYMAP_DVP_H
|
||||||
#define KEYMAP_DVP_H
|
#define KEYMAP_DVP_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Vincent Pochet
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_FR_CH
|
#ifndef KEYMAP_FR_CH
|
||||||
#define KEYMAP_FR_CH
|
#define KEYMAP_FR_CH
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2015-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 KEYMAP_FRENCH_H
|
#ifndef KEYMAP_FRENCH_H
|
||||||
#define KEYMAP_FRENCH_H
|
#define KEYMAP_FRENCH_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Sébastien Pérochon
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_FRENCH_OSX_H
|
#ifndef KEYMAP_FRENCH_OSX_H
|
||||||
#define KEYMAP_FRENCH_OSX_H
|
#define KEYMAP_FRENCH_OSX_H
|
||||||
|
|
||||||
@@ -74,4 +89,4 @@
|
|||||||
#define FR_PIPE LSFT(LALT(KC_L))
|
#define FR_PIPE LSFT(LALT(KC_L))
|
||||||
#define FR_BSLS LSFT(LALT(FR_COLN))
|
#define FR_BSLS LSFT(LALT(FR_COLN))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* Copyright 2015-2016 Matthias Schmidtt
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_GERMAN
|
#ifndef KEYMAP_GERMAN
|
||||||
#define KEYMAP_GERMAN
|
#define KEYMAP_GERMAN
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 heartsekai
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_SWISS_GERMAN
|
#ifndef KEYMAP_SWISS_GERMAN
|
||||||
#define KEYMAP_SWISS_GERMAN
|
#define KEYMAP_SWISS_GERMAN
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Stephen Bösebeck
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_GERMAN_OSX
|
#ifndef KEYMAP_GERMAN_OSX
|
||||||
#define KEYMAP_GERMAN_OSX
|
#define KEYMAP_GERMAN_OSX
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
/* JP106-layout (Japanese Standard)
|
/* Copyright 2016 h-youhei
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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/>.
|
||||||
|
*
|
||||||
|
* JP106-layout (Japanese Standard)
|
||||||
*
|
*
|
||||||
* For more information, see
|
* For more information, see
|
||||||
* http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html
|
* http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Matthias Schmitt
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_NEO2
|
#ifndef KEYMAP_NEO2
|
||||||
#define KEYMAP_NEO2
|
#define KEYMAP_NEO2
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2015-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 KEYMAP_NORDIC_H
|
#ifndef KEYMAP_NORDIC_H
|
||||||
#define KEYMAP_NORDIC_H
|
#define KEYMAP_NORDIC_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* 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 KEYMAP_NORWEGIAN_H
|
#ifndef KEYMAP_NORWEGIAN_H
|
||||||
#define KEYMAP_NORWEGIAN_H
|
#define KEYMAP_NORWEGIAN_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 James Kay
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 KEYMAP_PLOVER_H
|
#ifndef KEYMAP_PLOVER_H
|
||||||
#define KEYMAP_PLOVER_H
|
#define KEYMAP_PLOVER_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
#ifndef KEYMAP_RUSSIAN_H
|
|
||||||
#define KEYMAP_RUSSIAN_H
|
|
||||||
|
|
||||||
#include "keymap.h"
|
|
||||||
|
|
||||||
// Normal Chracters // reg SHIFT
|
|
||||||
#define RU_A KC_F // а and А
|
|
||||||
#define RU_BE KC_COMM // б and Б
|
|
||||||
#define RU_VE KC_D // в and В
|
|
||||||
#define RU_GHE KC_U // г and Г
|
|
||||||
#define RU_DE KC_L // д and Д
|
|
||||||
#define RU_IE KC_T // е and Е
|
|
||||||
#define RU_IO KC_GRV // ё and Ё
|
|
||||||
#define RU_ZHE KC_SCLN // ж and Ж
|
|
||||||
#define RU_ZE KC_P // з and З
|
|
||||||
#define RU_I KC_B // и and И
|
|
||||||
#define RU_SRT_I KC_Q // й and Й
|
|
||||||
#define RU_KA KC_R // к and К
|
|
||||||
#define RU_EL KC_K // л and Л
|
|
||||||
#define RU_EM KC_V // м and М
|
|
||||||
#define RU_EN KC_Y // н and Н
|
|
||||||
#define RU_O KC_J // о and О
|
|
||||||
#define RU_PE KC_G // п and П
|
|
||||||
#define RU_ER KC_H // р and Р
|
|
||||||
#define RU_ES KC_C // с and С
|
|
||||||
#define RU_TE KC_N // т and Т
|
|
||||||
#define RU_U KC_E // у and У
|
|
||||||
#define RU_EF KC_A // ф and Ф
|
|
||||||
#define RU_HA KC_LBRC // х and Х
|
|
||||||
#define RU_TSE KC_W // ц and Ц
|
|
||||||
#define RU_CHE KC_X // ч and Ч
|
|
||||||
#define RU_SHA KC_I // ш and Ш
|
|
||||||
#define RU_SHCHA KC_O // щ and Щ
|
|
||||||
#define RU_HSIGN KC_RBRC // ъ and Ъ
|
|
||||||
#define RU_YERU KC_S // ы and Ы
|
|
||||||
#define RU_SSIGN KC_M // ь and Ь
|
|
||||||
#define RU_E KC_QUOT // э and Э
|
|
||||||
#define RU_YU KC_DOT // ю and Ю
|
|
||||||
#define RU_YA KC_Z // я and Я
|
|
||||||
|
|
||||||
#define RU_1 KC_1 // 1 and !
|
|
||||||
#define RU_2 KC_2 // 2 and "
|
|
||||||
#define RU_3 KC_3 // 3 and №
|
|
||||||
#define RU_4 KC_4 // 4 and ;
|
|
||||||
#define RU_5 KC_5 // 5 and %
|
|
||||||
#define RU_6 KC_6 // 6 and :
|
|
||||||
#define RU_7 KC_7 // 7 and ?
|
|
||||||
#define RU_8 KC_8 // 8 and *
|
|
||||||
#define RU_9 KC_9 // 9 and (
|
|
||||||
#define RU_0 KC_0 // 0 and )
|
|
||||||
|
|
||||||
#define RU_MINS KC_MINS // - and _
|
|
||||||
#define RU_EQL KC_EQL // = and +
|
|
||||||
#define RU_BSLS KC_BSLS // \ and /
|
|
||||||
#define RU_DOT KC_SLSH // . and ,
|
|
||||||
|
|
||||||
// Shifted Chracters
|
|
||||||
#define RU_EXLM LSFT(RU_1) // !
|
|
||||||
#define RU_DQUT LSFT(RU_2) // "
|
|
||||||
#define RU_NMRO LSFT(RU_3) // №
|
|
||||||
#define RU_SCLN LSFT(RU_4) // ;
|
|
||||||
#define RU_PERC LSFT(RU_5) // %
|
|
||||||
#define RU_COLN LSFT(RU_6) // :
|
|
||||||
#define RU_QUES LSFT(RU_7) // ?
|
|
||||||
#define RU_ASTR LSFT(RU_8) // *
|
|
||||||
#define RU_LPRN LSFT(RU_9) // (
|
|
||||||
#define RU_RPRN LSFT(RU_0) // )
|
|
||||||
|
|
||||||
#define RU_UNDR LSFT(RU_MINS) // _
|
|
||||||
#define RU_PLUS LSFT(RU_EQL) // +
|
|
||||||
#define RU_SLSH LSFT(RU_BSLS) // /
|
|
||||||
#define RU_COMM LSFT(RU_DOT) // ,
|
|
||||||
|
|
||||||
// Alt Gr-ed characters
|
|
||||||
#define RU_RUBL RALT(RU_8) // ₽
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2015-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 KEYMAP_SPANISH_H
|
#ifndef KEYMAP_SPANISH_H
|
||||||
#define KEYMAP_SPANISH_H
|
#define KEYMAP_SPANISH_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2015-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 KEYMAP_UK_H
|
#ifndef KEYMAP_UK_H
|
||||||
#define KEYMAP_UK_H
|
#define KEYMAP_UK_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,163 +0,0 @@
|
|||||||
#ifndef KEYMAP_CYRILLIC_H
|
|
||||||
#define KEYMAP_CYRILLIC_H
|
|
||||||
|
|
||||||
#include "keymap.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is based off of
|
|
||||||
* https://en.wikipedia.org/wiki/Cyrillic_script
|
|
||||||
*
|
|
||||||
* Unicode is iffy, a software implementation is preferred
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Capital Char russian/ukrainian/bulgarian
|
|
||||||
#define CY_A UC(0x0410) // А rus ukr bul
|
|
||||||
#define CY_BE UC(0x0411) // Б rus ukr bul
|
|
||||||
#define CY_VE UC(0x0412) // В rus ukr bul
|
|
||||||
#define CY_GHE UC(0x0413) // Г rus ukr bul
|
|
||||||
#define CY_GHEUP UC(0x0490) // Ґ ukr
|
|
||||||
#define CY_DE UC(0x0414) // Д rus ukr bul
|
|
||||||
#define CY_DJE UC(0x0402) // Ђ
|
|
||||||
#define CY_GJE UC(0x0403) // Ѓ
|
|
||||||
#define CY_IE UC(0x0415) // Е rus ukr bul
|
|
||||||
#define CY_IO UC(0x0401) // Ё rus
|
|
||||||
#define CY_UIE UC(0x0404) // Є ukr
|
|
||||||
#define CY_ZHE UC(0x0416) // Ж rus ukr bul
|
|
||||||
#define CY_ZE UC(0x0417) // З rus ukr bul
|
|
||||||
#define CY_DZE UC(0x0405) // Ѕ
|
|
||||||
#define CY_I UC(0x0418) // И rus ukr bul
|
|
||||||
#define CY_B_U_I UC(0x0406) // І ukr
|
|
||||||
#define CY_YI UC(0x0407) // Ї ukr
|
|
||||||
#define CY_SRT_I UC(0x0419) // Й rus ukr bul
|
|
||||||
#define CY_JE UC(0x0408) // Ј
|
|
||||||
#define CY_KA UC(0x041a) // К rus ukr bul
|
|
||||||
#define CY_EL UC(0x041b) // Л rus ukr bul
|
|
||||||
#define CY_LJE UC(0x0409) // Љ
|
|
||||||
#define CY_EM UC(0x041c) // М rus ukr bul
|
|
||||||
#define CY_EN UC(0x041d) // Н rus ukr bul
|
|
||||||
#define CY_NJE UC(0x040a) // Њ
|
|
||||||
#define CY_O UC(0x041e) // О rus ukr bul
|
|
||||||
#define CY_PE UC(0x041f) // П rus ukr bul
|
|
||||||
#define CY_ER UC(0x0420) // Р rus ukr bul
|
|
||||||
#define CY_ES UC(0x0421) // С rus ukr bul
|
|
||||||
#define CY_TE UC(0x0422) // Т rus ukr bul
|
|
||||||
#define CY_TSHE UC(0x040b) // Ћ
|
|
||||||
#define CY_KJE UC(0x040c) // Ќ
|
|
||||||
#define CY_U UC(0x0423) // У rus ukr bul
|
|
||||||
#define CY_SRT_U UC(0x040e) // Ў
|
|
||||||
#define CY_EF UC(0x0424) // Ф rus ukr bul
|
|
||||||
#define CY_HA UC(0x0425) // Х rus bul
|
|
||||||
#define CY_TSE UC(0x0426) // Ц rus ukr bul
|
|
||||||
#define CY_CHE UC(0x0427) // Ч rus ukr bul
|
|
||||||
#define CY_DZHE UC(0x040f) // Џ
|
|
||||||
#define CY_SHA UC(0x0428) // Ш rus ukr bul
|
|
||||||
#define CY_SHCHA UC(0x0429) // Щ rus ukr bul
|
|
||||||
#define CY_HSIGN UC(0x042a) // Ъ rus bul
|
|
||||||
#define CY_YERU UC(0x042b) // Ы rus
|
|
||||||
#define CY_SSIGN UC(0x042c) // Ь rus ukr bul
|
|
||||||
#define CY_E UC(0x042d) // Э rus
|
|
||||||
#define CY_YU UC(0x042e) // Ю rus ukr bul
|
|
||||||
#define CY_YA UC(0x042f) // Я rus ukr bul
|
|
||||||
// Important Cyrillic non-Slavic letters
|
|
||||||
#define CY_PALOCHKA UC(0x04c0) // Ӏ
|
|
||||||
#define CY_SCHWA UC(0x04d8) // Ә
|
|
||||||
#define CY_GHE_S UC(0x0492) // Ғ
|
|
||||||
#define CY_ZE_D UC(0x0498) // Ҙ
|
|
||||||
#define CY_ES_D UC(0x04aa) // Ҫ
|
|
||||||
#define CY_BR_KA UC(0x04a0) // Ҡ
|
|
||||||
#define CY_ZHE_D UC(0x0496) // Җ
|
|
||||||
#define CY_KA_D UC(0x049a) // Қ
|
|
||||||
#define CY_EN_D UC(0x04a2) // Ң
|
|
||||||
#define CY_ENGHE UC(0x04a4) // Ҥ
|
|
||||||
#define CY_BRD_O UC(0x04e8) // Ө
|
|
||||||
#define CY_STR_U UC(0x04ae) // Ү
|
|
||||||
#define CY_S_U_S UC(0x04b0) // Ұ
|
|
||||||
#define CY_SHHA UC(0x04ba) // Һ
|
|
||||||
#define CY_HA_D UC(0x04b2) // Ҳ
|
|
||||||
|
|
||||||
|
|
||||||
// Small
|
|
||||||
#define CY_a UC(0x0430) // a rus ukr bul
|
|
||||||
#define CY_be UC(0x0431) // б rus ukr bul
|
|
||||||
#define CY_ve UC(0x0432) // в rus ukr bul
|
|
||||||
#define CY_ghe UC(0x0433) // г rus ukr bul
|
|
||||||
#define CY_gheup UC(0x0491) // ґ ukr
|
|
||||||
#define CY_de UC(0x0434) // д rus ukr bul
|
|
||||||
#define CY_dje UC(0x0452) // ђ
|
|
||||||
#define CY_gje UC(0x0453) // ѓ
|
|
||||||
#define CY_ie UC(0x0435) // е rus ukr bul
|
|
||||||
#define CY_io UC(0x0451) // ё rus
|
|
||||||
#define CY_uie UC(0x0454) // є ukr
|
|
||||||
#define CY_zhe UC(0x0436) // ж rus ukr bul
|
|
||||||
#define CY_ze UC(0x0437) // з rus ukr bul
|
|
||||||
#define CY_dze UC(0x0455) // ѕ
|
|
||||||
#define CY_i UC(0x0438) // и rus ukr bul
|
|
||||||
#define CY_b_u_i UC(0x0456) // і ukr
|
|
||||||
#define CY_yi UC(0x0457) // ї ukr
|
|
||||||
#define CY_srt_i UC(0x0439) // й rus ukr bul
|
|
||||||
#define CY_je UC(0x0458) // ј
|
|
||||||
#define CY_ka UC(0x043a) // к rus ukr bul
|
|
||||||
#define CY_el UC(0x043b) // л rus ukr bul
|
|
||||||
#define CY_lje UC(0x0459) // љ
|
|
||||||
#define CY_em UC(0x043c) // м rus ukr bul
|
|
||||||
#define CY_en UC(0x043d) // н rus ukr bul
|
|
||||||
#define CY_nje UC(0x045a) // њ
|
|
||||||
#define CY_o UC(0x043e) // о rus ukr bul
|
|
||||||
#define CY_pe UC(0x043f) // п rus ukr bul
|
|
||||||
#define CY_er UC(0x0440) // р rus ukr bul
|
|
||||||
#define CY_es UC(0x0441) // с rus ukr bul
|
|
||||||
#define CY_te UC(0x0442) // т rus ukr bul
|
|
||||||
#define CY_tshe UC(0x045b) // ћ
|
|
||||||
#define CY_kje UC(0x045c) // ќ
|
|
||||||
#define CY_u UC(0x0443) // у rus ukr bul
|
|
||||||
#define CY_srt_u UC(0x045e) // ў
|
|
||||||
#define CY_ef UC(0x0444) // ф rus ukr bul
|
|
||||||
#define CY_ha UC(0x0445) // х rus ukr bul
|
|
||||||
#define CY_tse UC(0x0446) // ц rus ukr bul
|
|
||||||
#define CY_che UC(0x0447) // ч rus ukr bul
|
|
||||||
#define CY_dzhe UC(0x045f) // џ
|
|
||||||
#define CY_sha UC(0x0448) // ш rus ukr bul
|
|
||||||
#define CY_shcha UC(0x0449) // щ rus ukr bul
|
|
||||||
#define CY_hsign UC(0x044a) // ъ rus bul
|
|
||||||
#define CY_yeru UC(0x044b) // ы rus
|
|
||||||
#define CY_ssign UC(0x044c) // ь rus ukr bul
|
|
||||||
#define CY_e UC(0x044d) // э rus
|
|
||||||
#define CY_yu UC(0x044e) // ю rus ukr bul
|
|
||||||
#define CY_ya UC(0x044f) // я rus ukr bul
|
|
||||||
// Important Cyrillic non-Slavic letters
|
|
||||||
#define CY_palochka UC(0x04cf) // ӏ
|
|
||||||
#define CY_schwa UC(0x04d9) // ә
|
|
||||||
#define CY_ghe_s UC(0x0493) // ғ
|
|
||||||
#define CY_ze_d UC(0x0499) // ҙ
|
|
||||||
#define CY_es_d UC(0x04ab) // ҫ
|
|
||||||
#define CY_br_ka UC(0x04a1) // ҡ
|
|
||||||
#define CY_zhe_d UC(0x0497) // җ
|
|
||||||
#define CY_ka_d UC(0x049b) // қ
|
|
||||||
#define CY_en_d UC(0x04a3) // ң
|
|
||||||
#define CY_enghe UC(0x04a5) // ҥ
|
|
||||||
#define CY_brd_o UC(0x04e9) // ө
|
|
||||||
#define CY_str_u UC(0x04af) // ү
|
|
||||||
#define CY_s_u_s UC(0x04b1) // ұ
|
|
||||||
#define CY_shha UC(0x04bb) // һ
|
|
||||||
#define CY_ha_d UC(0x04b3) // ҳ
|
|
||||||
|
|
||||||
|
|
||||||
// Extra
|
|
||||||
#define CY_slr_ve UC(0x1c80) // ᲀ CYRILLIC SMALL LETTER ROUNDED VE
|
|
||||||
#define CY_ll_de UC(0x1c81) // ᲁ CYRILLIC SMALL LETTER LONG-LEGGED DE
|
|
||||||
#define CY_ZEMLYA UC(0xa640) // Ꙁ CYRILLIC CAPITAL LETTER ZEMLYA
|
|
||||||
#define CY_zemlya UC(0xa641) // ꙁ CYRILLIC SMALL LETTER ZEMLYA
|
|
||||||
#define CY_RV_DZE UC(0xa644) // Ꙅ CYRILLIC CAPITAL LETTER REVERSED DZE
|
|
||||||
#define CY_rv_DZE UC(0xa645) // ꙅ CYRILLIC SMALL LETTER REVERSED DZE
|
|
||||||
#define CY_slw_es UC(0x1c83) // ᲃ CYRILLIC SMALL LETTER WIDE ES
|
|
||||||
#define CY_st_te UC(0x1c84) // ᲄ CYRILLIC SMALL LETTER TALL TE
|
|
||||||
#define CY_3l_te UC(0x1c85) // ᲅ CYRILLIC SMALL LETTER THREE-LEGGED TE
|
|
||||||
#define CY_thsign UC(0x1c86) // ᲆ CYRILLIC SMALL LETTER TALL HARD SIGN
|
|
||||||
#define CY_YERUBY UC(0xa650) // Ꙑ CYRILLIC CAPITAL LETTER YERU WITH BACK YER
|
|
||||||
#define CY_yeruby UC(0xa651) // ꙑ CYRILLIC SMALL LETTER YERU WITH BACK YER
|
|
||||||
#define CY_RUBL UC(0x20bd) // ₽
|
|
||||||
#define CY_NMRO UC(0x2116) // №
|
|
||||||
|
|
||||||
// The letters Zje and Sje are made for other letters and accent marks
|
|
||||||
|
|
||||||
#endif
|
|
||||||
+12
-1
@@ -7,7 +7,18 @@
|
|||||||
* Jan 18th, 2014 v2.0b Initial Version
|
* Jan 18th, 2014 v2.0b Initial Version
|
||||||
* Nov 29th, 2015 v2.3 Added SK6812RGBW support
|
* Nov 29th, 2015 v2.3 Added SK6812RGBW support
|
||||||
*
|
*
|
||||||
* License: GNU GPL v2 (see License.txt)
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 "light_ws2812.h"
|
#include "light_ws2812.h"
|
||||||
|
|||||||
+12
-2
@@ -6,8 +6,18 @@
|
|||||||
*
|
*
|
||||||
* Please do not change this file! All configuration is handled in "ws2812_config.h"
|
* Please do not change this file! All configuration is handled in "ws2812_config.h"
|
||||||
*
|
*
|
||||||
* License: GNU GPL v2 (see License.txt)
|
* This program is free software: you can redistribute it and/or modify
|
||||||
+
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 LIGHT_WS2812_H_
|
#ifndef LIGHT_WS2812_H_
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012 Jun Wako
|
Copyright 2012-2017 Jun Wako, Jack Humbert
|
||||||
Copyright 2014 Jack Humbert
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
/* Copyright 2016 Wez Furlong
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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/>.
|
||||||
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
// Some helpers for controlling gpio pins
|
// Some helpers for controlling gpio pins
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
|||||||
@@ -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,3 +1,19 @@
|
|||||||
|
/* 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_chording.h"
|
#include "process_chording.h"
|
||||||
|
|
||||||
bool keys_chord(uint8_t keys[]) {
|
bool keys_chord(uint8_t keys[]) {
|
||||||
@@ -57,4 +73,4 @@ bool process_chording(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/* 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_CHORDING_H
|
#ifndef PROCESS_CHORDING_H
|
||||||
#define PROCESS_CHORDING_H
|
#define PROCESS_CHORDING_H
|
||||||
|
|
||||||
@@ -13,4 +29,4 @@ uint8_t chord_key_down = 0;
|
|||||||
|
|
||||||
bool process_chording(uint16_t keycode, keyrecord_t *record);
|
bool process_chording(uint16_t keycode, keyrecord_t *record);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loaded 100 of 144 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user