Compare commits

..

21 Commits

Author SHA1 Message Date
Jack Humbert b034896cd3 update submodule 7 years ago
Some Person 2bd625b754 bla 7 years ago
Jack Humbert da32068f48 update to qwerty 7 years ago
Jack Humbert b308d6709e working 7 years ago
Jack Humbert 123ad0de95 try more stuff 7 years ago
Jack Humbert 00fc38435f master working 7 years ago
Jack Humbert 8b5b41bb47 update handwire with arm changes 7 years ago
Jack Humbert 4bdde668e1 Merge branch 'master' of github.com:qmk/qmk_firmware into handwire 7 years ago
Jack Humbert 3c0d86eb47 a little progress 7 years ago
Jack Humbert f60166c1a1 Merge branch 'master' of github.com:qmk/qmk_firmware into handwire 7 years ago
Jack Humbert 7d59f83b2e adds matrix i2c swap 7 years ago
Jack Humbert be81cd8c98 adds i2c slave implementation 7 years ago
Jack Humbert b075df1c87 merge 7 years ago
Jack Humbert 8a91aa5e6c Merge branch 'master' of github.com:qmk/qmk_firmware into handwire 7 years ago
Jack Humbert fae437cfad update matrix 7 years ago
Jack Humbert fc91bf4a65 updated matrix and keymap 7 years ago
Jack Humbert 78ea99d154 start f303 handwire 7 years ago
Jack Humbert 2165f9d654 get one channel working 7 years ago
Jack Humbert 31df12c84f chibios stack size inc 7 years ago
Jack Humbert d09d9f32bd Merge branch 'master' into arm_audio_fixes 7 years ago
Jack Humbert 690a08cbbb fix up arm audio implementation 7 years ago

4
.gitignore vendored

@ -23,7 +23,6 @@ quantum/version.h
.idea/
CMakeLists.txt
cmake-build-debug
doxygen/
.DS_STORE
/util/wsl_downloaded
/util/win_downloaded
@ -43,7 +42,6 @@ doxygen/
.project
.settings/
.idea
*.iml
.browse.VC.db*
*.stackdump
util/Win_Check_Output.txt
@ -67,4 +65,4 @@ util/Win_Check_Output.txt
# things travis sees
secrets.tar
id_rsa_*
/.vs
/.vs

1
.gitmodules vendored

@ -1,6 +1,7 @@
[submodule "lib/chibios"]
path = lib/chibios
url = https://github.com/qmk/ChibiOS
branch = handwire
[submodule "lib/chibios-contrib"]
path = lib/chibios-contrib
url = https://github.com/qmk/ChibiOS-Contrib

@ -15,13 +15,11 @@ before_install:
install:
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
- npm install -g moxygen
before_script:
- avr-gcc --version
script:
- make test:all AUTOGEN=false
- bash util/travis_build.sh
- bash util/travis_docs.sh
addons:
apt:
packages:
@ -32,7 +30,6 @@ addons:
- libnewlib-arm-none-eabi
- diffutils
- dos2unix
- doxygen
after_success:
bash util/travis_compiled_push.sh
notifications:

@ -1,266 +0,0 @@
# Doxyfile 1.8.14
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for qmk_firmware (github.com/qmk/qmk_firmware)
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
# TAG = value [value, ...]
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QMK Firmware"
PROJECT_NUMBER = https://github.com/qmk/qmk_firmware
PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families"
OUTPUT_DIRECTORY = doxygen
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 2
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = YES
HIDE_COMPOUND_REFERENCE= NO
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = NO
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = tmk_core quantum drivers
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to disabled outputs
#---------------------------------------------------------------------------
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_RTF = NO
GENERATE_MAN = NO
GENERATE_DOCBOOK = NO
GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES

@ -124,12 +124,6 @@ generate-keyboards-file:
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
exit 0
clean:
echo -n 'Deleting .build ... '
rm -rf $(BUILD_DIR)
echo 'done'
exit 0
#Compatibility with the old make variables, anything you specify directly on the command line
# always overrides the detected folders
ifdef keyboard

@ -143,8 +143,6 @@ ifeq ($(PLATFORM),CHIBIOS)
OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","")
OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h
else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","")
OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h
endif
endif
@ -204,16 +202,8 @@ else
endif
# User space stuff
ifeq ("$(USER_NAME)","")
USER_NAME := $(KEYMAP)
endif
USER_PATH := users/$(USER_NAME)
USER_PATH := users/$(KEYMAP)
-include $(USER_PATH)/rules.mk
ifneq ("$(wildcard users/$(KEYMAP)/config.h)","")
CONFIG_H += users/$(KEYMAP)/config.h
endif
# Object files directory
# To put object files in current directory, use a dot (.), do NOT make

@ -20,6 +20,12 @@ SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
COMMON_VPATH += $(SERIAL_PATH)
ifeq ($(PLATFORM),AVR)
COMMON_VPATH += $(DRIVER_PATH)/avr
else
COMMON_VPATH += $(DRIVER_PATH)/arm
endif
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
OPT_DEFS += -DAPI_SYSEX_ENABLE
SRC += $(QUANTUM_DIR)/api/api_sysex.c
@ -34,7 +40,6 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE
MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
ifeq ($(PLATFORM),AVR)
SRC += $(QUANTUM_DIR)/audio/audio.c
else
@ -133,9 +138,6 @@ endif
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
OPT_DEFS += -DAUTO_SHIFT_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
endif
endif
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
@ -188,6 +190,11 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
include $(TMK_DIR)/protocol/usb_hid.mk
endif
ifeq ($(strip $(I2C_SLAVE_ENABLE)), yes)
SRC += twi2c.c
OPT_DEFS += -DI2C_SLAVE_ENABLE
endif
QUANTUM_SRC:= \
$(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap_common.c \

@ -3,16 +3,9 @@
* [Install Build Tools](getting_started_build_tools.md)
* Alternative: [Vagrant Guide](getting_started_vagrant.md)
* [Build/Compile Instructions](getting_started_make_guide.md)
* [Flashing Firmware](flashing.md)
* [Flashing Instructions](flashing.md)
* [Contributing to QMK](contributing.md)
* [How to Use Github](getting_started_github.md)
* [Getting Help](getting_started_getting_help.md)
* [Complete Newbs Guide](newbs.md)
* [Getting Started](newbs_getting_started.md)
* [Building Your First Firmware](newbs_building_firmware.md)
* [Flashing Firmware](newbs_flashing.md)
* [Testing and Debugging](newbs_testing_debugging.md)
* [FAQ](faq.md)
* [General FAQ](faq_general.md)
@ -32,7 +25,6 @@
* [Auto Shift](feature_auto_shift.md)
* [Backlight](feature_backlight.md)
* [Bootmagic](feature_bootmagic.md)
* [Command](feature_command.md)
* [Dynamic Macros](feature_dynamic_macros.md)
* [Grave Escape](feature_grave_esc.md)
* [Key Lock](feature_key_lock.md)
@ -45,7 +37,6 @@
* [RGB Lighting](feature_rgblight.md)
* [Space Cadet](feature_space_cadet.md)
* [Stenography](feature_stenography.md)
* [Swap Hands](feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md)
* [Terminal](feature_terminal.md)
* [Thermal Printer](feature_thermal_printer.md)
@ -73,7 +64,7 @@
* [Customizing Functionality](custom_quantum_functions.md)
* [Documentation Best Practices](documentation_best_practices.md)
* [Documentation Templates](documentation_templates.md)
* [Glossary](reference_glossary.md)
* [Glossary](glossary.md)
* [Keymap Overview](keymap.md)
* [Unit Testing](unit_testing.md)
@ -87,12 +78,3 @@
* Other Topics
* [Using Eclipse with QMK](eclipse.md)
* QMK Internals (In Progress)
* [Defines](internals_defines.md)
* [Input Callback Reg](internals_input_callback_reg.md)
* [Midi Device](internals_midi_device.md)
* [Midi Device Setup Process](internals_midi_device_setup_process.md)
* [Midi Util](internals_midi_util.md)
* [Send Functions](internals_send_functions.md)
* [Sysex Tools](internals_sysex_tools.md)

@ -31,8 +31,9 @@ This is a C header file that is one of the first things included, and will persi
#include "config_common.h"
## `config.h` Options
## Hardware Options
### Hardware Options
* `#define VENDOR_ID 0x1234`
* defines your VID, and for most DIY projects, can be whatever you want
* `#define PRODUCT_ID 0x5678`
@ -61,18 +62,10 @@ This is a C header file that is one of the first things included, and will persi
* COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
* `#define AUDIO_VOICES`
* turns on the alternate audio voices (to cycle through)
* `#define C4_AUDIO`
* enables audio on pin C4
* `#define C5_AUDIO`
* enables audio on pin C5
* `#define C6_AUDIO`
* enables audio on pin C6
* `#define B5_AUDIO`
* enables audio on pin B5 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO)
* `#define B6_AUDIO`
* enables audio on pin B6 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO)
* `#define B7_AUDIO`
* enables audio on pin B7 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO)
* enables audio on pin B5 (duophony is enable if both are enabled)
* `#define BACKLIGHT_PIN B7`
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
* `#define BACKLIGHT_LEVELS 3`
@ -90,7 +83,7 @@ This is a C header file that is one of the first things included, and will persi
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
* key combination that allows the use of magic commands (useful for debugging)
## Features That Can Be Disabled
### Features That Can Be Disabled
If you define these options you will disable the associated feature, which can save on code size.
@ -109,16 +102,16 @@ If you define these options you will disable the associated feature, which can s
* `#define NO_ACTION_FUNCTION`
* disable the action function (deprecated)
## Features That Can Be Enabled
### Features That Can Be Enabled
If you define these options you will enable the associated feature, which may increase your code size.
* `#define FORCE_NKRO`
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
* `#define PREVENT_STUCK_MODIFIERS`
* stores the layer a key press came from so the same layer is used when the key is released, regardless of which layers are enabled
* when switching layers, this will release all mods
## Behaviors That Can Be Configured
### Behaviors That Can Be Configured
* `#define TAPPING_TERM 200`
* how long before a tap becomes a hold
@ -146,7 +139,7 @@ If you define these options you will enable the associated feature, which may in
few ms of delay from this. But if you're doing chording on something with 3-4ms
scan times? You probably want this.
## RGB Light Configuration
### RGB Light Configuration
* `#define RGB_DI_PIN D7`
* pin the DI on the ws2812 is hooked-up to
@ -163,7 +156,7 @@ If you define these options you will enable the associated feature, which may in
* `#define RGBW_BB_TWI`
* bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ)
## Mouse Key Options
### Mouse Key Options
* `#define MOUSEKEY_INTERVAL 20`
* `#define MOUSEKEY_DELAY 0`
@ -175,7 +168,9 @@ If you define these options you will enable the associated feature, which may in
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
## Build Options
## `rules.mk` Options
### Build Options
* `DEFAULT_FOLDER`
* Used to specify a default folder when a keyboard has more than one sub-folder.
@ -184,7 +179,7 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
* `LAYOUTS`
* A list of [layouts](feature_layouts.md) this keyboard supports.
## AVR MCU Options
### AVR MCU Options
* `MCU = atmega32u4`
* `F_CPU = 16000000`
* `ARCH = AVR8`
@ -198,7 +193,7 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
* `caterina`
* `bootloadHID`
## Feature Options
### Feature Options
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.

@ -98,10 +98,10 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
* `USB_LED_COMPOSE`
* `USB_LED_KANA`
### Example `led_set_user()` Implementation
### Example `led_set_kb()` Implementation
```
void led_set_user(uint8_t usb_led) {
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
PORTB |= (1<<0);
} else {
@ -139,13 +139,14 @@ void led_set_user(uint8_t usb_led) {
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i&#xb2;c controllers you will need to set up that hardware before it can be used.
### Example `matrix_init_user()` Implementation
### Example `matrix_init_kb()` Implementation
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
```
void matrix_init_user(void) {
void matrix_init_kb(void) {
// Call the keymap level matrix init.
matrix_init_user();
// Set our LED pins as output
DDRB |= (1<<1);
@ -175,41 +176,3 @@ This example has been deliberately omitted. You should understand enough about Q
This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
# Layer Change Code
Thir runs code every time that the layers get changed. This can be useful for layer indication, or custom layer handling.
### Example `layer_state_set_*` Implementation
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example
```
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _RAISE:
rgblight_setrgb (0x00, 0x00, 0xFF);
break;
case _LOWER:
rgblight_setrgb (0xFF, 0x00, 0x00);
break;
case _PLOVER:
rgblight_setrgb (0x00, 0xFF, 0x00);
break;
case _ADJUST:
rgblight_setrgb (0x7A, 0x00, 0xFF);
break;
default: // for any other layers, or the default layer
rgblight_setrgb (0x00, 0xFF, 0xFF);
break;
}
return state;
}
```
### `layer_state_set_*` Function Documentation
* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)

@ -1,6 +1,6 @@
# Setting up Eclipse for QMK Development
[Eclipse][1] is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages.
[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages.
Using an IDE such as Eclipse provides many advantages over a plain text editor, such as:
* intelligent code completion
@ -17,7 +17,7 @@ Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
# Prerequisites
## Build Environment
Before starting, you must have followed the [Getting Started](README.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command).
Before starting, you must have followed the [Getting Started](home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command).
## Java
Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
@ -84,5 +84,3 @@ We will now configure a make target that cleans the project and builds the keyma
7. (Optional) Toggle the <kbd>Hide Empty Folders</kbd> icon button above the targets tree to only show your build target.
8. Double-click the build target you created to trigger a build.
9. Select the <kbd>Console</kbd> view at the bottom to view the running build.
[1]: https://en.wikipedia.org/wiki/Eclipse_(software)

@ -88,19 +88,3 @@ Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=2048
```
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
The solution is to remove and reinstall all affected modules.
```
brew rm avr-gcc
brew rm dfu-programmer
brew rm gcc-arm-none-eabi
brew rm avrdude
brew install avr-gcc
brew install dfu-programmer
brew install gcc-arm-none-eabi
brew install avrdude
```

@ -14,15 +14,6 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/9ce023dc6caadc0cf11c88c782350a8c -->
![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png)
## Some Of My Keys Are Swapped Or Not Working
QMK has two features, Bootmagic and Command, which allow you to change the behavior of your keyboard on the fly. This includes, but is not limited to, swapping Ctrl/Caps, disabling Gui, swapping Alt/Gui, swapping Backspace/Backslash, disabling all keys, and other behavioral modifications.
As a quick fix try holding down `Space`+`Backspace` while you plug in your keyboard. This will reset the stored settings on your keyboard, returning those keys to normal operation. If that doesn't work look here:
* [Bootmagic](feature_bootmagic.md)
* [Command](feature_command.md)
## The Menu Key Isn't Working
The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
@ -31,13 +22,13 @@ The key found on most modern keyboards that is located between `KC_RGUI` and `KC
Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
* http://en.wikipedia.org/wiki/Magic_SysRq_key
* http://en.wikipedia.org/wiki/System_request
- http://en.wikipedia.org/wiki/Magic_SysRq_key
- http://en.wikipedia.org/wiki/System_request
## Power Key Doesn't Work
Use `KC_PWR` instead of `KC_POWER` or vice versa.
* `KC_PWR` works with Windows and Linux, not with OSX.
* `KC_POWER` works with OSX and Linux, not with Windows.
- `KC_PWR` works with Windows and Linux, not with OSX.
- `KC_POWER` works with OSX and Linux, not with Windows.
More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
@ -49,9 +40,9 @@ https://github.com/tmk/tmk_keyboard/issues/67
Modifier keys or layers can be stuck unless layer switching is configured properly.
For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
* https://github.com/tmk/tmk_keyboard/issues/248
- https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
- http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
- https://github.com/tmk/tmk_keyboard/issues/248
## Mechanical Lock Switch Support
@ -75,17 +66,17 @@ See this post for example **MACRO** code.
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
On **Windows** you can use `AltGr` key or **Alt code**.
* http://en.wikipedia.org/wiki/AltGr_key
* http://en.wikipedia.org/wiki/Alt_code
- http://en.wikipedia.org/wiki/AltGr_key
- http://en.wikipedia.org/wiki/Alt_code
On **Mac** OS defines `Option` key combinations.
* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
- http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
On **Xorg** you can use `compose` key, instead.
* http://en.wikipedia.org/wiki/Compose_key
- http://en.wikipedia.org/wiki/Compose_key
And see this for **Unicode** input.
* http://en.wikipedia.org/wiki/Unicode_input
- http://en.wikipedia.org/wiki/Unicode_input
## Apple/Mac Keyboard `Fn`

@ -19,15 +19,13 @@ Currently, the keycodes able to used with these functions are limited to the [Ba
# Switching and Toggling Layers
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers)
These functions allow you to activate layers in various ways.
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers.
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped.
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer.
* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped.
* `TG(layer)` - toggles a layer on or off.
* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
# Working with Layers
@ -37,9 +35,9 @@ Care must be taken when switching layers, it's possible to lock yourself into a
If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
* Setup layer 0 as your default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number).
* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.)
* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone.
### Intermediate Users
@ -51,7 +49,7 @@ Once you have a good feel for how layers work and what you can do, you can get m
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
# Modifier Keys
@ -118,7 +116,7 @@ These are the values you can use for the `mod` in `MT()` and `OSM()`:
* MOD_HYPR
* MOD_MEH
These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped.
These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
@ -131,12 +129,6 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
* `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
* `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
{% hint style='info' %}
Due to the way that keycodes are structured, any modifiers specified as part of `kc`, such as `LCTL()` or `KC_LPRN`, will only activate when held instead of tapped.
Additionally, if there is at least one right modifier, any other modifiers will turn into their right equivalents, so it is not possible to "mix and match" the two.
{% endhint %}
# One Shot Keys
One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys".
@ -155,11 +147,9 @@ You can control the behavior of one shot keys by defining these in `config.h`:
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
* `OSL(layer)` - momentary switch to *layer*.
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L429).
If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
# Permissive Hold
## Permissive Hold
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:

@ -1,17 +1,6 @@
# Audio
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h:
Timer 1:
`#define B5_AUDIO`
`#define B6_AUDIO`
`#define B7_AUDIO`
Timer 3:
`#define C4_AUDIO`
`#define C5_AUDIO`
`#define C6_AUDIO`
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
@ -93,40 +82,10 @@ The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, a
#define PITCH_STANDARD_A 432.0f
You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `confid.h`:
#define NO_MUSIC_MODE
## Faux Click
This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly.
* `CK_TOGG` - Toggles the status (will play sound if enabled)
* `CK_RST` - Resets the frequency to the default state
* `CK_UP` - Increases the frequency of the clicks
* `CK_DOWN` - Decreases the frequency of the clicks
The feature is disabled by default, to save space. To enable it, add this to your `config.h`:
#define AUDIO_CLICKY
Additionally, even when enabled, the feature is not enabled by default, so you would need to turn it on first. And since we don't use EEPROM to store the setting (yet), you can default this to on by adding this to your `config.h`:
#define AUDIO_CLICKY_ON
You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values:
| Option | Default Value | Description |
|--------|---------------|-------------|
| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. |
| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). |
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. |
| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. |
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical. |
## MIDI Functionality
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.

@ -28,7 +28,10 @@ Yes, unfortunately.
characters, you could press and hold the 'a' key for a second or two. This no
longer works with Auto Shift because it is timing your depressed time instead
of emitting a depressed key state to your operating system.
2. You will have characters that are shifted when you did not intend on shifting, and
2. Auto Shift is disabled for any key press that is accompanied by one or more
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
as Ctrl+Shift+A.
3. You will have characters that are shifted when you did not intend on shifting, and
other characters you wanted shifted, but were not. This simply comes down to
practice. As we get in a hurry, we think we have hit the key long enough
for a shifted version, but we did not. On the other hand, we may think we are
@ -45,18 +48,6 @@ If no `rules.mk` exists, you can create one.
Then compile and install your new firmware with Auto Key enabled! That's it!
## Modifiers
By default, Auto Shift is disabled for any key press that is accompanied by one or more
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
as Ctrl+Shift+A.
You can re-enable Auto Shift for modifiers by adding another rule to your `rules.mk`
AUTO_SHIFT_MODIFIERS = yes
In which case, Ctrl+A held past the `AUTO_SHIFT_TIMEOUT` will be sent as Ctrl+Shift+A
## Configuring Auto Shift
If desired, there is some configuration that can be done to change the
@ -121,7 +112,7 @@ Map three keys temporarily in your keymap:
| KC_ASRP | Report your current Auto Shift timeout value |
| KC_ASON | Turns on the Auto Shift Function |
| KC_ASOFF | Turns off the Auto Shift Function |
| KC_ASTG | Toggles the state of the Auto Shift feature |
| KC_ASTG | Toggles the statn of the Auto Shift feature |
Compile and upload your new firmware.

@ -1,89 +1,29 @@
# Bootmagic and Magic Keycodes
There are 3 separate but related features that allow you to change the behavior of your keyboard without reflashing. While each of them have similar functionality you access that functionality in different ways depending on how your keyboard is configured.
Bootmagic is a system for configuring your keyboard while it initializes. To trigger a Bootmagic command you hold down the bootmagic key (`KC_SPACE` on most keyboards) and one or more command keys.
Bootmagic Keycodes allow you to access the Bootmagic functionality after your keyboard has initialized. To use Bootmagic Keycodes you assign keycodes starting with `MAGIC_`, much in the same way you define any other key.
Command is a feature that allows you to control different aspects of your keyboard. Command used to be called Magic. Command is typically accessed by holding Left and Right Shift at the same time, although that can be customized. While it shares some functionality with Bootmagic it also allows you to access functionality that Bootmagic does not. For more information see the [Command](feature_command.md) documentation page.
## Enabling Bootmagic
Bootmagic is disabled by default. To use Bootmagic you need to enable it in your `rules.mk` file:
BOOTMAGIC_ENABLE = yes
## Bootmagic Hotkeys and Keycodes
This table describes the default Hotkeys for Bootmagic and the Keycodes for Magic. These may be overriden at the Keyboard or Keymap level. Some functionality is not available in both methods.
To use the Hotkey hold down `BOOTMAGIC_KEY_SALT` (`KC_SPACE` by default) and the Hotkey while plugging in your keyboard. To use the Keycode assign that keycode to a layer. For example, if you hold down Space+B while plugging in most keyboards, you will enter bootloader mode.
|Hotkey |Keycode |Description |
|-----------|----------------------------------|--------------------------------------------------------|
|`ESC` | |Skip bootmagic and saved eeprom configuration |
|`B` |`RESET` |Enter bootloader instead of firmware |
|`D` |`DEBUG` |Enable debugging (writes messages to serial) |
|`X` | |Enable matrix debugging |
|`K` | |Enable keyboard debugging |
|`M` | |Enable mouse debugging |
|`BACKSPACE`| |Clear the saved settings from flash |
|`CAPSLOCK` |`MAGIC_CAPSLOCK_TO_CONTROL` |Treat `Capslock` as `Control` |
| |`MAGIC_UNCAPSLOCK_TO_CONTROL` |Stop treating CapsLock as Control |
|`LCTRL` |`MAGIC_SWAP_CONTROL_CAPSLOCK` |Swap `Control` and `Capslock` |
| |`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |Unswap Left Control and Caps Lock |
| |`MAGIC_SWAP_ALT_GUI` |Swap Alt and GUI on both sides |
| |`MAGIC_UNSWAP_ALT_GUI` |Unswap Left Alt and GUI |
|`LALT` |`MAGIC_SWAP_LALT_LGUI` |Swap Left `Alt` and `GUI`, e.g. for OSX Opt and Cmd |
| |`MAGIC_UNSWAP_LALT_LGUI` |Unswap Left Alt and GUI |
|`RALT` |`MAGIC_SWAP_RALT_RGUI` |Swap Right `Alt` and `GUI` |
| |`MAGIC_UNSWAP_RALT_RGUI` |Unswap Right Alt and GUI |
|`LGUI` |`MAGIC_NO_GUI` |Disable GUI key - e.g. disable Windows key during gaming|
| |`MAGIC_UNNO_GUI` |Enable the GUI key |
|`GRAVE` |`MAGIC_SWAP_GRAVE_ESC` |Swap `\`~` and `ESC` |
| |`MAGIC_UNSWAP_GRAVE_ESC` |Unswap `\`~` and Escape |
|`BACKSLASH`|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |Swap Blackslash and Backspace |
| |`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Unswap Backslash and Backspace |
|`N` |`MAGIC_HOST_NKRO` |Force N-Key Rollover (NKRO) on |
| |`MAGIC_UNHOST_NKRO` |Force NKRO off |
| |`MAGIC_TOGGLE_NKRO` |Toggle NKRO on or off |
|`0` |`DF(0)` |Make Layer 0 the default layer at bootup |
|`1` |`DF(1)` |Make Layer 1 the default layer at bootup |
|`2` |`DF(2)` |Make Layer 2 the default layer at bootup |
|`3` |`DF(3)` |Make Layer 3 the default layer at bootup |
|`4` |`DF(4)` |Make Layer 4 the default layer at bootup |
|`5` |`DF(5)` |Make Layer 5 the default layer at bootup |
|`6` |`DF(6)` |Make Layer 6 the default layer at bootup |
|`7` |`DF(7)` |Make Layer 7 the default layer at bootup |
## Bootmagic Configuration
When setting up your keyboard and/or keymap there are a number of `#define`s that control the behavior of Bootmagic. To use these put them in your `config.h`, either at the keyboard or keymap level.
|Define |Default|Description |
|-------|-------|------------|
|`BOOTMAGIC_KEY_SALT`|`KC_SPACE`|The key to hold down to trigger Bootmagic during initialization.|
|`BOOTMAGIC_KEY_SKIP`|`KC_ESC`|The Hotkey to ignore saved eeprom configuration.|
|`BOOTMAGIC_KEY_EEPROM_CLEAR`|`KC_BSPACE`|The hotkey to clear the saved eeprom configuration.|
|`BOOTMAGIC_KEY_BOOTLOADER`|`KC_B`|The hotkey to enter the bootloader.|
|`BOOTMAGIC_KEY_DEBUG_ENABLE`|`KC_D`|The hotkey to enable debug mode.|
|`BOOTMAGIC_KEY_DEBUG_MATRIX`|`KC_X`|The hotkey to enable matrix debugging mode.|
|`BOOTMAGIC_KEY_DEBUG_KEYBOARD`|`KC_K`|The hotkey to enable keyboard debugging mode.|
|`BOOTMAGIC_KEY_DEBUG_MOUSE`|`KC_M`|The hotkey to enable mouse debugging mode.|
|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK`|`KC_LCTRL`||
|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL`|`KC_CAPSLOCK`||
|`BOOTMAGIC_KEY_SWAP_LALT_LGUI`|`KC_LALT`||
|`BOOTMAGIC_KEY_SWAP_RALT_RGUI`|`KC_RALT`||
|`BOOTMAGIC_KEY_NO_GUI`|`KC_LGUI`||
|`BOOTMAGIC_KEY_SWAP_GRAVE_ESC`|`KC_GRAVE`||
|`BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE`|`KC_BSLASH`||
|`BOOTMAGIC_HOST_NKRO`|`KC_N`||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_0`|`KC_0`|Hotkey to set Layer 0 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_1`|`KC_1`|Hotkey to set Layer 1 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_2`|`KC_2`|Hotkey to set Layer 2 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_3`|`KC_3`|Hotkey to set Layer 3 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_4`|`KC_4`|Hotkey to set Layer 4 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_5`|`KC_5`|Hotkey to set Layer 5 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_6`|`KC_6`|Hotkey to set Layer 6 as the default layer|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_7`|`KC_7`|Hotkey to set Layer 7 as the default layer|
# Bootmagic
<!-- FIXME: Describe the bootmagic feature here. -->
## Bootmagic Keycodes
Shortcuts for bootmagic options. You can use these even when bootmagic is off.
|Key |Aliases |Description |
|----------------------------------|---------|------------------------------------|
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|`MAGIC_NO_GUI` | |Disable the GUI key |
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>&#96;</code> and Escape |
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap Backslash and Backspace |
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock |
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating CapsLock as Control |
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>&#96;</code> and Escape|
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap Backslash and Backspace |
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and GUI |
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |

@ -1,52 +0,0 @@
# Command (Formerly known as Magic)
Command is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md). Whenever possible we encourage you to use that functionality instead of Command.
## Enabling Command
By default Command is disabled. You can enable it in your `rules.mk` file:
COMMAND_ENABLE = yes
## Usage
To use Command you hold down the key combination defined by `IS_COMMAND`. By default that combination is both shift keys. While holding the key combination press the key corresponding to the command you want.
For example, to write the current QMK version to the QMK Toolbox console, you can press `Left Shift`+`Right Shift`+`V`.
## Configuration
The following values can be defined in `config.h` to control the behavior of Command.
|Define |Default | Description |
|-------|--------|-------------|
|`IS_COMMAND()` |`(keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`|Key combination to activate Command|
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Do layer switching with Function row|
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Do layer switching with number keys.|
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Do layer switching with custom keys (`MAGIC_KEY_LAYER0..9` below.)|
|`MAGIC_KEY_HELP1` |`H` |Show help.|
|`MAGIC_KEY_HELP2` |`SLASH` |Show help.|
|`MAGIC_KEY_DEBUG` |`D` |Turn on debug mode.|
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Turn on matrix debugging.|
|`MAGIC_KEY_DEBUG_KBD` |`K` |Turn on keyboard debugging.|
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Turn on mouse debugging.|
|`MAGIC_KEY_VERSION` |`V` |Write the QMK version to the console|
|`MAGIC_KEY_STATUS` |`S` |Show the current keyboard status|
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command Console|
|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Alternate access to layer 0|
|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Alternate access to layer 0|
|`MAGIC_KEY_LAYER0` |`0` |Change default layer to 0|
|`MAGIC_KEY_LAYER1` |`1` |Change default layer to 1|
|`MAGIC_KEY_LAYER2` |`2` |Change default layer to 2|
|`MAGIC_KEY_LAYER3` |`3` |Change default layer to 3|
|`MAGIC_KEY_LAYER4` |`4` |Change default layer to 4|
|`MAGIC_KEY_LAYER5` |`5` |Change default layer to 5|
|`MAGIC_KEY_LAYER6` |`6` |Change default layer to 6|
|`MAGIC_KEY_LAYER7` |`7` |Change default layer to 7|
|`MAGIC_KEY_LAYER8` |`8` |Change default layer to 8|
|`MAGIC_KEY_LAYER9` |`9` |Change default layer to 9|
|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Exit keyboard and enter bootloader|
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed|
|`MAGIC_KEY_EEPROM` |`E` |Erase EEPROM settings|
|`MAGIC_KEY_NKRO` |`N` |Toggle NKRO on/off|
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping on/off|

@ -22,7 +22,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case MY_CUSTOM_MACRO:
SEND_STRING("QMK is the best thing ever!"); // this is our macro!
return false;
return false; break;
}
}
return true;
@ -56,10 +56,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case MY_CUSTOM_MACRO:
SEND_STRING("QMK is the best thing ever!");
return false;
return false; break;
case MY_OTHER_MACRO:
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
return false;
return false; break;
}
}
return true;
@ -97,7 +97,6 @@ There's also a couple of mod shortcuts you can use:
* `SS_LGUI(string)`
* `SS_LALT(string)`
* `SS_LSFT(string)`
* `SS_RALT(string)`
These press the respective modifier, send the supplied string and then release the modifier.
They can be used like this:

@ -5,17 +5,17 @@ Mousekeys is a feature that allows you to emulate a mouse using your keyboard. Y
## Adding Mousekeys to a Keymap
There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard.
There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard.
### Adding Mousekeys Support in the `rules.mk`
### Adding Mousekeys Support in the `Makefile`
To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`:
To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`:
```
MOUSEKEY_ENABLE = yes
```
You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk
You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile
### Mapping Mouse Actions to Keyboard Keys
@ -40,7 +40,7 @@ You can use these keycodes within your keymap to map button presses to mouse act
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46
You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46
## Configuring the Behavior of Mousekeys

@ -42,8 +42,6 @@ You can change the behavior of the RGB Lighting by setting these configuration v
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
| `RGBLIGHT_LIMIT_VAL` | 255 | Limit the val of HSV to limit the maximum brightness simply. |
| `RGBLIGHT_SLEEP` | | `#define` this will shut off the lights when the host goes to sleep |
### Animations
@ -92,11 +90,10 @@ rgblight_disable(); // turn all lights off
rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM)
rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color
rgblight_sethsv(h, s, v); // HSV color control - h is a value from 0..360 and s/v is a value from 0..255
rgblight_sethsv(h, s, v); // HSV color control
rgblight_setrgb_at(r,g,b, LED); // control a single LED. 0 <= LED < RGBLED_NUM
rgblight_sethsv_at(h,s,v, LED); // control a single LED. 0 <= LED < RGBLED_NUM
```
You can find a list of predefined colors at [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Free to add to this list!
## RGB Lighting Keycodes

@ -56,29 +56,6 @@ On the display tab click 'Open stroke display'. With Plover disabled you should
* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
## Interfacing with the code
The steno code has three interceptible hooks. If you define these functions, they will be called at certain points in processing; if they return true, processing continues, otherwise it's assumed you handled things.
```C
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]);
```
This function is called when a chord is about to be sent. Mode will be one of `STENO_MODE_BOLT` or `STENO_MODE_GEMINI`. This represents the actual chord that would be sent via whichever protocol. You can modify the chord provided to alter what gets sent. Remember to return true if you want the regular sending process to happen.
```C
bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; }
```
This function is called when a keypress has come in, before it is processed. The keycode should be one of `QK_STENO_BOLT`, `QK_STENO_GEMINI`, or one of the `STN_*` key values.
```C
bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed);
```
This function is called after a key has been processed, but before any decision about whether or not to send a chord. If `IS_PRESSED(record->event)` is false, and `pressed` is 0 or 1, the chord will be sent shortly, but has not yet been sent. This is where to put hooks for things like, say, live displays of steno chords or keys.
## Keycode Reference
As defined in `keymap_steno.h`.
@ -129,4 +106,3 @@ As defined in `keymap_steno.h`.
|`STN_RES1`||(GeminiPR only)|
|`STN_RES2`||(GeminiPR only)|
|`STN_PWR`||(GeminiPR only)|

@ -1,30 +0,0 @@
# Swap-Hands Action
The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
## Configuration
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
```C
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
};
```
Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing.
## Swap Keycodes
|Key |Description |
|-----------|-------------------------------------------------------------------------|
|`SH_T(key)`|Sends `key` with a tap; momentary swap when held. |
|`SW_ON` |Turns on swapping and leaves it on. |
|`SW_OFF` |Turn off swapping and leaves it off. Good for returning to a known state.|
|`SW_MON` |Swaps hands when pressed, returns to normal when released (momentary). |
|`SW_MOFF` |Momentarily turns off swap. |
|`SH_TG` |Toggles swap on and off with every key press. |
|`SH_TT` |Toggles with a tap; momentary when held. |

@ -22,7 +22,7 @@ This array specifies what actions shall be taken when a tap-dance key is in acti
* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
And that's the bulk of it!

@ -3,11 +3,10 @@
If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, `<name>`) with the following structure:
* `/users/<name>/` (added to the path automatically)
* `readme.md` (optional, recommended)
* `readme.md`
* `rules.mk` (included automatically)
* `<name>.h` (optional)
* `<name>.c` (optional)
* `config.h` (optional)
`<name>.c` will need to be added to the SRC in `rules.mk` like this:
@ -25,31 +24,10 @@ For example,
Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`.
Additionally, `config.h` here will be processed like the same file in your keymap folder. This is handled separately from the `<name>.h` file.
The reason for this, is that `<name>.h` won't be added in time to add settings (such as `#define TAPPING_TERM 100`), and including the `<name.h>` file in any `config.h` files will result in compile issues.
So you should use the `config.h` for QMK settings, and the `<name>.h` file for user or keymap specific settings.
## Readme
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
## `Config.h`
If you do add a `config,h` file, you want to make sure that it only gets processed once. So you may want to start off with something like this:
```c
#ifndef USERSPACE_CONFIG_H
#define USERSPACE_CONFIG_H
// Put normal config.h settings here:
#endif // !USERSPACE_CONFIG_H
```
You can use any option hre that you could use in your keymap's `config.h` file. You can find a list of vales [here](config_options.md).
## Example
For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` .
@ -115,11 +93,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
## Override default userspace
By default the userspace used will be the same as the keymap name. In some situations this isn't desirable. For instance, if you use the [layout](feature_layouts.md) feature you can't use the same name for different keymaps (e.g. ANSI and ISO). You can name your layouts `mylayout-ansi` and `mylayout-iso` and add the following line to your layout's `rules.mk`:
```
USER_NAME := mylayout
```

@ -20,7 +20,7 @@ Compatible flashers:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line)
* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended)
* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
Flashing sequence:

@ -37,7 +37,6 @@ Debian / Ubuntu example:
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
Fedora / Red Hat example:
sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib
## Nix
@ -132,7 +131,7 @@ docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasqu
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
```bash
docker run -e keymap=default -e keyboard=ergodox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
```

@ -1,21 +0,0 @@
# Getting Help
There are a lot of resources for getting help with QMK.
## Realtime Chat
You can find QMK developers and users on our main [gitter chat room](https://gitter.im/qmk/qmk_firmware). We also have other rooms for more specific discussion:
* [Main Firmware Chat](https://gitter.im/qmk/qmk_firmware)
* [QMK Toolbox](https://gitter.im/qmk/qmk_toolbox)
* [Hardware Design Discussion](https://gitter.im/qmk/qmk_hardware)
* [Web Configurator](https://gitter.im/qmk/qmk_configurator)
* [Compiler API](https://gitter.im/qmk/qmk_compiler_api)
## OLKB Subreddit
The official QMK forum is [/r/olkb](https://reddit.com/r/olkb) on [reddit.com](https://reddit.com).
## Github Issues
You can open an [issue on GitHub](https://github.com/qmk/qmk_firmware/issues). This is especially handy when your issue will require long-term discussion or debugging.

@ -4,7 +4,7 @@
A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI.
## AVR
A line of 8-bit MCU's produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported.
A line of 8-bit MCU's produced by [Atmel](http://atmel.com). AVR was the original platform that TMK supported.
## AZERTY
The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard.

@ -4,7 +4,7 @@ We welcome all keyboard projects into QMK, but ask that you try to stick to a co
## Naming Your Keyboard/Project
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. `test`, `keyboard`, and `all` are reserved by make and are not a valid name for a keyboard.
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
## `readme.md`
@ -16,22 +16,6 @@ In an effort to keep the repo size down, we're no longer accepting images of any
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
## Keyboard Defaults
Given the amount of functionality that QMK exposes it's very easy to confuse new users. When putting together the default firmware for your keyboard we recommend limiting your enabled features and options to the minimal set needed to support your hardware. Recommendations for specific features follow.
### Bootmagic and Command
[Bootmagic](feature_bootmagic.md) and [Command](feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board.
By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in.
If your keyboard does not have 2 shift keys you should provide a working default for `IS_COMMAND`, even when you have set `COMMAND_ENABLE = no`. This will give your users a default to conform to if they do enable Command.
## Custom Keyboard Programming
As documented on [Customizing Functionality](custom_quantum_functions.md) you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`.
## Keyboard Metadata
As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK.
@ -45,8 +29,17 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
* `keyboard_name`
* A free-form text string describing the keyboard.
* Example: `Clueboard 66%`
* `manufacturer`
* A free-form text string naming the manufacturer.
* Example: `Clueboard`
* `identifier`
* The Vendor, Product, and Revision ID's joined by a :
* Example: `c1ed:2370:0001`
* `url`
* A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
* `processor`
* The MCU or CPU this keyboard uses.
* Example: `atmega32u4` or `stm32f303`
* `bootloader`
* What bootloader this keyboard uses. Available options:
* `atmel-dfu`
@ -54,9 +47,7 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
* `lufa-dfu`
* `qmk-dfu`
* `stm32-dfu-util`
* `caterina`
* `halfkay`
* `bootloadHID`
* (FIXME: This list is incomplete.)
* `maintainer`
* GitHub username of the maintainer, or `qmk` for community maintained boards
* `width`

@ -1,78 +0,0 @@
# group `defines` {#group__defines}
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) |
`define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) |
`define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) |
`define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) |
`define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) |
`define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) |
`define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) |
`define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) |
`define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) |
`define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) |
`define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) |
`define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) |
`define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) |
`define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) |
`define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) |
`define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) |
`define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) |
`define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) |
`define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) |
`define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) |
`define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) |
`define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) |
`define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) |
## Members
#### `define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) {#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79}
#### `define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) {#group__defines_1ga753706d1d28e6f96d7caf1973e80feed}
#### `define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) {#group__defines_1gab78a1c818a5f5dab7a8946543f126c69}
#### `define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) {#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909}
#### `define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) {#group__defines_1ga45f116a1daab76b3c930c2cecfaef215}
#### `define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) {#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7}
#### `define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) {#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc}
#### `define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) {#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f}
#### `define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) {#group__defines_1gabcc799504e8064679bca03f232223af4}
#### `define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) {#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42}
#### `define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) {#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe}
#### `define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) {#group__defines_1gafa5e4e295aafd15ab7893344599b3b89}
#### `define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) {#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7}
#### `define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) {#group__defines_1ga8233631c85823aa546f932ad8975caa4}
#### `define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) {#group__defines_1gab24430f0081e27215b0da84dd0ee745c}
#### `define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) {#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62}
#### `define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) {#group__defines_1gacd88ed42dba52bb4b2052c5656362677}
#### `define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) {#group__defines_1ga02947f30ca62dc332fdeb10c5868323b}
#### `define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) {#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31}
#### `define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) {#group__defines_1ga412f6ed33a2150051374bee334ee1705}
#### `define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) {#group__defines_1gafcab254838b028365ae0259729e72c4e}
#### `define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) {#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795}
#### `define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) {#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f}

@ -1,169 +0,0 @@
# group `input_callback_reg` {#group__input__callback__reg}
These are the functions you use to register your input callbacks.
The functions are called when the appropriate midi message is matched on the associated device's input.
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a control change message (cc) callback.
`public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a note on callback.
`public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a note off callback.
`public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register an after touch callback.
`public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a pitch bend callback.
`public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a song position callback.
`public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a program change callback.
`public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a channel pressure callback.
`public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a song select callback.
`public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a tc quarter frame callback.
`public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | Register a realtime callback.
`public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | Register a tune request callback.
`public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` | Register a sysex callback.
`public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | Register fall through callback.
`public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | Register a catch all callback.
## Members
#### `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718}
Register a control change message (cc) callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga3962f276c17618923f1152779552103e}
Register a note on callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d}
Register a note off callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f}
Register an after touch callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48}
Register a pitch bend callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6}
Register a song position callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127}
Register a program change callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5}
Register a channel pressure callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72}
Register a song select callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e}
Register a tc quarter frame callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a}
Register a realtime callback.
The callback will be called for all of the real time message types.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1}
Register a tune request callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` {#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48}
Register a sysex callback.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94}
Register fall through callback.
This is only called if a more specific callback is not matched and called. For instance, if you don't register a note on callback but you get a note on message the fall through callback will be called, if it is registered.
#### Parameters
* `device` the device associate with
* `func` the callback function to register
#### `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99}
Register a catch all callback.
If registered, the catch all callback is called for every message that is matched, even if a more specific or the fallthrough callback is registered.
#### Parameters
* `device` the device associate with
* `func` the callback function to register

@ -1,143 +0,0 @@
# group `midi_device` {#group__midi__device}
You use the functions when you are implementing your own midi device.
You set a send function to actually send bytes via your device, this method is called when you call a send function with this device, for instance midi_send_cc
You use the midi_device_input to process input data from the device and pass it through the device's associated callbacks.
You use the midi_device_set_pre_input_process_func if you want to have a function called at the beginning of the device's process function, generally to poll for input and pass that into midi_device_input
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) |
`enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) |
`public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` | Process input bytes. This function parses bytes and calls the appropriate callbacks associated with the given device. You use this function if you are creating a custom device and you want to have midi input.
`public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` | Set the callback function that will be used for sending output data bytes. This is only used if you're creating a custom device. You'll most likely want the callback function to disable interrupts so that you can call the various midi send functions without worrying about locking.
`public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` | Set a callback which is called at the beginning of the midi_device_process call. This can be used to poll for input data and send the data through the midi_device_input function. You'll probably only use this if you're creating a custom device.
`struct `[`_midi_device`](docs/api_midi_device.md#struct__midi__device) | This structure represents the input and output functions and processing data for a midi device.
## Members
#### `define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) {#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8}
#### `enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) {#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621}
Values | Descriptions
--------------------------------|---------------------------------------------
IDLE |
ONE_BYTE_MESSAGE |
TWO_BYTE_MESSAGE |
THREE_BYTE_MESSAGE |
SYSEX_MESSAGE |
#### `public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` {#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db}
Process input bytes. This function parses bytes and calls the appropriate callbacks associated with the given device. You use this function if you are creating a custom device and you want to have midi input.
#### Parameters
* `device` the midi device to associate the input with
* `cnt` the number of bytes you are processing
* `input` the bytes to process
#### `public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` {#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673}
Set the callback function that will be used for sending output data bytes. This is only used if you're creating a custom device. You'll most likely want the callback function to disable interrupts so that you can call the various midi send functions without worrying about locking.
#### Parameters
* `device` the midi device to associate this callback with
* `send_func` the callback function that will do the sending
#### `public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` {#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69}
Set a callback which is called at the beginning of the midi_device_process call. This can be used to poll for input data and send the data through the midi_device_input function. You'll probably only use this if you're creating a custom device.
#### Parameters
* `device` the midi device to associate this callback with
* `midi_no_byte_func_t` the actual callback function
# struct `_midi_device` {#struct__midi__device}
This structure represents the input and output functions and processing data for a midi device.
A device can represent an actual physical device [serial port, usb port] or something virtual. You should not need to modify this structure directly.
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) |
`public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) |
`public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) |
`public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) |
`public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) |
`public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) |
`public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) |
`public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) |
`public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) |
`public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) |
`public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) |
`public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) |
`public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) |
`public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) |
`public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) |
`public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) |
`public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) |
`public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) |
`public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) |
`public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) |
`public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) |
`public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) |
## Members
#### `public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) {#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9}
#### `public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) {#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1}
#### `public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) {#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c}
#### `public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) {#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84}
#### `public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) {#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f}
#### `public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) {#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18}
#### `public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) {#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586}
#### `public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) {#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da}
#### `public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) {#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7}
#### `public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) {#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f}
#### `public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) {#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0}
#### `public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) {#struct__midi__device_1a9448eba4afb7e43650434748db3777be}
#### `public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) {#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d}
#### `public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) {#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2}
#### `public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) {#struct__midi__device_1abb974ec6d734001b4a0e370f292be503}
#### `public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) {#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8}
#### `public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) {#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754}
#### `public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) {#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a}
#### `public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) {#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39}
#### `public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) {#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d}
#### `public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) {#struct__midi__device_1ada41de021135dc423abedcbb30f366ff}
#### `public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) {#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f}

@ -1,31 +0,0 @@
# group `midi_device_setup_process` {#group__midi__device__setup__process}
These are method that you must use to initialize and run a device.
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Initialize a device.
`public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Process input data.
## Members
#### `public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9}
Initialize a device.
You must call this before using the device in question.
#### Parameters
* `device` the device to initialize
#### `public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b}
Process input data.
This method drives the input processing, you must call this method frequently if you expect to have your input callbacks called.
#### Parameters
* `device` the device to process

@ -1,54 +0,0 @@
# group `midi_util` {#group__midi__util}
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) | An enumeration of the possible packet length values.
`public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` | Test to see if the byte given is a status byte.
`public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` | Test to see if the byte given is a realtime message.
`public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` | Find the length of the packet associated with the status byte given.
## Members
#### `enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) {#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e}
Values | Descriptions
--------------------------------|---------------------------------------------
UNDEFINED |
ONE |
TWO |
THREE |
An enumeration of the possible packet length values.
#### `public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` {#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5}
Test to see if the byte given is a status byte.
#### Parameters
* `theByte` the byte to test
#### Returns
true if the byte given is a midi status byte
#### `public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` {#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7}
Test to see if the byte given is a realtime message.
#### Parameters
* `theByte` the byte to test
#### Returns
true if it is a realtime message, false otherwise
#### `public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` {#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175}
Find the length of the packet associated with the status byte given.
#### Parameters
* `status` the status byte
#### Returns
the length of the packet, will return UNDEFINED if the byte is not a status byte or if it is a sysex status byte

@ -1,241 +0,0 @@
# group `send_functions` {#group__send__functions}
These are the functions you use to send midi data through a device.
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` | Send a control change message (cc) via the given device.
`public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` | Send a note on message via the given device.
`public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` | Send a note off message via the given device.
`public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` | Send an after touch message via the given device.
`public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` | Send a pitch bend message via the given device.
`public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` | Send a program change message via the given device.
`public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` | Send a channel pressure message via the given device.
`public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a clock message via the given device.
`public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a tick message via the given device.
`public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a start message via the given device.
`public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a continue message via the given device.
`public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a stop message via the given device.
`public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send an active sense message via the given device.
`public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a reset message via the given device.
`public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` | Send a tc quarter frame message via the given device.
`public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` | Send a song position message via the given device.
`public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` | Send a song select message via the given device.
`public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a tune request message via the given device.
`public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` | Send a byte via the given device.
`public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` | Send up to 3 bytes of data.
`public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` | Send an array of formatted midi data.
## Members
#### `public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` {#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960}
Send a control change message (cc) via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `num` the cc num
* `val` the value of that cc num
#### `public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775}
Send a note on message via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `num` the note number
* `vel` the note velocity
#### `public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49}
Send a note off message via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `num` the note number
* `vel` the note velocity
#### `public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` {#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f}
Send an after touch message via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `note_num` the note number
* `amt` the after touch amount
#### `public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` {#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491}
Send a pitch bend message via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `amt` the bend amount range: -8192..8191, 0 means no bend
#### `public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` {#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86}
Send a program change message via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `num` the program to change to
#### `public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` {#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b}
Send a channel pressure message via the given device.
#### Parameters
* `device` the device to use for sending
* `chan` the channel to send on, 0-15
* `amt` the amount of channel pressure
#### `public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa}
Send a clock message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga2b43c7d433d940c5b907595aac947972}
Send a tick message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc}
Send a start message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120}
Send a continue message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988}
Send a stop message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37}
Send an active sense message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b}
Send a reset message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` {#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a}
Send a tc quarter frame message via the given device.
#### Parameters
* `device` the device to use for sending
* `time` the time of this quarter frame, range 0..16383
#### `public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` {#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f}
Send a song position message via the given device.
#### Parameters
* `device` the device to use for sending
* `pos` the song position
#### `public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` {#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50}
Send a song select message via the given device.
#### Parameters
* `device` the device to use for sending
* `song` the song to select
#### `public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656}
Send a tune request message via the given device.
#### Parameters
* `device` the device to use for sending
#### `public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` {#group__send__functions_1ga857e85eb90b288385642d4d991e09881}
Send a byte via the given device.
This is a generic method for sending data via the given midi device. This would be useful for sending sysex data or messages that are not implemented in this API, if there are any. Please contact the author if you find some so we can add them.
#### Parameters
* `device` the device to use for sending
* `b` the byte to send
#### `public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` {#group__send__functions_1ga36e2f2e45369d911b76969361679054b}
Send up to 3 bytes of data.
% 4 is applied to count so that you can use this to pass sysex through
#### Parameters
* `device` the device to use for sending
* `count` the count of bytes to send, %4 is applied
* `byte0` the first byte
* `byte1` the second byte, ignored if cnt % 4 != 2
* `byte2` the third byte, ignored if cnt % 4 != 3
#### `public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` {#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead}
Send an array of formatted midi data.
Can be used for sysex.
#### Parameters
* `device` the device to use for sending
* `count` the count of bytes to send
* `array` the array of bytes

@ -1,61 +0,0 @@
# group `sysex_tools` {#group__sysex__tools}
## Summary
Members | Descriptions
--------------------------------|---------------------------------------------
`public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` | Compute the length of a message after it is encoded.
`public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` | Compute the length of a message after it is decoded.
`public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` | Encode data so that it can be transmitted safely in a sysex message.
`public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` | Decode encoded data.
## Members
#### `public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` {#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a}
Compute the length of a message after it is encoded.
#### Parameters
* `decoded_length` The length, in bytes, of the message to encode.
#### Returns
The length, in bytes, of the message after encodeing.
#### `public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` {#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0}
Compute the length of a message after it is decoded.
#### Parameters
* `encoded_length` The length, in bytes, of the encoded message.
#### Returns
The length, in bytes, of the message after it is decoded.
#### `public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742}
Encode data so that it can be transmitted safely in a sysex message.
#### Parameters
* `encoded` The output data buffer, must be at least sysex_encoded_length(length) bytes long.
* `source` The input buffer of data to be encoded.
* `length` The number of bytes from the input buffer to encode.
#### Returns
number of bytes encoded.
#### `public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229}
Decode encoded data.
#### Parameters
* `decoded` The output data buffer, must be at least sysex_decoded_length(length) bytes long.
* `source` The input buffer of data to be decoded.
* `length` The number of bytes from the input buffer to decode.
#### Returns
number of bytes decoded.

@ -6,189 +6,189 @@ This is a reference only. Each group of keys links to the page documenting their
## [Basic Keycodes](keycodes_basic.md)
|Key |Aliases |Description |
|-----------------------|--------------------|-----------------------------------------------|
|`KC_1` | |`1` and `!` |
|`KC_2` | |`2` and `@` |
|`KC_3` | |`3` and `#` |
|`KC_4` | |`4` and `$` |
|`KC_5` | |`5` and `%` |
|`KC_6` | |`6` and `^` |
|`KC_7` | |`7` and `&` |
|`KC_8` | |`8` and `*` |
|`KC_9` | |`9` and `(` |
|`KC_0` | |`0` and `)` |
|`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_F13` | | |
|`KC_F14` | | |
|`KC_F15` | | |
|`KC_F16` | | |
|`KC_F17` | | |
|`KC_F18` | | |
|`KC_F19` | | |
|`KC_F20` | | |
|`KC_F21` | | |
|`KC_F22` | | |
|`KC_F23` | | |
|`KC_F24` | | |
|`KC_A` | |`a` and `A` |
|`KC_B` | |`b` and `B` |
|`KC_C` | |`c` and `C` |
|`KC_D` | |`d` and `D` |
|`KC_E` | |`e` and `E` |
|`KC_F` | |`f` and `F` |
|`KC_G` | |`g` and `G` |
|`KC_H` | |`h` and `H` |
|`KC_I` | |`i` and `I` |
|`KC_J` | |`j` and `J` |
|`KC_K` | |`k` and `K` |
|`KC_L` | |`l` and `L` |
|`KC_M` | |`m` and `M` |
|`KC_N` | |`n` and `N` |
|`KC_O` | |`o` and `O` |
|`KC_P` | |`p` and `P` |
|`KC_Q` | |`q` and `Q` |
|`KC_R` | |`r` and `R` |
|`KC_S` | |`s` and `S` |
|`KC_T` | |`t` and `T` |
|`KC_U` | |`u` and `U` |
|`KC_V` | |`v` and `V` |
|`KC_W` | |`w` and `W` |
|`KC_X` | |`x` and `X` |
|`KC_Y` | |`y` and `Y` |
|`KC_Z` | |`z` and `Z` |
|`KC_ENTER` |`KC_ENT` |Return (Enter) |
|`KC_ESCAPE` |`KC_ESC` |Escape |
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |
|`KC_TAB` | |Tab |
|`KC_SPACE` |`KC_SPC` |Spacebar |
|`KC_MINUS` |`KC_MINS` |`-` and `_` |
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>&#124;</code> |
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and <code>&#124;</code> |
|`KC_INT1` |`KC_RO` |JIS `\` and <code>&#124;</code> |
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|`KC_INT3` |`KC_JYEN` |JIS `¥` |
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|`KC_GRAVE` |`KC_GRV` |<code>&#96;</code> and `~` |
|`KC_COMMA` |`KC_COMM` |`,` and `<` |
|`KC_DOT` | |`.` and `>` |
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |
|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock |
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|`KC_LALT` | |Left Alt |
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|`KC_RALT` | |Right Alt |
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock |
|`KC_PAUSE` |`KC_PAUS` |Pause |
|`KC_INSERT` |`KC_INS` |Insert |
|`KC_HOME` | |Home |
|`KC_PGUP` | |Page Up |
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|`KC_END` | |End |
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|`KC_LEFT` | |Left Arrow |
|`KC_DOWN` | |Down Arrow |
|`KC_UP` | |Up Arrow |
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) |
|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_POWER`.|
|`KC_EXECUTE` | |Execute |
|`KC_HELP` | |Help |
|`KC_MENU` | |Menu |
|`KC_SELECT` | |Select |
|`KC_AGAIN` | |Again |
|`KC_UNDO` | |Undo |
|`KC_CUT` | |Cut |
|`KC_COPY` | |Copy |
|`KC_PASTE` | |Paste |
|`KC_FIND` | |Find |
|`KC_ALT_ERASE` | |Alternate Erase |
|`KC_SYSREQ` | |SysReq/Attention |
|`KC_CANCEL` | |Cancel |
|`KC_CLEAR` | |Clear |
|`KC_PRIOR` | |Prior |
|`KC_RETURN` | |Return |
|`KC_SEPARATOR` | |Separator |
|`KC_OUT` | |Out |
|`KC_OPER` | |Oper |
|`KC_CLEAR_AGAIN` | |Clear/Again |
|`KC_CRSEL` | |CrSel/Props |
|`KC_EXSEL` | |ExSel |
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down. Recommended over `KC_POWER`.|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake |
|`KC_MAIL` |`KC_MAIL` | |
|`KC_CALCULATOR` |`KC_CALC` | |
|`KC_MY_COMPUTER` |`KC_MYCM` | |
|`KC_WWW_SEARCH` |`KC_WSCH` | |
|`KC_WWW_HOME` |`KC_WHOM` | |
|`KC_WWW_BACK` |`KC_WBAK` | |
|`KC_WWW_FORWARD` |`KC_WFWD` | |
|`KC_WWW_STOP` |`KC_WSTP` | |
|`KC_WWW_REFRESH` |`KC_WREF` | |
|`KC_WWW_FAVORITES` |`KC_WFAV` | |
|`KC_STOP` | |Stop |
|`KC__MUTE` | |Mute (macOS) |
|`KC__VOLUP` | |Volume Up (macOS) |
|`KC__VOLDOWN` | |Volume Down (macOS) |
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) |
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) |
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) |
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) |
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) |
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |
|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |
|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |
|`KC_KP_5` |`KC_P5` |Keypad `5` |
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` |
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|`KC_NO` | |Ignore this key (NOOP) |
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|Key |Aliases |Description |
|-----------------------|----------|-----------------------------------------------|
|`KC_1` | |`1` and `!` |
|`KC_2` | |`2` and `@` |
|`KC_3` | |`3` and `#` |
|`KC_4` | |`4` and `$` |
|`KC_5` | |`5` and `%` |
|`KC_6` | |`6` and `^` |
|`KC_7` | |`7` and `&` |
|`KC_8` | |`8` and `*` |
|`KC_9` | |`9` and `(` |
|`KC_0` | |`0` and `)` |
|`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_F13` | | |
|`KC_F14` | | |
|`KC_F15` | | |
|`KC_F16` | | |
|`KC_F17` | | |
|`KC_F18` | | |
|`KC_F19` | | |
|`KC_F20` | | |
|`KC_F21` | | |
|`KC_F22` | | |
|`KC_F23` | | |
|`KC_F24` | | |
|`KC_A` | |`a` and `A` |
|`KC_B` | |`b` and `B` |
|`KC_C` | |`c` and `C` |
|`KC_D` | |`d` and `D` |
|`KC_E` | |`e` and `E` |
|`KC_F` | |`f` and `F` |
|`KC_G` | |`g` and `G` |
|`KC_H` | |`h` and `H` |
|`KC_I` | |`i` and `I` |
|`KC_J` | |`j` and `J` |
|`KC_K` | |`k` and `K` |
|`KC_L` | |`l` and `L` |
|`KC_M` | |`m` and `M` |
|`KC_N` | |`n` and `N` |
|`KC_O` | |`o` and `O` |
|`KC_P` | |`p` and `P` |
|`KC_Q` | |`q` and `Q` |
|`KC_R` | |`r` and `R` |
|`KC_S` | |`s` and `S` |
|`KC_T` | |`t` and `T` |
|`KC_U` | |`u` and `U` |
|`KC_V` | |`v` and `V` |
|`KC_W` | |`w` and `W` |
|`KC_X` | |`x` and `X` |
|`KC_Y` | |`y` and `Y` |
|`KC_Z` | |`z` and `Z` |
|`KC_ENTER` |`KC_ENT` |Return (Enter) |
|`KC_ESCAPE` |`KC_ESC` |Escape |
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |
|`KC_TAB` | |Tab |
|`KC_SPACE` |`KC_SPC` |Spacebar |
|`KC_MINUS` |`KC_MINS` |`-` and `_` |
|`KC_EQUAL` |`KC_EQL` |`=` and `+` |
|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |
|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |
|`KC_BSLASH` |`KC_BSLS` |`\` and <code>&#124;</code> |
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |
|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and <code>&#124;</code> |
|`KC_INT1` |`KC_RO` |JIS `\` and <code>&#124;</code> |
|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |
|`KC_INT3` |`KC_JYEN` |JIS `¥` |
|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |
|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |
|`KC_GRAVE` |`KC_GRV` |<code>&#96;</code> and `~` |
|`KC_COMMA` |`KC_COMM` |`,` and `<` |
|`KC_DOT` | |`.` and `>` |
|`KC_SLASH` |`KC_SLSH` |`/` and `?` |
|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock |
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|`KC_LALT` | |Left Alt |
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|`KC_RALT` | |Right Alt |
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key) |
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock |
|`KC_PAUSE` |`KC_PAUS` |Pause |
|`KC_INSERT` |`KC_INS` |Insert |
|`KC_HOME` | |Home |
|`KC_PGUP` | |Page Up |
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|`KC_END` | |End |
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|`KC_LEFT` | |Left Arrow |
|`KC_DOWN` | |Down Arrow |
|`KC_UP` | |Up Arrow |
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) |
|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_POWER`.|
|`KC_EXECUTE` | |Execute |
|`KC_HELP` | |Help |
|`KC_MENU` | |Menu |
|`KC_SELECT` | |Select |
|`KC_AGAIN` | |Again |
|`KC_UNDO` | |Undo |
|`KC_CUT` | |Cut |
|`KC_COPY` | |Copy |
|`KC_PASTE` | |Paste |
|`KC_FIND` | |Find |
|`KC_ALT_ERASE` | |Alternate Erase |
|`KC_SYSREQ` | |SysReq/Attention |
|`KC_CANCEL` | |Cancel |
|`KC_CLEAR` | |Clear |
|`KC_PRIOR` | |Prior |
|`KC_RETURN` | |Return |
|`KC_SEPARATOR` | |Separator |
|`KC_OUT` | |Out |
|`KC_OPER` | |Oper |
|`KC_CLEAR_AGAIN` | |Clear/Again |
|`KC_CRSEL` | |CrSel/Props |
|`KC_EXSEL` | |ExSel |
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down. Recommended over `KC_POWER`.|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake |
|`KC_MAIL` |`KC_MAIL` | |
|`KC_CALCULATOR` |`KC_CALC` | |
|`KC_MY_COMPUTER` |`KC_MYCM` | |
|`KC_WWW_SEARCH` |`KC_WSCH` | |
|`KC_WWW_HOME` |`KC_WHOM` | |
|`KC_WWW_BACK` |`KC_WBAK` | |
|`KC_WWW_FORWARD` |`KC_WFWD` | |
|`KC_WWW_STOP` |`KC_WSTP` | |
|`KC_WWW_REFRESH` |`KC_WREF` | |
|`KC_WWW_FAVORITES` |`KC_WFAV` | |
|`KC_STOP` | |Stop |
|`KC__MUTE` | |Mute (macOS) |
|`KC__VOLUP` | |Volume Up (macOS) |
|`KC__VOLDOWN` | |Volume Down (macOS) |
|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) |
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) |
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) |
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) |
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) |
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) |
|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) |
|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |
|`KC_MEDIA_SELECT` |`KC_MSEL` | |
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |
|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |
|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |
|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |
|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |
|`KC_KP_1` |`KC_P1` |Keypad `1` and End |
|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |
|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |
|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |
|`KC_KP_5` |`KC_P5` |Keypad `5` |
|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |
|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |
|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |
|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |
|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |
|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |
|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |
|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` |
|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|`KC_NO` | |Ignore this key (NOOP) |
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
## [Mouse Keys](feature_mouse_keys.md)
@ -301,44 +301,44 @@ This is a reference only. Each group of keys links to the page documenting their
## [Modifiers](quantum_keycodes.md#modifiers)
|Key |Aliases |Description |
|----------|---------- |----------------------------------------------------|
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|Key |Aliases |Description |
|----------|----------|----------------------------------------------------|
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|`LGUI(kc)`| |Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|`RGUI(kc)`| |Hold Right GUI and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|`SCMD(kc)`|`SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|Key |Aliases |Description |
|------------|---------------------------------------|-------------------------------------------------------|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|Key |Aliases |Description |
|------------|------------|-------------------------------------------------------|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|`RALT_T(kc)`|`ALGR_T(kc)`|Right Alt when held, `kc` when tapped |
|`LGUI_T(kc)`|`GUI_T(kc)` |Left GUI when held, `kc` when tapped |
|`RGUI_T(kc)`| |Right GUI when held, `kc` when tapped |
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|`SCMD_T(kc)`|`SWIN_T(kc)`|Left Shift and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
@ -366,17 +366,16 @@ This is a reference only. Each group of keys links to the page documenting their
|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` |
|`KC_QUESTION` |`KC_QUES` |`?` |
## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers)
## [Switching and Toggling Layers](feature_common_shortcuts.md#switching-and-toggling-layers)
|Key |Description |
|----------------|----------------------------------------------------------------------------------|
|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
|`TO(layer)` |Turn on `layer` when pressed |
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|`DF(layer)` |Set the base (default) layer |
|`TG(layer)` |Toggle `layer` on or off |
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. |
|Key |Description |
|---------------|----------------------------------------------------------------------------------|
|`LT(layer, kc)`|Turn on `layer` when held, `kc` when tapped |
|`TO(layer)` |Turn on `layer` when pressed |
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|`DF(layer)` |Set the base (default) layer |
|`TG(layer)` |Toggle `layer` on or off |
|`TT(layer)` |Tap toggle? idk FIXME |
## [One Shot Keys](quantum_keycodes.md#one-shot-keys)
@ -391,15 +390,3 @@ This is a reference only. Each group of keys links to the page documenting their
|------------|-------|-------------------------------------------------|
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|`X(n)` | |Send Unicode character `n` via a different method|
## [Swap Hands](feature_swap_hands.md)
|Key |Description |
|-----------|-------------------------------------------------------------------------|
|`SH_T(key)`|Sends `key` with a tap; momentary swap when held. |
|`SW_ON` |Turns on swapping and leaves it on. |
|`SW_OFF` |Turn off swapping and leaves it off. Good for returning to a known state.|
|`SH_MON` |Swaps hands when pressed, returns to normal when released (momentary). |
|`SH_MOFF` |Momentarily turns off swap. |
|`SH_TG` |Toggles swap on and off with every key press. |
|`SH_TT` |Toggles with a tap; momentary when held. |

@ -101,21 +101,21 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
## Modifiers
|Key |Aliases |Description |
|-------------------|--------------------|------------------------------------|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|`KC_LALT` | |Left Alt |
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|`KC_RALT` | |Right Alt |
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|`KC_INT4` |`KC_HENK` |JIS Henkan |
|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |
|Key |Aliases |Description |
|-------------------|---------|------------------------------------|
|`KC_LCTRL` |`KC_LCTL`|Left Control |
|`KC_LSHIFT` |`KC_LSFT`|Left Shift |
|`KC_LALT` | |Left Alt |
|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) |
|`KC_RCTRL` |`KC_RCTL`|Right Control |
|`KC_RSHIFT` |`KC_RSFT`|Right Shift |
|`KC_RALT` | |Right Alt |
|`KC_RGUI` | |Right GUI (Windows/Command/Meta key)|
|`KC_LOCKING_CAPS` |`KC_LCAP`|Locking Caps Lock |
|`KC_LOCKING_NUM` |`KC_LNUM`|Locking Num Lock |
|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock |
|`KC_INT4` |`KC_HENK`|JIS Henkan |
|`KC_INT5` |`KC_MHEN`|JIS Muhenkan |
## Commands

@ -171,8 +171,6 @@ In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which
> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h).
#### `action_function()`
To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.

@ -1,16 +0,0 @@
# The Compelete Newbs Guide To QMK
QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs.
## Overview
There are 4 main sections to this guide:
* [Getting Started](newbs_getting_started.md)
* [Building Your First Firmware](newbs_building_firmware.md)
* [Flashing Firmware](newbs_flashing.md)
* [Testing and Debugging](newbs_testing_debugging.md)
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).

@ -1,73 +0,0 @@
# Building Your First Firmware
Now that you have setup your build environment you are ready to start building custom firmware. For this section of the guide we will bounce between 3 programs- your file manager, your text editor, and your terminal window. Keep all 3 open until you are done and happy with your keyboard firmware.
If you have closed and reopened your terminal window since following the first part of the guide, don't forget to `cd qmk_firmware` so that your terminal is in the correct directory.
## Navigate To Your Keymaps Folder
Start by navigating to the `keymaps` folder for your keyboard.
{% hint style='info' %}
If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
macOS:
open keyboards/<keyboard_folder>/keymaps
Windows:
start keyboards/<keyboard_folder>/keymaps
{% endhint %}
## Create a Copy Of The `default` Keymap
Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
## Open `keymap.c` In Your Favorite Text Editor
Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer.
{% hint style='danger' %}
When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.
{% endhint %}
## Customize The Layout To Your Liking
How to complete this step is entirely up to you. Make the one change that's been bugging you, or completely rework everything. You can remove layers if you don't need all of them, or add layers up to a total of 32. Check the following documentation to find out what you can define here:
* [Keycodes](keycodes.md)
* [Features](features.md)
* [FAQ](faq.md)
{% hint style='info' %}
While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise.
{% endhint %}
## Build Your Firmware
When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command:
make <my_keyboard>:<my_keymap>
For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
make planck/rev5:xyverz
While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this:
```
Linking: .build/planck_rev5_xyverz.elf [OK]
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
Checking file size of planck_rev5_xyverz.hex [OK]
* File size is fine - 18392/28672
```
## Flash Your Firmware
Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard.

@ -1,242 +0,0 @@
# Flashing Your Keyboard
Now that you've built a custom firmware file you'll want to flash your keyboard.
## Flashing Your Keyboard with QMK Toolbox
The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases).
However, the QMK Toolbox is only available for Windows and macOS currently. If you're using Linux (or just wish to flash the firmware from the command line), you'll have to use the [method outlined below](newbs_flashing.md#flash-your-keyboard-from-the-command-line).
### Load The File Into QMK Toolbox
Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory.
{% hint style='info' %}
If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
Windows:
start .
macOS:
open .
{% endhint %}
The firmware file always follows this naming format:
<keyboard_name>_<keymap_name>.{bin,hex}
For example, the `plank/rev5` with a `default` keymap will have this filename:
planck_rev5_default.hex
Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
### Put Your Keyboard Into DFU (Bootloader) Mode
In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written.
Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order:
* Hold down both shift keys and press `Pause`
* Hold down both shift keys and press `B`
* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys
* Press the physical `RESET` button on the bottom of the PCB
* Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in
When you are successful you will see a message similar to this in QMK Toolbox:
```
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
*** DFU device connected
```
### Flash Your Keyboard
Click the `Flash` button in QMK Toolbox. You will see output similar to the following:
```
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
*** DFU device connected
*** Attempting to flash, please don't remove device
>>> dfu-programmer atmega32u4 erase --force
Erasing flash... Success
Checking memory from 0x0 to 0x6FFF... Empty.
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
Checking memory from 0x0 to 0x55FF... Empty.
0% 100% Programming 0x5600 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
0% 100% Reading 0x7000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
Validating... Success
0x5600 bytes written into 0x7000 bytes memory (76.79%).
>>> dfu-programmer atmega32u4 reset
*** DFU device disconnected
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
```
## Flash your Keyboard from the Command Line
First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU.
You can find more information about the bootloaders in the [Flashing Instructions and Bootloader Information](flashing.md) page.
If you know what bootloader that you're using, then when compiling the firmware, you can actually add some extra text to the `make` command to automate the flashing process.
### DFU
For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
make <my_keyboard>:<my_keymap>:dfu
For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
make planck/rev5:xyverz:dfu
Once it finishes compiling, it should output the following:
```
Linking: .build/planck_rev5_xyverz.elf [OK]
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
Checking file size of planck_rev5_xyverz.hex
* File size is fine - 18574/28672
```
After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it.
dfu-programmer: no device present.
Error: Bootloader not found. Trying again in 5s.
Once it does this, you'll want to reset the controller. It should then show output similiar to this:
```
*** Attempting to flash, please don't remove device
>>> dfu-programmer atmega32u4 erase --force
Erasing flash... Success
Checking memory from 0x0 to 0x6FFF... Empty.
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
Checking memory from 0x0 to 0x55FF... Empty.
0% 100% Programming 0x5600 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
0% 100% Reading 0x7000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
Validating... Success
0x5600 bytes written into 0x7000 bytes memory (76.79%).
>>> dfu-programmer atmega32u4 reset
```
If you have any issues with this, you may need to this:
sudo make <my_keyboard>:<my_keymap>:dfu
### Caterina
For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
make <my_keyboard>:<my_keymap>:avrdude
For example, if your keymap is named "xyverz" and you're building a keymap for a rev2 Lets Split, you'll use this command:
make lets_split/rev2:xyverz:avrdude
Once the firmware finishes compiling, it will output something like this:
```
Linking: .build/lets_split_rev2_xyverz.elf [OK]
Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
Checking file size of lets_split_rev2_xyverz.hex [OK]
* File size is fine - 27938/28672
Detecting USB port, reset your controller now..............
```
At this point, reset the board and then the script will detect the bootloader and then flash the board. The output should look something like this:
```
Detected controller on USB port at /dev/ttyS15
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex"
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
avrdude.exe: writing flash (27938 bytes):
Writing | ################################################## | 100% 2.40s
avrdude.exe: 27938 bytes of flash written
avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% 0.43s
avrdude.exe: verifying ...
avrdude.exe: 27938 bytes of flash verified
avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude.exe done. Thank you.
```
If you have any issues with this, you may need to this:
sudo make <my_keyboard>:<my_keymap>:avrdude
## HalfKay
For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
make <my_keyboard>:<my_keymap>:teensy
For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:
make erdogox_ez:xyverz:teensy
Once the firmware finishes compiling, it will output something like this:
```
Linking: .build/ergodox_ez_xyverz.elf [OK]
Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
Checking file size of ergodox_ez_xyverz.hex [OK]
* File size is fine - 25584/32256
Teensy Loader, Command Line, Version 2.1
Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage
Waiting for Teensy device...
(hint: press the reset button)
```
At this point, reset your board. Once you've done that, you'll see output like this:
```
Found HalfKay Bootloader
Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage
Programming............................................................................................................................................................................
...................................................
Booting
```
## Test It Out!
Congrats! Your custom firmware has been programmed to your keyboard!
Give it a try and make sure everything works the way you want it to. We've written [Testing and Debugging](newbs_testing_debugging.md) to round out this Newbie Guide, so head over there to learn about how to troubleshoot your custom functionality.

@ -1,98 +0,0 @@
# Introduction
Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when they are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom layout you are creating the equivalent of an .exe for your keyboard.
QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules.
# Getting Started
Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
## Download Software
### Text Editor
You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text.
{% hint style='info' %}
Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
{% endhint %}
### QMK Toolbox
QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print.
* [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest)
* [Source Code](https://github.com/qmk/qmk_toolbox/)
## Environment Setup
We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest.
{% hint style="info" %}
If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
{% endhint %}
### Windows
You will need to install msys2 and git.
* Follow the installation instructions on the msys2 homepage: http://www.msys2.org
* Close any open msys2 terminals, and open a new terminal
* Install git by running this command: `pacman -S git`
### macOS
You will need to install homebrew. Follow the instructions on the homebrew homepage: https://brew.sh
### Linux
You will need to install git. It's extremely likely you already have it, but if not one of the following commands should install it:
* Debian/Ubuntu/Devuan: `apt-get install git`
* Fedora/Redhat/Centos: `yum install git`
* Arch: `pacman -S git`
## Download QMK
Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands:
git clone https://github.com/qmk/qmk_firmware.git
cd qmk_firmware
{% hint style='info' %}
If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message.
{% endhint %}
## Setup QMK
QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command:
./util/qmk_install.sh
## Test Your Build Environment
Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format:
make <keyboard>:default
For example, to build a firmware for a Clueboard 66% use:
make clueboard/66/rev3:default
When it is done you should have a lot of output that ends similar to this:
```
Linking: .build/clueboard_66_rev2_default.elf [OK]
Creating load file for flashing: .build/clueboard_66_rev2_default.hex [OK]
Copying clueboard_66_rev2_default.hex to qmk_firmware folder [OK]
Checking file size of clueboard_66_rev2_default.hex [OK]
* File size is fine - 25174/28672
```
## Creating Your Layout
Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that.

@ -1,33 +0,0 @@
# Testing and Debugging
Once you've flashed your keyboard with a custom firmware you're ready to test it out. With a little bit of luck everything will work perfectly, but if not this document will help you figure out what's wrong.
## Testing
Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. There are even programs that will help you make sure that no key is missed.
Note: These programs are not provided by or endorsed by QMK.
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only)
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only)
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
## Debugging With QMK Toolbox
[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode.
<!-- FIXME: Describe the debugging messages here. -->
## Sending Your Own Debug Messages
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
#include <print.h>
After that you can use a few different print functions:
* `print("string")`: Print a simple string.
* `sprintf("%s string", var)`: Print a formatted string
* `dprint("string")` Print a simple string, but only when debug mode is enabled
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled

@ -16,10 +16,6 @@
"from": "feature_common_shortcuts.html",
"to": "feature_advanced_keycodes.html"
},
{
"from": "glossary.html",
"to": "reference_glossary.html"
},
{
"from": "key_lock.html",
"to": "feature_key_lock.html"

@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map
Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to.
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document.
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/rev2/rev2.h). Explaining that is outside the scope of this document.
##### Keycode Assignment
@ -135,8 +135,8 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L128)
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L140)
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L143)
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/card.c#L20)
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/cluecard.c#L20)
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/keymaps/default/keymap.c#L58)
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_midi.c#L102)
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_audio.c#L10)
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_music.c#L69)

@ -1,32 +0,0 @@
tmk_core/protocol
tmk_core/protocol/bluefruit
tmk_core/protocol/chibios
tmk_core/protocol/iwrap
tmk_core/protocol/lufa
tmk_core/protocol/mbed
tmk_core/protocol/midi
tmk_core/protocol/midi/bytequeue
tmk_core/protocol/midi/Config
tmk_core/protocol/pjrc
tmk_core/protocol/usb_hid
tmk_core/protocol/vusb
tmk_core/tool
tmk_core/tool/chibios
quantum
quantum/api
quantum/audio
quantum/keymap_extras
quantum/process_keycode
quantum/serial_link
quantum/serial_link/protocol
quantum/serial_link/system
quantum/serial_link/tests
quantum/tools
quantum/visualizer
quantum/visualizer/resources
drivers
drivers/avr
drivers/ugfx
drivers/ugfx/gdisp
drivers/ugfx/gdisp/is31fl3731c
drivers/ugfx/gdisp/st7565

@ -0,0 +1,219 @@
/* Copyright 2018 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 "twi2c.h"
#include <string.h>
#include <hal.h>
#include "hal_i2cslave.h"
#include "chprintf.h"
#include "memstreams.h"
#include "printf.h"
#include "matrix.h"
/**
* I2C slave test routine.
*
* To use: Add file to a project, call startComms() with the address of a serial stream
*
* There are two different responses:
* a) A read-only transaction - returns the "Initial Reply" message
* b) A write then read transaction - calls a message processor and returns the generated reply.
* Stretches clock until reply available.
*/
// static const I2CConfig masterI2CConfig = {
// 400000
// };
I2CSlaveMsgCB twi2c_slave_message_process, catchError, clearAfterSend;
static const I2CConfig slaveI2CConfig = {
STM32_TIMINGR_PRESC(15U) |
STM32_TIMINGR_SCLDEL(4U) | STM32_TIMINGR_SDADEL(2U) |
STM32_TIMINGR_SCLH(15U) | STM32_TIMINGR_SCLL(21U),
0,
0,
NULL
};
char initialReplyBody[50] = "Initial reply"; // 'Status' response if read without preceding write
uint32_t messageCounter = 0; /* Counts number of messages received to return as part of response */
uint8_t rxBody[2]; /* stores last message master sent us (intentionally a few bytes smaller than txBody) */
uint8_t txBody[MATRIX_ROWS/2]; /* Return message buffer for computed replies */
BaseSequentialStream *chp = NULL; // Used for serial logging
// Handler when something sent to us
const I2CSlaveMsg echoRx =
{
sizeof(rxBody), /* max sizeof received msg body */
rxBody, /* body of received msg */
NULL, /* do nothing on address match */
twi2c_slave_message_process, /* Routine to process received messages */
catchError /* Error hook */
};
// // 'Empty' reply when nothing to say, and no message received. In RAM, to allow update
I2CSlaveMsg initialReply =
{
sizeof(initialReplyBody), /* trailing zero byte will be repeated as needed */
(uint8_t *)initialReplyBody,
NULL, /* do nothing on address match */
NULL, /* do nothing after reply sent */
catchError /* Error hook */
};
// // 'Empty' reply when nothing to say, and no message received. In RAM, to allow update
// I2CSlaveMsg initialReply =
// {
// 0, /* trailing zero byte will be repeated as needed */
// NULL,
// NULL, /* do nothing on address match */
// NULL, /* do nothing after reply sent */
// catchError /* Error hook */
// };
// Response to received messages
I2CSlaveMsg echoReply = { /* this is in RAM so size may be updated */
MATRIX_ROWS / 2, /* filled in with the length of the message to send */
txBody, /* Response message */
NULL, /* do nothing special on address match */
clearAfterSend, /* Clear receive buffer once replied */
catchError /* Error hook */
};
/**
* Track I2C errors
*/
uint8_t gotI2cError = 0;
uint32_t lastI2cErrorFlags = 0;
// Called from ISR to log error
void noteI2cError(uint32_t flags)
{
lastI2cErrorFlags = flags;
gotI2cError = 1;
}
/**
* Generic error handler
*
* Called in interrupt context, so need to watch what we do
*/
void catchError(I2CDriver *i2cp)
{
noteI2cError(i2cp->errors);
}
extern void matrix_copy(matrix_row_t * copy);
const char hexString[16] = "0123456789abcdef";
/**
* Message processor - looks at received message, determines reply as quickly as possible
*
* Responds with the value of the messageCounter (in hex), followed by the received message in [..]
*
* Note: Called in interrupt context, so need to be quick!
*/
void twi2c_slave_message_process(I2CDriver *i2cp) {
// size_t len = i2cSlaveBytes(i2cp); // Number of bytes received
// memset(txBody, 0, MATRIX_ROWS / 2 * sizeof(matrix_row_t));
matrix_copy(txBody);
echoReply.size = MATRIX_ROWS / 2;
i2cSlaveReplyI(i2cp, &echoReply);
}
/**
* Callback after sending of response complete - restores default reply in case polled
*/
void clearAfterSend(I2CDriver *i2cp)
{
// echoReply.size = 0; // Clear receive message
// i2cSlaveReplyI(i2cp, &initialReply);
}
/**
* Start the I2C Slave port to accept comms from master CPU
*
* We then go into a loop checking for errors, and never return
*/
void twi2c_slave_init(void) {
palSetGroupMode(GPIOB,8,9, PAL_MODE_INPUT); // Try releasing special pins for a short time
chThdSleepMilliseconds(10);
/* I2C1 SCL on PF1, SDA on PF0 */
palSetPadMode(GPIOB, 9, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
i2cStart(&I2C_DRIVER, &slaveI2CConfig);
#if HAL_USE_I2C_SLAVE
I2C_DRIVER.slaveTimeout = MS2ST(100); // Time for complete message
#endif
// i2cSlaveConfigure(&I2C_DRIVER, &echoRx, &initialReply);
memset(txBody, 0, MATRIX_ROWS / 2 * sizeof(matrix_row_t));
i2cSlaveConfigure(&I2C_DRIVER, &echoRx, &echoReply);
// Enable match address after everything else set up
i2cMatchAddress(&I2C_DRIVER, slaveI2Caddress/2);
// i2cMatchAddress(&I2C_DRIVER, myOtherI2Caddress/2);
// i2cMatchAddress(&I2C_DRIVER, 0); /* "all call" */
printf("Slave I2C started\n\r");
}
void twi2c_slave_task(void) {
if (gotI2cError) {
gotI2cError = 0;
printf("I2cError: %04x\r\n", lastI2cErrorFlags);
}
}
void twi2c_master_init(void) {
palSetGroupMode(GPIOB,8,9, PAL_MODE_INPUT); // Try releasing special pins for a short time
chThdSleepMilliseconds(10);
palSetPadMode(GPIOB, 9, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP);
i2cStart(&I2C_DRIVER, &slaveI2CConfig);
// try high drive (from kiibohd)
// I2C_DRIVER.i2c->C2 |= I2Cx_C2_HDRS;
// try glitch fixing (from kiibohd)
// I2C_DRIVER.i2c->FLT = 4;
}

@ -1,4 +1,4 @@
/* Copyright 2017 Cole Markham, WoodKeys.click
/* Copyright 2018 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
@ -14,18 +14,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "ch.h"
#include "hal.h"
#include "../../config.h"
#ifndef I2C_DRIVER
#define I2C_DRIVER I2CD1
#endif
// place overrides here
#define MUSIC_MASK (keycode != KC_NO)
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(IMPERIAL_MARCH)
// Disable music mode to keep the firmware size down
#define NO_MUSIC_MODE
#define slaveI2Caddress 0x30 /* Address in our terms - halved by later code */
//#define myOtherI2Caddress 0x19
#endif
I2CSlaveMsgCB twi2c_slave_message_process, catchError, clearAfterSend;
#endif
void twi2c_slave_init(void);
void twi2c_master_init(void);

@ -1,5 +0,0 @@
# List of all the board related files.
BOARDSRC = $(BOARD_PATH)/boards/IC_TEENSY_3_1/board.c
# Required include directories
BOARDINC = $(BOARD_PATH)/boards/IC_TEENSY_3_1

@ -3,7 +3,7 @@
#include "quantum.h"
#define LAYOUT_all( \
#define KEYMAP( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
@ -17,50 +17,4 @@
{ K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \
}
/* ANSI variant. No extra keys for ISO */
#define LAYOUT_60_ansi( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K401, K403, K406, K410, K411, K413, K414 \
) LAYOUT_all( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \
K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\
K400, K401, K403, K406, K410, K411, K413, K414 \
)
/* ISO variant. Remove useless ANSI keys */
#define LAYOUT_60_iso( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K401, K403, K406, K410, K411, K413, K414 \
) LAYOUT_all( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\
K400, K401, K403, K406, K410, K411, K413, K414 \
)
/* HHKB Variant */
#define LAYOUT_60_ansi_split_bs_rshift( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
K400, K401, K403, K406, K410, K411, K413, K414 \
) LAYOUT_all( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014,\
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \
K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
K400, K401, K403, K406, K410, K411, K413, K414 \
)
#endif
#endif

@ -1,24 +0,0 @@
{
"keyboard_name": "1up60rgb",
"url": "",
"maintainer": "qmk",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_60_ansi": {
"layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}]
},
"LAYOUT_60_iso": {
"layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_60_ansi_split_bs_rshift": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
}
}
}

@ -2,14 +2,14 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_all(
KEYMAP(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
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_ENT,
KC_LSFT, 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_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
LAYOUT_all(
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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,

@ -2,14 +2,14 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_all(
KEYMAP(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT,
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_NUHS, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
LAYOUT_all(
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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,

@ -2,14 +2,14 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_all(
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_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_ENT,
KC_LSFT, 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(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL),
LAYOUT_all(
KEYMAP(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS,

@ -53,6 +53,4 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= yes
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift
RGBLIGHT_ENABLE ?= yes

@ -1,4 +1,5 @@
/* Copyright 2017 Zach White <skullydazed@gmail.com>
/* Copyright 2017 skully <skullydazed@gmail.com>
* 2018 Jack Humbert <jack.humb@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -13,12 +14,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "_qmk_handwire.h"
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
void matrix_init_kb(void) {
#include "config_common.h"
}
// place overrides here
void matrix_scan_kb(void) {
#endif
}

@ -0,0 +1,59 @@
/* Copyright 2017 skully <skullydazed@gmail.com>
* 2018 Jack Humbert <jack.humb@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QMK_HANDWIRE_H
#define QMK_HANDWIRE_H
#include "quantum.h"
/*
* These are shortcuts to help you work with the various layout options. If your
* keymap works with one of the LAYOUT_...() macros you are encouraged to use that
* and to contribute your keymap to the corresponding layout in
* `qmk_firmware/layouts/community`.
*/
/* The fully-featured KEYMAP() that has every single key available in the matrix.
*/
#define KEYMAP(\
j00, j01, j02, j03, j04, j05, j06, \
j10, j11, j12, j13, j14, j15, j16, \
j20, j21, j22, j23, j24, j25, j26, \
j30, j31, j32, j33, j34, j35, \
j40, j41, j42, j43, j44, \
j54, j55, j56, \
k00, k01, k02, k03, k04, k05, k06, \
k10, k11, k12, k13, k14, k15, k16, \
k20, k21, k22, k23, k24, k25, k26, \
k31, k32, k33, k34, k35, k36, \
k42, k43, k44, k45, k46, \
k50, k51, k52 \
) { \
{ j00, j01, j02, j03, j04, j05, j06 }, \
{ j10, j11, j12, j13, j14, j15, j16 }, \
{ j20, j21, j22, j23, j24, j25, j26 }, \
{ j30, j31, j32, j33, j34, j35, 0 }, \
{ j40, j41, j42, j43, j44, 0, 0 }, \
{ 0, 0, 0, 0, j54, j55, j56 }, \
{ k00, k01, k02, k03, k04, k05, k06 }, \
{ k10, k11, k12, k13, k14, k15, k16 }, \
{ k20, k21, k22, k23, k24, k25, k26 }, \
{ 0, k31, k32, k33, k34, k35, k36 }, \
{ 0, 0, k42, k43, k44, k45, k46 }, \
{ k50, k51, k52, 0, 0, 0, 0 } \
}
#endif

@ -0,0 +1,126 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "hal.h"
#if HAL_USE_PAL || defined(__DOXYGEN__)
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
const PALConfig pal_default_config = {
#if STM32_HAS_GPIOA
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
#endif
#if STM32_HAS_GPIOB
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
#endif
#if STM32_HAS_GPIOC
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
#endif
#if STM32_HAS_GPIOD
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
#endif
#if STM32_HAS_GPIOE
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
#endif
#if STM32_HAS_GPIOF
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
#endif
#if STM32_HAS_GPIOG
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
#endif
#if STM32_HAS_GPIOH
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
#endif
#if STM32_HAS_GPIOI
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
#endif
};
#endif
void enter_bootloader_mode_if_requested(void);
/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
stm32_clock_init();
}
#if HAL_USE_SDC || defined(__DOXYGEN__)
/**
* @brief SDC card detection.
*/
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp;
/* TODO: Fill the implementation.*/
return true;
}
/**
* @brief SDC card write protection detection.
*/
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp;
/* TODO: Fill the implementation.*/
return false;
}
#endif /* HAL_USE_SDC */
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
*/
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp;
/* TODO: Fill the implementation.*/
return true;
}
/**
* @brief MMC_SPI card write protection detection.
*/
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp;
/* TODO: Fill the implementation.*/
return false;
}
#endif
/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,5 @@
# List of all the board related files.
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c
# Required include directories
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC

@ -0,0 +1,7 @@
/* Address for jumping to bootloader on STM32 chips. */
/* It is chip dependent, the correct number can be looked up here:
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
* This also requires a patch to chibios:
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
*/
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800

@ -0,0 +1,520 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/chconf.h
* @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config
* @details Kernel related settings and hooks.
* @{
*/
#ifndef CHCONF_H
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
/*===========================================================================*/
/**
* @name System timers settings
* @{
*/
/*===========================================================================*/
/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
#define CH_CFG_ST_RESOLUTION 32
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#define CH_CFG_ST_FREQUENCY 10000
/**
* @brief Time delta constant for the tick-less mode.
* @note If this value is zero then the system uses the classic
* periodic tick. This value represents the minimum number
* of ticks that is safe to specify in a timeout directive.
* The value one is not valid, timeouts are rounded up to
* this value.
*/
#define CH_CFG_ST_TIMEDELTA 2
/** @} */
/*===========================================================================*/
/**
* @name Kernel parameters and options
* @{
*/
/*===========================================================================*/
/**
* @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero
* disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* @note Disabling the round robin preemption makes the kernel more compact
* and generally faster.
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
#define CH_CFG_TIME_QUANTUM 0
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#define CH_CFG_MEMCORE_SIZE 0
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread. The application @p main()
* function becomes the idle thread and must implement an
* infinite loop.
*/
#define CH_CFG_NO_IDLE_THREAD FALSE
/** @} */
/*===========================================================================*/
/**
* @name Performance options
* @{
*/
/*===========================================================================*/
/**
* @brief OS optimization.
* @details If enabled then time efficient rather than space efficient code
* is used when two possible implementations exist.
*
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
#define CH_CFG_OPTIMIZE_SPEED TRUE
/** @} */
/*===========================================================================*/
/**
* @name Subsystem options
* @{
*/
/*===========================================================================*/
/**
* @brief Time Measurement APIs.
* @details If enabled then the time measurement APIs are included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_TM TRUE
/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_REGISTRY TRUE
/**
* @brief Threads synchronization APIs.
* @details If enabled then the @p chThdWait() function is included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_WAITEXIT TRUE
/**
* @brief Semaphores APIs.
* @details If enabled then the Semaphores APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_SEMAPHORES TRUE
/**
* @brief Semaphores queuing mode.
* @details If enabled then the threads are enqueued on semaphores by
* priority rather than in FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
/**
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MUTEXES TRUE
/**
* @brief Enables recursive behavior on mutexes.
* @note Recursive mutexes are heavier and have an increased
* memory footprint.
*
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
/**
* @brief Conditional Variables APIs.
* @details If enabled then the conditional variables APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
#define CH_CFG_USE_CONDVARS TRUE
/**
* @brief Conditional Variables APIs with timeout.
* @details If enabled then the conditional variables APIs with timeout
* specification are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
/**
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_EVENTS TRUE
/**
* @brief Events Flags APIs with timeout.
* @details If enabled then the events APIs with timeout specification
* are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
/**
* @brief Synchronous Messages APIs.
* @details If enabled then the synchronous messages APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MESSAGES TRUE
/**
* @brief Synchronous Messages queuing mode.
* @details If enabled then messages are served by priority rather than in
* FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
* included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
#define CH_CFG_USE_MAILBOXES TRUE
/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MEMCORE TRUE
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
#define CH_CFG_USE_HEAP TRUE
/**
* @brief Memory Pools Allocator APIs.
* @details If enabled then the memory pools allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MEMPOOLS TRUE
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#define CH_CFG_USE_DYNAMIC TRUE
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, kernel statistics.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_STATISTICS FALSE
/**
* @brief Debug option, system state check.
* @details If enabled the correct call protocol for system APIs is checked
* at runtime.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
/**
* @brief Debug option, parameters checks.
* @details If enabled then the checks on the API functions input
* parameters are activated.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_ENABLE_CHECKS FALSE
/**
* @brief Debug option, consistency checks.
* @details If enabled then all the assertions in the kernel code are
* activated. This includes consistency checks inside the kernel,
* runtime anomalies and port-defined checks.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_ENABLE_ASSERTS FALSE
/**
* @brief Debug option, trace buffer.
* @details If enabled then the trace buffer is activated.
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
/**
* @brief Trace buffer entries.
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
* different from @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
* @details If enabled then a runtime stack check is performed.
*
* @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way.
* It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
#define CH_DBG_ENABLE_STACK_CHECK TRUE
/**
* @brief Debug option, stacks initialization.
* @details If enabled then the threads working area is filled with a byte
* value when a thread is created. This can be useful for the
* runtime measurement of the used stack.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_FILL_THREADS FALSE
/**
* @brief Debug option, threads profiling.
* @details If enabled then a field is added to the @p thread_t structure that
* counts the system ticks occurred while executing the thread.
*
* @note The default is @p FALSE.
* @note This debug option is not currently compatible with the
* tickless mode.
*/
#define CH_DBG_THREADS_PROFILING FALSE
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
#define CH_CFG_THREAD_EXTRA_FIELDS \
/* Add threads custom fields here.*/
/**
* @brief Threads initialization hook.
* @details User initialization code added to the @p chThdInit() API.
*
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
/* Add threads initialization code here.*/ \
}
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
}
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
/* Context switch code here.*/ \
}
/**
* @brief ISR enter hook.
*/
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \
}
/**
* @brief ISR exit hook.
*/
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \
}
/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
/* Idle-enter code here.*/ \
}
/**
* @brief Idle thread leave hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
/* Idle-leave code here.*/ \
}
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
#define CH_CFG_IDLE_LOOP_HOOK() { \
/* Idle loop code here.*/ \
}
/**
* @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue.
*/
#define CH_CFG_SYSTEM_TICK_HOOK() { \
/* System tick event code here.*/ \
}
/**
* @brief System halt hook.
* @details This hook is invoked in case to a system halting error before
* the system is halted.
*/
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
/* System halt code here.*/ \
}
/**
* @brief Trace hook.
* @details This hook is invoked each time a new record is written in the
* trace buffer.
*/
#define CH_CFG_TRACE_HOOK(tep) { \
/* Trace code here.*/ \
}
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
#endif /* CHCONF_H */
/** @} */

@ -0,0 +1,134 @@
/*
* Copyright 2017 skully <skullydazed@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
/* USB Device descriptor parameter */
#define VENDOR_ID 0x125A
#define PRODUCT_ID 0x1770
#define DEVICE_VER 0x0001
#define MANUFACTURER QMK
#define PRODUCT Handwire
#define DESCRIPTION "Handwire protoboard"
/* key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 7
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
/* Note: These are not used for arm boards. They're here purely as documentation.
* #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 }
* #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 }
* #define UNUSED_PINS
*/
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 6
/* Prevent modifiers from being stuck on after layer changes. */
#define PREVENT_STUCK_MODIFIERS
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
//#define LOCKING_RESYNC_ENABLE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/* key combination for magic key 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
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 1
#define NO_USB_STARTUP_CHECK
#endif

@ -0,0 +1,395 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/halconf.h
* @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use
* this file in order to override the device drivers default settings.
*
* @addtogroup HAL_CONF
* @{
*/
#ifndef HALCONF_H
#define HALCONF_H
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
#define HAL_USE_CAN FALSE
#endif
/**
* @brief Enables the DAC subsystem.
*/
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2C Slave subsystem.
*/
#if !defined(HAL_USE_I2C_SLAVE) || defined(__DOXYGEN__)
#define HAL_USE_I2C_SLAVE TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC FALSE
#endif
/**
* @brief Enables the MMC_SPI subsystem.
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the QSPI subsystem.
*/
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
#define HAL_USE_QSPI FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL FALSE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB TRUE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
#define HAL_USE_WDG FALSE
#endif
/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
#define ADC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
/**
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE
#endif
/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE
#endif
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100
#endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SERIAL_USB driver related setting. */
/*===========================================================================*/
/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
/**
* @brief Serial over USB number of buffers.
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* UART driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
#define UART_USE_WAIT FALSE
#endif
/**
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
/* USB driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
#define USB_USE_WAIT TRUE
#endif
#endif /* HALCONF_H */
/** @} */

@ -0,0 +1,126 @@
#include "_qmk_handwire.h"
#define _______ KC_TRNS
enum keyboard_layers {
_BL,
_FL,
_CL
};
enum custom_keycodes {
S_BSKTC = SAFE_RANGE,
S_ODEJY,
S_RCKBY,
S_DOEDR,
S_SCALE,
S_ONEUP,
S_COIN,
S_SONIC,
S_ZELDA
};
#ifdef AUDIO_ENABLE
float song_basketcase[][2] = SONG(BASKET_CASE);
float song_ode_to_joy[][2] = SONG(ODE_TO_JOY);
float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY);
float song_doe_a_deer[][2] = SONG(DOE_A_DEER);
float song_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float song_coin[][2] = SONG(COIN_SOUND);
float song_one_up[][2] = SONG(ONE_UP_SOUND);
float song_sonic_ring[][2] = SONG(SONIC_RING);
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
#endif
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_END,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N,
KC_NO, KC_LCTL, KC_LALT, KC_LGUI, MO(1),
KC_SPC, MO(1), RESET,
KC_INS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_QUOT,
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
RESET, MO(2), KC_SPC
)
// [0] = KEYMAP(
// KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL,
// KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_HOME,
// KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_END,
// KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
// KC_NO, KC_LCTL, KC_LALT, KC_LGUI, MO(1),
// KC_SPC, MO(1), RESET,
// KC_INS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
// KC_PGUP, KC_J, KC_L, KC_U, KC_Y, KC_COLN, KC_DEL,
// KC_PGDN, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
// KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
// KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
// RESET, MO(2), KC_SPC
// )
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case S_BSKTC:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_basketcase);
}
return false;
case S_ODEJY:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_ode_to_joy);
}
return false;
case S_RCKBY:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_rock_a_bye_baby);
}
return false;
case S_DOEDR:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_doe_a_deer);
}
return false;
case S_SCALE:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_scale);
}
return false;
case S_ONEUP:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_one_up);
}
return false;
case S_COIN:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_coin);
}
return false;
case S_SONIC:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_sonic_ring);
}
return false;
case S_ZELDA:
if (record->event.pressed) {
stop_all_notes();
PLAY_SONG(song_zelda_puzzle);
}
return false;
}
return true;
}

@ -0,0 +1 @@
# The default keymap for clueboard 60%

@ -0,0 +1,53 @@
/*
* Copyright 2017 skully <skullydazed@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hal.h"
#include "backlight.h"
#include "led.h"
#include "printf.h"
void backlight_init_ports(void) {
printf("backlight_init_ports()\n");
#ifdef BACKLIGHT_ENABLE
// palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
// palSetPad(GPIOB, 8);
#endif
}
void backlight_set(uint8_t level) {
printf("backlight_set(%d)\n", level);
#ifdef BACKLIGHT_ENABLE
if (level == 0) {
// Turn backlight off
// palSetPad(GPIOB, 8);
} else {
// Turn backlight on
// palClearPad(GPIOB, 8);
}
#endif
}
void led_set_kb(uint8_t usb_led) {
printf("led_set_kb(%d)\n", usb_led);
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
// palSetPad(GPIOB, 7);
} else {
// Turn capslock off
// palClearPad(GPIOB, 7);
}
}

@ -0,0 +1,222 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "hal.h"
#include "timer.h"
#include "wait.h"
#include "printf.h"
#include "backlight.h"
#include "matrix.h"
#include "usb_main.h"
#include "twi2c.h"
/* QMK Handwire
*
* Column pins are input with internal pull-down.
* Row pins are output and strobe with high.
* Key is high or 1 when it turns on.
*
* col: { A13, A14, A15, B3, B4, B5, B6 }
* row: { B10, B2, B1, B0, A7, A6 }
*/
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static bool debouncing = false;
static uint16_t debouncing_time = 0;
static bool master = false;
static bool right_hand = false;
__attribute__ ((weak))
void matrix_init_user(void) {}
__attribute__ ((weak))
void matrix_scan_user(void) {}
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
}
__attribute__ ((weak))
void matrix_scan_kb(void) {
matrix_scan_user();
}
void matrix_init(void) {
printf("matrix init\n");
// debug_matrix = true;
// C13 is connected to VCC on the right hand
palSetPadMode(GPIOC, 13, PAL_MODE_INPUT);
wait_us(20);
right_hand = palReadPad(GPIOC, 13);
// if USB is active, this is the master
// master = usbGetDriverStateI(&USB_DRIVER) == USB_ACTIVE;
master = right_hand;
if (master) {
twi2c_master_init();
} else {
twi2c_slave_init();
}
/* Column(sense) */
palSetPadMode(GPIOA, 13, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOA, 14, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOB, 3, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOB, 4, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOB, 5, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOB, 6, PAL_MODE_INPUT_PULLDOWN);
/* Row(strobe) */
palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
// palClearPad(GPIOB, 7); // Turn off capslock
matrix_init_quantum();
}
matrix_row_t matrix_scan_common(uint8_t row) {
matrix_row_t data;
// strobe row { A6, A7, B0, B1, B2, B10 }
switch (row) {
case 5: palSetPad(GPIOA, 6); break;
case 4: palSetPad(GPIOA, 7); break;
case 3: palSetPad(GPIOB, 0); break;
case 2: palSetPad(GPIOB, 1); break;
case 1: palSetPad(GPIOB, 2); break;
case 0: palSetPad(GPIOB, 10); break;
}
// need wait to settle pin state
wait_us(20);
// read col data { B6, B5, B4, B3, A15, A14, A13 }
data = (
(palReadPad(GPIOB, 6) << 6 ) |
(palReadPad(GPIOB, 5) << 5 ) |
(palReadPad(GPIOB, 4) << 4 ) |
(palReadPad(GPIOB, 3) << 3 ) |
(palReadPad(GPIOA, 15) << 2 ) |
(palReadPad(GPIOA, 14) << 1 ) |
(palReadPad(GPIOA, 13) << 0 )
);
// unstrobe row { A6, A7, B0, B1, B2, B10 }
switch (row) {
case 5: palClearPad(GPIOA, 6); break;
case 4: palClearPad(GPIOA, 7); break;
case 3: palClearPad(GPIOB, 0); break;
case 2: palClearPad(GPIOB, 1); break;
case 1: palClearPad(GPIOB, 2); break;
case 0: palClearPad(GPIOB, 10); break;
}
return data;
}
const uint8_t command[2] = { 0x01, 0x00 };
uint8_t other_matrix[MATRIX_ROWS] = { 0 };
void matrix_scan_master(void) {
msg_t resp;
// resp = twi2c_master_send(slaveI2Caddress/2, command, 2, other_matrix, US2ST(100));
resp = i2cMasterTransmitTimeout(&I2C_DRIVER, slaveI2Caddress/2, command, 2, other_matrix, MATRIX_ROWS / 2, MS2ST(100));
// resp = i2cMasterReceiveTimeout(&I2C_DRIVER, slaveI2Caddress/2, other_matrix, MATRIX_ROWS / 2, US2ST(100));
// printf("%x\n", resp);
// if (resp != MSG_OK) {
// for (i = 0; i < MATRIX_ROWS / 2; i++) {
// resp = i2cMasterReceiveTimeout(&I2C_DRIVER, slaveI2Caddress/2, other_matrix, MATRIX_ROWS / 2, US2ST(100));
// }
// }
if (resp == MSG_OK) {
uint8_t * matrix_pointer;
if (right_hand) {
matrix_pointer = matrix;
} else {
matrix_pointer = matrix + (MATRIX_ROWS / 2);
}
memcpy(matrix_pointer, other_matrix, MATRIX_ROWS / 2);
}
}
uint8_t matrix_scan(void) {
for (int row = 0; row < MATRIX_ROWS; row++) {
matrix_row_t data = 0;
if ((right_hand && row >= 6) || (!right_hand && row < 6)) {
data = matrix_scan_common(row % 6);
}
if (matrix_debouncing[row] != data) {
matrix_debouncing[row] = data;
debouncing = true;
debouncing_time = timer_read();
}
}
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
for (int row = 0; row < MATRIX_ROWS; row++) {
matrix[row] = matrix_debouncing[row];
}
debouncing = false;
}
if (master) {
matrix_scan_master();
}
matrix_scan_quantum();
return 1;
}
bool matrix_is_on(uint8_t row, uint8_t col) {
return (matrix[row] & (1<<col));
}
matrix_row_t matrix_get_row(uint8_t row) {
return matrix[row];
}
void matrix_copy(matrix_row_t * copy) {
uint8_t * matrix_pointer;
if (right_hand) {
matrix_pointer = matrix + (MATRIX_ROWS / 2);
} else {
matrix_pointer = matrix;
}
memcpy(copy, matrix_pointer, MATRIX_ROWS / 2);
}
void matrix_print(void) {
printf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
printf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<<col))
printf("1");
else
printf("0");
}
printf("\n");
}
}

@ -0,0 +1,257 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef MCUCONF_H
#define MCUCONF_H
/*
* STM32F3xx drivers configuration.
* The following settings override the default settings present in
* the various device driver implementation headers.
* Note that the settings for each driver only have effect if the whole
* driver is enabled in halconf.h.
*
* IRQ priorities:
* 15...0 Lowest...Highest.
*
* DMA priorities:
* 0...3 Lowest...Highest.
*/
#define STM32F3xx_MCUCONF
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#define STM32_PREDIV_VALUE 1
#define STM32_PLLMUL_VALUE 9
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
#define STM32_USART1SW STM32_USART1SW_PCLK
#define STM32_USART2SW STM32_USART2SW_PCLK
#define STM32_USART3SW STM32_USART3SW_PCLK
#define STM32_UART4SW STM32_UART4SW_PCLK
#define STM32_UART5SW STM32_UART5SW_PCLK
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
#define STM32_RTCSEL STM32_RTCSEL_LSI
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
#undef STM32_HSE_BYPASS
// #error "oh no"
// #endif
/*
* ADC driver system settings.
*/
#define STM32_ADC_DUAL_MODE FALSE
#define STM32_ADC_COMPACT_SAMPLES FALSE
#define STM32_ADC_USE_ADC1 FALSE
#define STM32_ADC_USE_ADC2 FALSE
#define STM32_ADC_USE_ADC3 FALSE
#define STM32_ADC_USE_ADC4 FALSE
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_ADC2_DMA_PRIORITY 2
#define STM32_ADC_ADC3_DMA_PRIORITY 2
#define STM32_ADC_ADC4_DMA_PRIORITY 2
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
/*
* CAN driver system settings.
*/
#define STM32_CAN_USE_CAN1 FALSE
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
/*
* DAC driver system settings.
*/
#define STM32_DAC_DUAL_MODE FALSE
#define STM32_DAC_USE_DAC1_CH1 TRUE
#define STM32_DAC_USE_DAC1_CH2 TRUE
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM4 FALSE
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
/*
* I2C driver system settings.
*/
#define STM32_I2C_USE_I2C1 TRUE
#define STM32_I2C_USE_I2C2 FALSE
#define STM32_I2C_BUSY_TIMEOUT 50
#define STM32_I2C_I2C1_IRQ_PRIORITY 10
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
#define STM32_I2C_USE_DMA TRUE
#define STM32_I2C_I2C1_DMA_PRIORITY 1
#define STM32_I2C_I2C2_DMA_PRIORITY 1
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 FALSE
#define STM32_ICU_USE_TIM2 FALSE
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 FALSE
#define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12
#define STM32_SERIAL_UART4_PRIORITY 12
#define STM32_SERIAL_UART5_PRIORITY 12
/*
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 FALSE
#define STM32_SPI_USE_SPI2 FALSE
#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI3_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
/*
* ST driver system settings.
*/
#define STM32_ST_IRQ_PRIORITY 8
#define STM32_ST_USE_TIMER 2
/*
* UART driver system settings.
*/
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 FALSE
#define STM32_UART_USART1_IRQ_PRIORITY 12
#define STM32_UART_USART2_IRQ_PRIORITY 12
#define STM32_UART_USART3_IRQ_PRIORITY 12
#define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_USART3_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
/*
* USB driver system settings.
*/
#define STM32_USB_USE_USB1 TRUE
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
/*
* WDG driver system settings.
*/
#define STM32_WDG_USE_IWDG FALSE
#endif /* MCUCONF_H */

@ -1,13 +1,14 @@
# Clueboard 2x1800
# QMK Handwire
Clueboard Double 1800 All The Way
An Arm-based handwire board.
* Keyboard Maintainer: [Zach White](https://github.com/skullydazed)
* Hardware Supported: Clueboard 2x1800 PCB
* Hardware Availability: 2018 Apr 1 Group Buy
* Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
* Hardware Supported: QMK Handwire
* rev1 (1.0)
* Hardware Availability: [qmk.fm](https://qmk.fm/)
Make example for this keyboard (after setting up your build environment):
make 2x1800:default
make _qmk_handwire:default
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.

@ -0,0 +1,56 @@
# project specific files
SRC = matrix.c \
led.c
## chip/board settings
# - the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = yes # Custom matrix file
AUDIO_ENABLE = yes
# SERIAL_LINK_ENABLE = yes
I2C_SLAVE_ENABLE = yes

@ -1 +0,0 @@
#include "alf_x2.h"

@ -1,92 +0,0 @@
#ifndef ALF_X2_H
#define ALF_X2_H
#include "quantum.h"
// K404 and K408 are the microswitches at the top of the PCB
#define LAYOUT( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
}
#define LAYOUT_std_ansi( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \
}
#define LAYOUT_std_splits( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \
}
#define LAYOUT_hhkb( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
K401, K403, K404, K406, K408, K410, K411 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
{ KC_NO, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \
}
#define LAYOUT_2u_split_arrows( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314,\
K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
}
#define LAYOUT_split_arrows( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\
K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_N), K313, K314 }, \
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
}
#endif

@ -1,58 +0,0 @@
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER ALF
#define PRODUCT X2
#define DESCRIPTION ALF X2 60
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/* key matrix pins */
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_PIN B6
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS
#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 4
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
#endif

@ -1,32 +0,0 @@
{
"keyboard_name": "ALF X2",
"url": "",
"maintainer": "qmk",
"width": 15.0,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"x":12, "y":3}, {"label":"Shift", "x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4, "w":1.3}, {"x":6.0, "y":4, "w":2}, {"x":8.5, "y":4, "w":1.3}, {"label":"Alt", "x":10.0, "y":4}, {"label":"Alt", "x":11.0, "y":4}, {"label":"Win", "x":12.0, "y":4}, {"label":"Menu", "x":13.0, "y":4}, {"label":"Ctrl", "x":14.0, "y":4}]
},
"LAYOUT_std_ansi": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_hhkb": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Win", "x":1.75, "y":4, "w":1.25}, {"label":"Alt", "x":3, "y":4, "w":1.25}, {"x":4.75, "y":4}, {"x":6, "y":4, "w":2.75}, {"x":9, "y":4}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4, "w":1.25}]
},
"LAYOUT_std_splits": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_2u_split_arrows": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
},
"LAYOUT_split_arrows": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":4.25, "y":4}, {"x":5.5, "y":4, "w":2.75}, {"x":8.5, "y":4}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
}
}
}

@ -1,40 +0,0 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
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_NO, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO,
KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_SPC, KC_VOLD, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
return MACRO_NONE;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
}

@ -1,40 +0,0 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_SPC, KC_VOLD, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL),
LAYOUT(
KC_NO, 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, RESET,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
return MACRO_NONE;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
}

@ -1,19 +0,0 @@
# ALF X2
![alf_x2](https://cdn.shopify.com/s/files/1/1674/0405/products/1_088c2862-1f68-4fdd-a346-965208c3a3de_1024x1024.png?v=1511296076)
A customizable 60% keyboard.
In QMK Configurator, the two keys to the left and right of the spacebar are the microswitches at the top of the PCB.
In the LAYOUT macros, K404 and K408 are the microswitches at the top of the PCB.
Keyboard Maintainer: QMK Community
Hardware Supported: ALF X2 60%
Hardware Availability: [zfrontier](https://en.zfrontier.com/products/group-buy-alf-x2-60)
Make example for this keyboard (after setting up your build environment):
make alf_x2:default
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.

@ -1,56 +0,0 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes

@ -1 +0,0 @@
#include "alpha.h"

@ -1,16 +0,0 @@
#ifndef KB_H
#define KB_H
#include "quantum.h"
#define LAYOUT( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, \
K200, K201, K202, K203, K205, K207, K208, K209 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \
{ K200, K201, K202, K203, KC_NO, K205, KC_NO, K207, K208, K209 } \
}
#endif

@ -1,58 +0,0 @@
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER PyroL
#define PRODUCT alpha
#define DESCRIPTION 28-key keyboard by PyroL
/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 10
/* key matrix pins */
#define MATRIX_ROW_PINS { D4, B4, B5 }
#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS
#define RGB_DI_PIN F4
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 5
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
#endif

@ -1,76 +0,0 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(1),
KC_Z, KC_X, KC_C, KC_V, MT(MOD_LSFT, KC_SPC), KC_B, KC_N, KC_M),
LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_BSPC, KC_ESC, KC_TAB, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(2),
KC_LCTL, KC_LGUI, KC_LALT, TO(0), MT(MOD_LSFT, KC_ENT), KC_COMM, KC_DOT, KC_SLSH),
LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_LSFT, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, TO(3),
RGB_VAI, RGB_VAD, RGB_HUI, TO(0), RGB_MOD, KC_MPLY, KC_VOLD, KC_VOLU),
LAYOUT(
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, M(0), KC_NO, KC_NO, KC_NO),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case 0:
SEND_STRING("I'm so sorry... -PyroL");
return false;
}
}
return true;
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

@ -1,17 +0,0 @@
# Alpha
![Alpha](https://i.imgur.com/J6EJ30N.jpg)
A 28-key, semi-ortho keyboard designed by PyroL!
Keyboard Maintainer: [PyroL](https://www.github.com/PyrooL)
Hardware Supported: Alpha PCB, Pro Micro
Hardware Availability: on a group-buy basis for now. Pro Micros can be found on Ali or from the official Sparkfun website.
Make example for Alpha (after setting up your build environment):
make alpha:default
See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information.

@ -1,56 +0,0 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
BOOTLOADER = caterina
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes

@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Alps64 keymap definition macro */
#define LAYOUT_all( \
#define KEYMAP( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
@ -38,75 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
}
#define LAYOUT_iso( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
K30, K40, K50, K60, K70, K00, K20 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
}
#define LAYOUT_standard_60( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
K30, K40, K50, K60, K70, K00, K10, K20 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
}
#define LAYOUT_infinity( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \
K30, K40, K50, K60, K70, K00, K10, K20 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
}
#define LAYOUT_aek_103( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
K30, K40, K50, K60, K70, K00, K20 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
}
#define LAYOUT_kc( \
#define KC_KEYMAP( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \

@ -1,28 +0,0 @@
{
"keyboard_name": "alps64",
"url": "",
"maintainer": "qmk",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_standard_60": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_infinity": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
},
"LAYOUT_aek_103": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
},
"LAYOUT_iso": {
"layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
}
}
}

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
LAYOUT_kc( \
KC_KEYMAP( \
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \

@ -1,43 +0,0 @@
#include "amj40.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default Layer
[0] = KEYMAP( \
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\
LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(2, KC_ENT),\
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),\
KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3), KC_RCTL \
),
// Number Layer
[1] = KEYMAP( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, MT(MOD_RSFT, KC_BSLS), \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\
),
// Shifted Layer
[2] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,\
KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\
),
// Fkey Layer
[3] = KEYMAP( \
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET,\
KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\
),
// Gaming Layer
[4] = KEYMAP( \
KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,\
KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\
),
};

@ -1,55 +0,0 @@
Jetpacktuxedo's AMJ40 layout
=====================
This is based heavily on my minivan layout, with most difference stemming from the different widths between the minivan and the AMJ40. ![Image of my specific layout](https://i.imgur.com/B9XraJY.jpg)
## Base Layer (0)
The base layer is pretty simple, straight qwerty layout where available. Both spacebars go to layer 1 when held. `tab` is `tab` when pressed and `fn2` when held, `enter` is the same. `GESC` is `esc` when used alone, but `~` when shifted. `/` is `/` when tapped but `rshift` when held.
```
|GESC| Q | W | E | R | T | Y | U | I | O | P |BSPC|
| TAB | A | S | D | F | G | H | J | K | L | ENTER |
|LSHIFT | Z | X | C | V | B | N | M | , | . | / |
|LCTRL|LWIN|LALT | SPACE | SPACE |RALT |FN 3|RCTRL |
```
## Number Layer (1)
Numbers are set up just like on my minivan layout, but symbols are a bit different because the AMJ40 is one key narrower than the minivan and also lacks dedicated arrows. Decided to go with `hjkl` arrows, which takes some getting used to. `;` is on a layer now because of the narrowness I mentioned before, and it (along with `-`, `=`, and `'`) moves to the right hand to leave room for the `hjkl` arrows. `delete` on `backspace`, `[` and `]` on `<` and `>`, and `\` on `/` are all stolen straight from my minivan layout.
```
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |DEL |
| | - | = | ; | ' | | ← | ↓ | ↑ | → | |
| | | | | | | | | [ | ] | \ |
| | | | | | | | |
```
## Shifted Layer (2)
I don't want to be using two key combos constantly, so I also added this symbol layer that is basically shift+numeric layer. Also has nav keys on top of where arrows sit on the previous layer
```
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |DEL |
| | _ | + | : | " | |HOME|PGDN|PGUP|END | |
| | | | | | | | | { | } | | |
| | | | | | | | |
```
## Fkey Layer (3)
Honestly, I use this more for jumping to my gaming layer and for reset than I use it for Fkeys. Lol. Hitting the left windows key while in this layer locks the gaming layer listed below
```
| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |RSET|
| |F11 |F12 | | | | | | | | |
| | | | | | | | | | | |
| |FN 4| | | | | | |
```
## "Gaming" Layer (4)
Based on the "gaming" layer on my minivan that I mostly just use for mouse keys. To toggle this back off you hit the right windows key (to go to layer 3) and then the left windows key again.
```
|ESC | | | | | |MWUP|MLCK|M UP|MRCK| | |
| TAB | | | | | |MWDN|M L |M DN|M R | |
| | | | | | | | | | | |
| | | | SPACE | | | | |
```

@ -1,27 +0,0 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. It uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -1,42 +0,0 @@
#!/bin/bash
# adjust for cpu
# -j 16 gave best result on a hyperthreaded quad core core i7
LIMIT=10
THREADS="-j 16"
KMAP=iso_split_rshift
echo "We need sudo later"
sudo ls 2>&1 /dev/null
function wait_bootloader {
echo "Waiting for Bootloader..."
local STARTTIME=$(date +"%s")
local REMIND=0
local EXEC=dfu-programmer
local TARGET=atmega32u4
while true
do
sudo $EXEC $TARGET get > /dev/null 2>&1
[ $? -eq 0 ] && break
ENDTIME=$(date +"%s")
DURATION=$(($ENDTIME-$STARTTIME))
if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ]
then
echo "Did you forget to press the reset button?"
REMIND=1
fi
sleep 1
done
}
make clean
make KEYMAP=${KMAP} ${THREADS}
if [[ $? -eq 0 ]]
then
echo "please trigger flashing!"
wait_bootloader
sudo make KEYMAP=${KMAP} dfu ${THREADS}
else
echo "make failed"
exit 77
fi

@ -1,10 +0,0 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define TAPPING_TERM 25
#define RETRO_TAPPING
#define PERMISSIVE_HOLD
#endif

@ -1,114 +0,0 @@
#include "amj40.h"
// Keymap myee
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 3
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST,
};
// increase readability
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KEYMAP( \
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\
F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_LCTL, KC_LGUI,KC_LALT, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \
),
[_LOWER] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_MINS, KC_EQL, KC_DEL, \
_______, _______, KC_ASTR, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSLS, \
_______, _______, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______ \
),
[_RAISE] = KEYMAP( \
KC_GRV, KC_LPRN, KC_RPRN, KC_DQUO, KC_QUOT, KC_SCLN, KC_COLON,KC_UNDS, KC_PLUS, _______, _______, KC_BSPC, \
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \
_______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, BL_INC, BL_DEC \
),
[_ADJUST] = KEYMAP( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
KC_SYSTEM_SLEEP, _______, _______, _______, _______, _______, _______, _______ \
),
};
enum function_id {
LAUNCH,
RGBLED_TOGGLE,
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
[1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
[2] = ACTION_LAYER_TAP_KEY(_ADJUST,KC_TAB),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
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 ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

@ -1,11 +0,0 @@
AMJ40 Default Layout
=====================
##Quantum MK Firmware
For the full Quantum feature list, see the parent readme.md.
# Features
* Based on a combination of the original AMJ40 keymap from the TMK firmware as well as the Planck Ortholinear keyboard's "Lower," "Raise," and "Adjust" layers.
* View the keymap.c file to understand they layout of the keymap.
* Has keys to toggle both the switch LEDs and underglow LEDs.

@ -1,27 +0,0 @@
# 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 = 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 = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -1,4 +0,0 @@
#!/bin/bash
git checkout amj60 # gets you on branch amj60
git fetch origin # gets you up to date with origin
git merge origin/master

@ -1,43 +0,0 @@
/* Copyright 2017 MechMerlin
* 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 "amj96.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save