diff --git a/.clang-format b/.clang-format
index bd896176d54..96c48625900 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,4 +1,4 @@
----
+---
BasedOnStyle: Google
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
@@ -20,7 +20,7 @@ SortIncludes: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
-TabWidth: '2'
+TabWidth: '4'
UseTab: Never
...
diff --git a/.editorconfig b/.editorconfig
index 4cd051ce952..c8cb35b861f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -5,7 +5,7 @@ root = true
[*]
indent_style = space
-indent_size = 2
+indent_size = 4
# We recommend you to keep these unchanged
charset = utf-8
diff --git a/.travis.yml b/.travis.yml
index 41a1019978a..a50b205ec07 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,7 @@ branches:
env:
global:
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
+ - MAKEFLAGS="-j3 --output-sync"
before_install:
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
install:
@@ -20,7 +21,7 @@ before_script:
- avr-gcc --version
script:
- git rev-parse --short HEAD
-- make test:all
+- bash util/travis_test.sh
- bash util/travis_build.sh
- bash util/travis_docs.sh
addons:
diff --git a/Dockerfile b/Dockerfile
index c4acfec71aa..6bd5acb3357 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,4 +26,4 @@ VOLUME /qmk_firmware
WORKDIR /qmk_firmware
COPY . .
-CMD make clean ; make git-submodule ; make $KEYBOARD:$KEYMAP
+CMD make $KEYBOARD:$KEYMAP
diff --git a/build_keyboard.mk b/build_keyboard.mk
index ee6a69fc79d..5d633f27169 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -280,6 +280,23 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/config.h)","")
CONFIG_H += $(KEYBOARD_PATH_1)/config.h
endif
+POST_CONFIG_H :=
+ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_1)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_2)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_3)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_4)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
+endif
+
# Save the defines and includes here, so we don't include any keymap specific ones
PROJECT_DEFS := $(OPT_DEFS)
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
@@ -355,6 +372,7 @@ ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
include $(VISUALIZER_PATH)/visualizer.mk
endif
+CONFIG_H += $(POST_CONFIG_H)
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
diff --git a/common_features.mk b/common_features.mk
index 046f94d1dbe..fbfbc3ebc60 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -103,6 +103,7 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
+ POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes
@@ -114,7 +115,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif
-VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom
+VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
LED_MATRIX_ENABLE ?= no
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
@@ -135,6 +136,7 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
endif
RGB_MATRIX_ENABLE ?= no
+
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
@@ -151,19 +153,31 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
- OPT_DEFS += -DIS31FL3731
+ OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
SRC += is31fl3731.c
SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
- OPT_DEFS += -DIS31FL3733
+ OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
SRC += is31fl3733.c
SRC += i2c_master.c
endif
+ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
+ OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ COMMON_VPATH += $(DRIVER_PATH)/issi
+ SRC += is31fl3737.c
+ SRC += i2c_master.c
+endif
+
+ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
+ OPT_DEFS += -DWS2812
+ SRC += ws2812.c
+endif
+
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
@@ -305,6 +319,7 @@ ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
endif
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
+ POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
OPT_DEFS += -DSPLIT_KEYBOARD
# Include files used by all split keyboards
@@ -321,3 +336,10 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
+
+ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
+ OPT_DEFS += -DOLED_DRIVER_ENABLE
+ COMMON_VPATH += $(DRIVER_PATH)/oled
+ QUANTUM_LIB_SRC += i2c_master.c
+ SRC += oled_driver.c
+endif
diff --git a/docs/config_options.md b/docs/config_options.md
index ad42e978020..8f229a2cb8d 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -59,6 +59,8 @@ This is a C header file that is one of the first things included, and will persi
* define is matrix has ghost (unlikely)
* `#define DIODE_DIRECTION COL2ROW`
* 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 DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
+ * pins mapped to rows and columns, from left to right. Defines a matrix where each switch is connected to a separate pin and ground.
* `#define AUDIO_VOICES`
* turns on the alternate audio voices (to cycle through)
* `#define C4_AUDIO`
@@ -126,6 +128,8 @@ If you define these options you will enable the associated feature, which may in
* `#define TAPPING_TERM 200`
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
+* `#define TAPPING_TERM_PER_KEY`
+ * enables handling for per key `TAPPING_TERM` settings
* `#define RETRO_TAPPING`
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
* See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details
@@ -176,10 +180,12 @@ If you define these options you will enable the associated feature, which may in
* run RGB animations
* `#define RGBLED_NUM 12`
* number of LEDs
+* `#define RGBLIGHT_SPLIT`
+ * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
* `#define RGBLED_SPLIT { 6, 6 }`
* number of LEDs connected that are directly wired to `RGB_DI_PIN` on each half of a split keyboard
* First value indicates number of LEDs for left half, second value is for the right half
- * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
+ * When RGBLED_SPLIT is defined, RGBLIGHT_SPLIT is implicitly defined.
* `#define RGBLIGHT_HUE_STEP 12`
* units to step when in/decreasing hue
* `#define RGBLIGHT_SAT_STEP 25`
diff --git a/docs/contributing.md b/docs/contributing.md
index 15066185bc6..7d1a9691cf5 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -56,7 +56,7 @@ Never made an open source contribution before? Wondering how contributions work
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
-* We indent using two spaces (soft tabs)
+* We indent using four (4) spaces (soft tabs)
* We use a modified One True Brace Style
* Opening Brace: At the end of the same line as the statement that opens the block
* Closing Brace: Lined up with the first character of the statement that opens the block
@@ -71,6 +71,14 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
* If you not sure if a comment is obvious, go ahead and include it.
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
+* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
+ * If you are not sure which to prefer use the `#if defined(DEFINED)` form.
+ * Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
+ * Do not put whitespace between `#` and `if`.
+ * When deciding how (or if) to indent directives keep these points in mind:
+ * Readability is more important than consistency.
+ * Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
+ * When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
Here is an example for easy reference:
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 418faf34946..6287b953090 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -323,6 +323,7 @@ uint32_t layer_state_set_user(uint32_t state) {
* Keyboard/Revision: `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)
@@ -460,3 +461,31 @@ And you're done. The RGB layer indication will only work if you want it to. And
* Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)`
The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM.
+
+# Custom Tapping Term
+
+By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`.
+
+To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first.
+
+
+## Example `get_tapping_term` Implementation
+
+To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file:
+
+```c
+uint16_t get_tapping_term(uint16_t keycode) {
+ switch (keycode) {
+ case SFT_T(KC_SPC):
+ return TAPPING_TERM + 1250;
+ case LT(1, KC_GRV):
+ return 130;
+ default:
+ return TAPPING_TERM;
+ }
+}
+```
+
+### `get_tapping_term` Function Documentation
+
+Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such.
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
index c7a1f131ed7..048d75390df 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -30,7 +30,31 @@ You should then be able to use the keycodes below to change the backlight level.
This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
-Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software implementation will be used, and backlight breathing will not be available. Currently the supported pins are `B5`, `B6`, `B7`, and `C6`.
+Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used.
+
+Hardware PWM is supported according to the following table:
+
+| Backlight Pin | Hardware timer |
+|---------------|----------------|
+|`B5` | Timer 1 |
+|`B6` | Timer 1 |
+|`B7` | Timer 1 |
+|`C6` | Timer 3 |
+| other | Software PWM |
+
+The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration:
+
+| Audio Pin(s) | Audio Timer | Software PWM Timer |
+|--------------|-------------|--------------------|
+| `C4` | Timer 3 | Timer 1 |
+| `C5` | Timer 3 | Timer 1 |
+| `C6` | Timer 3 | Timer 1 |
+| `B5` | Timer 1 | Timer 3 |
+| `B6` | Timer 1 | Timer 3 |
+| `B7` | Timer 1 | Timer 3 |
+| `Bx` & `Cx` | Timer 1 & 3 | None |
+
+When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision.
## Configuration
@@ -39,11 +63,26 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
|Define |Default |Description |
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
+|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information|
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
-|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used |
+|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
+## Multiple backlight pins
+
+Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin).
+In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle.
+This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on.
+
+To activate multiple backlight pins, you need to add something like this to your user `config.h`:
+
+~~~c
+#define BACKLIGHT_LED_COUNT 2
+#undef BACKLIGHT_PIN
+#define BACKLIGHT_PINS { F5, B2 }
+~~~
+
## Hardware PWM Implementation
When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0.
@@ -53,6 +92,15 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th
The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second.
In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM.
+## Software PWM Implementation
+
+When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0.
+When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle.
+The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the CPU will fire a Compare Output match interrupt, which will turn the LEDs off.
+In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on.
+
+The breathing effect is the same as in the hardware PWM implementation.
+
## Backlight Functions
|Function |Description |
diff --git a/docs/feature_combo.md b/docs/feature_combo.md
index a2fd1423c88..680adce2dc2 100644
--- a/docs/feature_combo.md
+++ b/docs/feature_combo.md
@@ -19,7 +19,6 @@ combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
This will send "Escape" if you hit the A and B keys.
!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control.
-!> You cannot reuse (share) keys in combos. Each key should only belong to a single combo.
## Examples
diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md
index 5d4343f08b9..38eca3f37c8 100644
--- a/docs/feature_debounce_type.md
+++ b/docs/feature_debounce_type.md
@@ -33,7 +33,10 @@ The debounce code is compatible with split keyboards.
# Changing between included debouncing methods
You can either use your own code, by including your own debounce.c, or switch to another included one.
Included debounce methods are:
-* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key
+* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row.
+For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
+appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
+* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed.
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index 743fc3ad550..fe45016e3b9 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -195,6 +195,49 @@ This will clear all mods currently pressed.
This will clear all keys besides the mods currently pressed.
+## Advanced Example:
+
+### Super ALT↯TAB
+
+This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows.
+
+```c
+bool is_alt_tab_active = false; # ADD this near the begining of keymap.c
+uint16_t alt_tab_timer = 0; # we will be using them soon.
+
+enum custom_keycodes { # Make sure have the awesome keycode ready
+ ALT_TAB = SAFE_RANGE,
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) { # This will do most of the grunt work with the keycodes.
+ case ALT_TAB:
+ if (record->event.pressed) {
+ if (!is_alt_tab_active) {
+ is_alt_tab_active = true;
+ register_code(KC_LALT);
+ }
+ alt_tab_timer = timer_read();
+ register_code(KC_TAB);
+ } else {
+ unregister_code(KC_TAB);
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_scan_user(void) { # The very important timer.
+ if (is_alt_tab_active) {
+ if (timer_elapsed(alt_tab_timer) > 1000) {
+ unregister_code16(LALT(KC_TAB));
+ is_alt_tab_active = false;
+ }
+ }
+}
+```
+
+---
## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro`
@@ -273,7 +316,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
```
-### Advanced Example: Single-Key Copy/Paste
+## Advanced Example:
+
+### Single-Key Copy/Paste
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md
index e64ddf3d066..363662f633b 100644
--- a/docs/feature_mouse_keys.md
+++ b/docs/feature_mouse_keys.md
@@ -1,114 +1,119 @@
-# Mousekeys
+# Mouse keys
+Mouse keys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer at different speeds, press 5 buttons and scroll in 8 directions.
-Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions.
+## Adding mouse keys to your keyboard
-There are 2 ways to define how the mousekeys behave, using "[auto-accelerating](#configuring-the-behavior-of-mousekeys-with-auto-accelerated-movement)" or "[3-speed constant](#configuring-the-behavior-of-mousekeys-with-3-speed-constant-movement)" behavior.
+To use mouse keys, you must at least enable mouse keys support and map mouse actions to keys on your keyboard.
-In either case, you will need to enable mousekeys in your makefile,
-and add the relevant [keycodes](#mapping-mouse-actions-to-keyboard-keys) to your keymap.
+### Enabling mouse keys
-#### Enable Mousekeys
+To enable mouse keys, add the following line to your keymap’s `rules.mk`:
-To enable the mousekey functionality, add the following line to your keymap's `rules.mk`:
-
-```
+```c
MOUSEKEY_ENABLE = yes
```
-#### Mapping Mouse Actions to Keyboard Keys
+### Mapping mouse actions
-You can use these keycodes within your keymap to map button presses to mouse actions:
+In your keymap you can use the following keycodes to map key presses to mouse actions:
-|Key |Aliases |Description |
-|----------------|---------|-----------------------------------|
-|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
-|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
-|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
-|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
-|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
-|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
-|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
-|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
-|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
-|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
-|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
-|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
-|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
-|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0(slow) |
-|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1(medium)|
-|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2(fast) |
+|Key |Aliases |Description |
+|----------------|---------|-----------------|
+|`KC_MS_UP` |`KC_MS_U`|Move cursor up |
+|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down |
+|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left |
+|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right|
+|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 |
+|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 |
+|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
+|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
+|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
+|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
+|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
+|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
+|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right |
+|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 |
+|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 |
+|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 |
+## Configuring mouse keys
-## Configuring the Behavior of Mousekeys with auto-accelerated movement
+Mouse keys supports two different modes to move the cursor:
-This behavior is intended to emulate the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
+* **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed.
+* **Constant:** Holding movement keys moves the cursor at constant speeds.
-The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms).
+The same principle applies to scrolling.
-```
-#define MOUSEKEY_DELAY 300
-#define MOUSEKEY_INTERVAL 50
-#define MOUSEKEY_MAX_SPEED 10
-#define MOUSEKEY_TIME_TO_MAX 20
-#define MOUSEKEY_WHEEL_MAX_SPEED 8
-#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
-```
+Configuration options that are times, intervals or delays are given in milliseconds. Scroll speed is given as multiples of the default scroll step. For example, a scroll speed of 8 means that each scroll action covers 8 times the length of the default scroll step as defined by your operating system or application.
-#### `MOUSEKEY_DELAY`
+### Accelerated mode
-When one of the mouse movement buttons is pressed this setting is used to define the delay between that button press and the mouse cursor moving. Some people find that small movements are impossible if this setting is too low, while settings that are too high feel sluggish.
+This is the default mode. You can adjust the cursor and scrolling acceleration using the following settings in your keymap’s `config.h` file:
-#### `MOUSEKEY_INTERVAL`
+|Define |Default|Description |
+|----------------------------|-------|---------------------------------------------------------|
+|`MOUSEKEY_DELAY` |300 |Delay between pressing a movement key and cursor movement|
+|`MOUSEKEY_INTERVAL` |50 |Time between cursor movements |
+|`MOUSEKEY_MAX_SPEED` |10 |Maximum cursor speed at which acceleration stops |
+|`MOUSEKEY_TIME_TO_MAX` |20 |Time until maximum cursor speed is reached |
+|`MOUSEKEY_WHEEL_MAX_SPEED` |8 |Maximum number of scroll steps per scroll action |
+|`MOUSEKEY_WHEEL_TIME_TO_MAX`|40 |Time until maximum scroll speed is reached |
-When a movement key is held down this specifies how long to wait between each movement report. Lower settings will translate into an effectively higher mouse speed.
+Tips:
-#### `MOUSEKEY_MAX_SPEED`
+* Setting `MOUSEKEY_DELAY` too low makes the cursor unresponsive. Setting it too high makes small movements difficult.
+* For smoother cursor movements, lower the value of `MOUSEKEY_INTERVAL`. If the refresh rate of your display is 60Hz, you could set it to `16` (1/60). As this raises the cursor speed significantly, you may want to lower `MOUSEKEY_MAX_SPEED`.
+* Setting `MOUSEKEY_TIME_TO_MAX` or `MOUSEKEY_WHEEL_TIME_TO_MAX` to `0` will disable acceleration for the cursor or scrolling respectively. This way you can make one of them constant while keeping the other accelerated, which is not possible in constant speed mode.
-As a movement key is held down the speed of the mouse cursor will increase until it reaches `MOUSEKEY_MAX_SPEED`.
+Cursor acceleration uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
-#### `MOUSEKEY_TIME_TO_MAX`
+### Constant mode
-How long you want to hold down a movement key for until `MOUSEKEY_MAX_SPEED` is reached. This controls how quickly your cursor will accelerate.
+In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting.
-#### `MOUSEKEY_WHEEL_MAX_SPEED`
+You can choose whether speed selection is momentary or tap-to-select:
-The top speed for scrolling movements.
+* **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed.
+* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed.
-#### `MOUSEKEY_WHEEL_TIME_TO_MAX`
+The default speeds from slowest to fastest are as follows:
-How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate.
+* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2`
+* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2`
+To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file:
-## Configuring the Behavior of Mousekeys with 3-speed constant movement
-
-In your keymap's `config.h`, you must add the line:
-```
+```c
#define MK_3_SPEED
```
-Then you can precisely define 3 different speeds for both the cursor and the mouse wheel, and also whether speed selection is momentary or tap-to-select.
-For each speed, you can specify how many milliseconds you want between reports(interval), and how far you want to it to move per report(offset).
-For example:
+To enable momentary mode, also define `MK_MOMENTARY_ACCEL`:
-```
-#define MK_3_SPEED
-#define MK_MOMENTARY_ACCEL // comment this out for tap-to-select acceleration
-// cursor speeds:
-#define MK_C_OFFSET_SLOW 1 // pixels
-#define MK_C_INTERVAL_SLOW 100 // milliseconds
-#define MK_C_OFFSET_MED 4
-#define MK_C_INTERVAL_MED 16
-#define MK_C_OFFSET_FAST 12
-#define MK_C_INTERVAL_FAST 16
-// scroll wheel speeds:
-#define MK_W_OFFSET_SLOW 1 // wheel clicks
-#define MK_W_INTERVAL_SLOW 400 // milliseconds
-#define MK_W_OFFSET_MED 1
-#define MK_W_INTERVAL_MED 200
-#define MK_W_OFFSET_FAST 1
-#define MK_W_INTERVAL_FAST 100
+```c
+#define MK_MOMENTARY_ACCEL
```
-Medium values will be used as the default or unmodified speed.
-The speed at which both the cursor and scrolling move can be selected with KC_ACL0, KC_ACL1, KC_ACL2 for slow, medium, and fast. However, if you leave MK_MOMENTARY_ACCEL defined then there is no need to ever send KC_ACL1, since that will be the unmodified speed.
+Use the following settings if you want to adjust cursor movement or scrolling:
+
+|Define |Default |Description |
+|---------------------|-------------|-------------------------------------------|
+|`MK_3_SPEED` |*Not defined*|Enable constant cursor speeds |
+|`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection |
+|`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) |
+|`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) |
+|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) |
+|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) |
+|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) |
+|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) |
+|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) |
+|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) |
+|`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)|
+|`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) |
+|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) |
+|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) |
+|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) |
+|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) |
+|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) |
+|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) |
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
new file mode 100644
index 00000000000..fcc19515a94
--- /dev/null
+++ b/docs/feature_oled_driver.md
@@ -0,0 +1,274 @@
+# OLED Driver
+
+## OLED Supported Hardware
+
+128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64.
+
+!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this.
+
+## Usage
+
+To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.:
+
+```
+OLED_DRIVER_ENABLE = yes
+```
+
+This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g:
+
+```C++
+#ifdef OLED_DRIVER_ENABLE
+void oled_task_user(void) {
+ // Host Keyboard Layer Status
+ oled_write_P(PSTR("Layer: "), false);
+ switch (biton32(layer_state)) {
+ case _QWERTY:
+ oled_write_P(PSTR("Default\n"), false);
+ break;
+ case _FN:
+ oled_write_P(PSTR("FN\n"), false);
+ break;
+ case _ADJ:
+ oled_write_P(PSTR("ADJ\n"), false);
+ break;
+ default:
+ // Or use the write_ln shortcut over adding '\n' to the end of your string
+ oled_write_ln_P(PSTR("Undefined"), false);
+ }
+
+ // Host Keyboard LED Status
+ uint8_t led_usb_state = host_keyboard_leds();
+ oled_write_P(led_usb_state & (1<Requires user to implement the below defines. |
+|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
+|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. |
+|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`|
+|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.|
+|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`|
+|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`|
+|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
+|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
+
+
+### 90 Degree Rotation - Technical Mumbo Jumbo
+
+```C
+// OLED Rotation enum values are flags
+typedef enum {
+ OLED_ROTATION_0 = 0,
+ OLED_ROTATION_90 = 1,
+ OLED_ROTATION_180 = 2,
+ OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
+} oled_rotation_t;
+```
+
+ OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
+
+ 90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
+
+| | | | | | |
+|---|---|---|---|---|---|
+| 0 | 1 | | | | |
+| 2 | 3 | | | | |
+| 4 | 5 | | | | |
+| 6 | 7 | | | | |
+
+However the local buffer is stored as if it was Height x Width display instead of Width x Height, e.g:
+
+| | | | | | |
+|---|---|---|---|---|---|
+| 3 | 7 | | | | |
+| 2 | 6 | | | | |
+| 1 | 5 | | | | |
+| 0 | 4 | | | | |
+
+So those precalculated arrays just index the memory offsets in the order in which each one iterates its data.
+
+## OLED API
+
+```C++
+// OLED Rotation enum values are flags
+typedef enum {
+ OLED_ROTATION_0 = 0,
+ OLED_ROTATION_90 = 1,
+ OLED_ROTATION_180 = 2,
+ OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
+} oled_rotation_t;
+
+// Initialize the OLED display, rotating the rendered output based on the define passed in.
+// Returns true if the OLED was initialized successfully
+bool oled_init(oled_rotation_t rotation);
+
+// Called at the start of oled_init, weak function overridable by the user
+// rotation - the value passed into oled_init
+// Return new oled_rotation_t if you want to override default rotation
+oled_rotation_t oled_init_user(oled_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void oled_clear(void);
+
+// Renders the dirty chunks of the buffer to OLED display
+void oled_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions
+void oled_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void oled_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void oled_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void oled_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void oled_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void oled_write_ln(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
+void oled_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
+void oled_write_ln_P(const char *data, bool invert);
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool oled_on(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool oled_off(void);
+
+// Basically it's oled_render, but with timeout management and oled_task_user calling!
+void oled_task(void);
+
+// Called at the start of oled_task, weak function overridable by the user
+void oled_task_user(void);
+
+// Scrolls the entire display right
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_right(void);
+
+// Scrolls the entire display left
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_left(void);
+
+// Turns off display scrolling
+// Returns true if the screen was not scrolling or stops scrolling
+bool oled_scroll_off(void);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t oled_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the OLED
+uint8_t oled_max_lines(void);
+```
+
+## SSD1306.h driver conversion guide
+
+|Old API |Recommended New API |
+|---------------------------|-----------------------------------|
+|`struct CharacterMatrix` |*removed - delete all references* |
+|`iota_gfx_init` |`oled_init` |
+|`iota_gfx_on` |`oled_on` |
+|`iota_gfx_off` |`oled_off` |
+|`iota_gfx_flush` |`oled_render` |
+|`iota_gfx_write_char` |`oled_write_char` |
+|`iota_gfx_write` |`oled_write` |
+|`iota_gfx_write_P` |`oled_write_P` |
+|`iota_gfx_clear_screen` |`oled_clear` |
+|`matrix_clear` |*removed - delete all references* |
+|`matrix_write_char_inner` |`oled_write_char` |
+|`matrix_write_char` |`oled_write_char` |
+|`matrix_write` |`oled_write` |
+|`matrix_write_ln` |`oled_write_ln` |
+|`matrix_write_P` |`oled_write_P` |
+|`matrix_write_ln_P` |`oled_write_ln_P` |
+|`matrix_render` |`oled_render` |
+|`iota_gfx_task` |`oled_task` |
+|`iota_gfx_task_user` |`oled_task_user` |
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 8d1efb12a27..f2168ab16ef 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -5,107 +5,147 @@ This feature allows you to use RGB LED matrices driven by external drivers. It h
If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead.
## Driver configuration
-
+---
### IS31FL3731
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
- RGB_MATRIX_ENABLE = IS31FL3731
+```C
+RGB_MATRIX_ENABLE = IS31FL3731
+```
Configure the hardware via your `config.h`:
- // This is a 7-bit address, that gets left-shifted and bit 0
- // set to 0 for write, 1 for read (as per I2C protocol)
- // The address will vary depending on your wiring:
- // 0b1110100 AD <-> GND
- // 0b1110111 AD <-> VCC
- // 0b1110101 AD <-> SCL
- // 0b1110110 AD <-> SDA
- #define DRIVER_ADDR_1 0b1110100
- #define DRIVER_ADDR_2 0b1110110
+```C
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 0b1110100 AD <-> GND
+// 0b1110111 AD <-> VCC
+// 0b1110101 AD <-> SCL
+// 0b1110110 AD <-> SDA
+#define DRIVER_ADDR_1 0b1110100
+#define DRIVER_ADDR_2 0b1110110
- #define DRIVER_COUNT 2
- #define DRIVER_1_LED_TOTAL 25
- #define DRIVER_2_LED_TOTAL 24
- #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
+#define DRIVER_COUNT 2
+#define DRIVER_1_LED_TOTAL 25
+#define DRIVER_2_LED_TOTAL 24
+#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
+```
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `.c`:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
- /* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, C1_3, C2_3, C3_3},
- ....
- }
+```C
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, C1_3, C2_3, C3_3},
+ ....
+}
+```
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
-### IS31FL3733
+---
+### IS31FL3733/IS31FL3737
+
+!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
- RGB_MATRIX_ENABLE = IS31FL3733
+```C
+RGB_MATRIX_ENABLE = IS31FL3733
+```
Configure the hardware via your `config.h`:
- // This is a 7-bit address, that gets left-shifted and bit 0
- // set to 0 for write, 1 for read (as per I2C protocol)
- // The address will vary depending on your wiring:
- // 00 <-> GND
- // 01 <-> SCL
- // 10 <-> SDA
- // 11 <-> VCC
- // ADDR1 represents A1:A0 of the 7-bit address.
- // ADDR2 represents A3:A2 of the 7-bit address.
- // The result is: 0b101(ADDR2)(ADDR1)
- #define DRIVER_ADDR_1 0b1010000
- #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
+```C
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
- #define DRIVER_COUNT 2
- #define DRIVER_1_LED_TOTAL 64
- #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define DRIVER_COUNT 2
+#define DRIVER_1_LED_TOTAL 64
+#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+```
Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1`
Define these arrays listing all the LEDs in your `.c`:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
- /* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, B_1, A_1, C_1},
- ....
- }
+```C
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, B_1, A_1, C_1},
+ ....
+}
+```
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
-From this point forward the configuration is the same for all the drivers.
+---
- const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- /* {row | col << 4}
- * | {x=0..224, y=0..64}
- * | | modifier
- * | | | */
- {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
- {{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
- ....
- }
+### WS2812 (AVR only)
-The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is:
+There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
- x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION
- y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION
+```C
+RGB_MATRIX_ENABLE = WS2812
+```
-Where all variables are decimels/floats.
+Configure the hardware via your `config.h`:
+
+```C
+// The pin connected to the data pin of the LEDs
+#define RGB_DI_PIN D7
+// The number of LEDs connected
+#define DRIVER_LED_TOTAL 70
+```
+
+---
+
+From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
+
+```C
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+/* {row | col << 4}
+ * | {x=0..224, y=0..64}
+ * | | modifier
+ * | | | */
+ {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
+ {{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
+ ....
+}
+```
+
+The first part, `{row | col << 4}`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `{x=0..224, y=0..64}` represents the LED's physical position on the keyboard. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64 as the effects are based on this range. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
+
+```C
+x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
+y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
+```
+
+Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects).
@@ -113,111 +153,164 @@ Where all variables are decimels/floats.
All RGB keycodes are currently shared with the RGBLIGHT system:
- * `RGB_TOG` - toggle
- * `RGB_MOD` - cycle through modes
- * `RGB_HUI` - increase hue
- * `RGB_HUD` - decrease hue
- * `RGB_SAI` - increase saturation
- * `RGB_SAD` - decrease saturation
- * `RGB_VAI` - increase value
- * `RGB_VAD` - decrease value
- * `RGB_SPI` - increase speed effect (no EEPROM support)
- * `RGB_SPD` - decrease speed effect (no EEPROM support)
-
-
- * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
+* `RGB_TOG` - toggle
+* `RGB_MOD` - cycle through modes
+* `RGB_HUI` - increase hue
+* `RGB_HUD` - decrease hue
+* `RGB_SAI` - increase saturation
+* `RGB_SAD` - decrease saturation
+* `RGB_VAI` - increase value
+* `RGB_VAD` - decrease value
+* `RGB_SPI` - increase speed effect (no EEPROM support)
+* `RGB_SPD` - decrease speed effect (no EEPROM support)
+* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
## RGB Matrix Effects
-These are the effects that are currently available:
+All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available:
- enum rgb_matrix_effects {
- RGB_MATRIX_SOLID_COLOR = 1,
- RGB_MATRIX_ALPHAS_MODS,
- RGB_MATRIX_DUAL_BEACON,
- RGB_MATRIX_GRADIENT_UP_DOWN,
- RGB_MATRIX_RAINDROPS,
- RGB_MATRIX_CYCLE_ALL,
- RGB_MATRIX_CYCLE_LEFT_RIGHT,
- RGB_MATRIX_CYCLE_UP_DOWN,
- RGB_MATRIX_RAINBOW_BEACON,
- RGB_MATRIX_RAINBOW_PINWHEELS,
- RGB_MATRIX_RAINBOW_MOVING_CHEVRON,
- RGB_MATRIX_JELLYBEAN_RAINDROPS,
- RGB_MATRIX_DIGITAL_RAIN,
- #ifdef RGB_MATRIX_KEYPRESSES
- RGB_MATRIX_SOLID_REACTIVE,
- RGB_MATRIX_REACTIVE_SIMPLE,
- RGB_MATRIX_SPLASH,
- RGB_MATRIX_MULTISPLASH,
- RGB_MATRIX_SOLID_SPLASH,
- RGB_MATRIX_SOLID_MULTISPLASH,
- #endif
- RGB_MATRIX_EFFECT_MAX
- };
+```C
+enum rgb_matrix_effects {
+ RGB_MATRIX_NONE = 0,
+ RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support
+ RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue
+ RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
+ RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
+ RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
+ RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
+ RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
+ RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
+ RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
+ RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
+ RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
+ RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
+ RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
+ RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
+#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
+ RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
+ RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
+ RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
+ RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out
+ RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out
+ RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out
+ RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out
+#endif
+ RGB_MATRIX_EFFECT_MAX
+};
+```
You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
-|Define |Description |
-|---------------------------------------------------|--------------------------------------------|
-|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
-|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
-|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
-|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
-|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
-|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
-|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
-|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
-|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
-|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|
-|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
-|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
-|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
-|`#define DISABLE_RGB_MATRIX_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_REACTIVE_SIMPLE` |
-|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` |
-|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` |
-|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` |
-|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` |
+|Define |Description |
+|-------------------------------------------------------|-----------------------------------------------|
+|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
+|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
+|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
+|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
+|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
+|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
+|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
+|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
+|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
+|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
+|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`|
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`|
+|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` |
+|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` |
+|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` |
+|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` |
## Custom layer effects
Custom layer effects can be done by defining this in your `.c`:
- void rgb_matrix_indicators_kb(void) {
- rgb_matrix_set_color(index, red, green, blue);
- }
+```C
+void rgb_matrix_indicators_kb(void) {
+ rgb_matrix_set_color(index, red, green, blue);
+}
+```
A similar function works in the keymap as `rgb_matrix_indicators_user`.
+
+## Colors
+
+These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
+
+|RGB |HSV |
+|-------------------|-------------------|
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_PINK` |`HSV_PINK` |
+
+These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+
+
## Additional `config.h` Options
- #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
- #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
- #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
- #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+```C
+#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
+#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
+#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+```
## EEPROM storage
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
- #define EECONFIG_RGB_MATRIX (uint32_t *)16
+```C
+#define EECONFIG_RGB_MATRIX (uint32_t *)28
+```
-Where `16` is an unused index from `eeconfig.h`.
+Where `28` is an unused index from `eeconfig.h`.
## Suspended state
To use the suspend feature, add this to your `.c`:
- void suspend_power_down_kb(void)
- {
- rgb_matrix_set_suspend_state(true);
- }
+```C
+void suspend_power_down_kb(void)
+{
+ rgb_matrix_set_suspend_state(true);
+}
- void suspend_wakeup_init_kb(void)
- {
- rgb_matrix_set_suspend_state(false);
- }
+void suspend_wakeup_init_kb(void)
+{
+ rgb_matrix_set_suspend_state(false);
+}
+```
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index c9323deb5eb..48277373a51 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -75,6 +75,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by |
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
+|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
## Animations
@@ -188,22 +189,60 @@ If you need to change your RGB lighting in code, for example in a macro to chang
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
+|`rgblight_set_clipping_range(pos, num)` |Set clipping Range |
+
+## Colors
+
+These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
+
+|RGB |HSV |
+|-------------------|-------------------|
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_PINK` |`HSV_PINK` |
+
+```c
+rgblight_setrgb(RGB_ORANGE);
+rgblight_sethsv_noeeprom(HSV_GREEN);
+rgblight_setrgb_at(RGB_GOLD, 3);
+rgblight_sethsv_range(HSV_WHITE, 0, 6);
+```
+
+These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
-Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
## Changing the order of the LEDs
If you want to make the logical order of LEDs different from the electrical connection order, you can do this by defining the `RGBLIGHT_LED_MAP` macro in your `config.h`.
+Normally, the contents of the LED buffer are output to the LEDs in the same order.
+
+
By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED with addressing in reverse order of the electrical connection order.
```c
// config.h
-#define RGBLED_NUM 10
-#define RGBLIGHT_LED_MAP { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
+#define RGBLED_NUM 4
+#define RGBLIGHT_LED_MAP { 3, 2, 1, 0 }
```
+
For keyboards that use the RGB LEDs as a backlight for each key, you can also define it as in the example below.
@@ -237,7 +276,28 @@ For keyboards that use the RGB LEDs as a backlight for each key, you can also de
29, 24, 19, 14, 9, 4 )
```
+## Clipping Range
-## Hardware Modification
+Using the `rgblight_set_clipping_range()` function, you can prepare more buffers than the actual number of LEDs, and output some of the buffers to the LEDs. This is useful if you want the split keyboard to treat left and right LEDs as logically contiguous.
+
+You can set the Clipping Range by executing the following code.
+
+```c
+// some soruce
+ rgblight_set_clipping_range(3, 4);
+```
+
+
+In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` together.
+
+```c
+// config.h
+#define RGBLED_NUM 8
+#define RGBLIGHT_LED_MAP { 7, 6, 5, 4, 3, 2, 1, 0 }
+
+// some soruce
+ rgblight_set_clipping_range(3, 4);
+```
+
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index b72f52e189e..0e1acca66a8 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -2,11 +2,11 @@
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4).
-After cloning the repo of QMK run `make git-submodule` once to download 3rd party libraries like ChibiOS.
-
-Note: If it is your first time here, Check out the "Complete Newbs guide" instead
+**Note:** If this is your first time here, check out the [Complete Newbs Guide](newbs.md) page.
+
+Before continuing, double check that your submodules (third-party libraries) are up to date by running `make git-submodule`.
## Linux
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
index 12a0059c3fe..acf7088a396 100644
--- a/docs/hardware_avr.md
+++ b/docs/hardware_avr.md
@@ -93,6 +93,24 @@ Finally, you can specify the direction your diodes point. This can be `COL2ROW`
#define DIODE_DIRECTION COL2ROW
```
+#### Direct Pin Matrix
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
+
+```c
+// #define MATRIX_ROW_PINS { D0, D5 }
+// #define MATRIX_COL_PINS { F1, F0, B0 }
+#define DIRECT_PINS { \
+ { F1, E6, B0, B2, B3 }, \
+ { F5, F0, B1, B7, D2 }, \
+ { F6, F7, C7, D5, D3 }, \
+ { B5, C6, B6, NO_PIN, NO_PIN } \
+}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+//#define DIODE_DIRECTION
+```
+
### Backlight Configuration
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md
index 4c1266f2241..023e92982cb 100644
--- a/docs/hardware_drivers.md
+++ b/docs/hardware_drivers.md
@@ -14,9 +14,9 @@ QMK is used on a lot of different hardware. While support for the most common MC
Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
-## SSD1306 (AVR Only)
+## SSD1306 OLED Driver
-Support for SSD1306 based OLED displays. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
+Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page.
## uGFX
@@ -32,4 +32,4 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in
## IS31FL3733
-Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
\ No newline at end of file
+Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
index c32c428cf01..d8e084f466c 100644
--- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
+++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
@@ -22,6 +22,8 @@ The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each r
For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
+
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c
index 0e5edcc380a..7369398cc4b 100644
--- a/drivers/arm/i2c_master.c
+++ b/drivers/arm/i2c_master.c
@@ -42,6 +42,18 @@ static const I2CConfig i2cconfig = {
0
};
+static i2c_status_t chibios_to_qmk(const msg_t* status) {
+ switch (*status) {
+ case I2C_NO_ERROR:
+ return I2C_STATUS_SUCCESS;
+ case I2C_TIMEOUT:
+ return I2C_STATUS_TIMEOUT;
+ // I2C_BUS_ERROR, I2C_ARBITRATION_LOST, I2C_ACK_FAILURE, I2C_OVERRUN, I2C_PEC_ERROR, I2C_SMB_ALERT
+ default:
+ return I2C_STATUS_ERROR;
+ }
+}
+
__attribute__ ((weak))
void i2c_init(void)
{
@@ -57,29 +69,30 @@ void i2c_init(void)
//i2cInit(); //This is invoked by halInit() so no need to redo it.
}
-// This is usually not needed
-uint8_t i2c_start(uint8_t address)
+i2c_status_t i2c_start(uint8_t address)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return 0;
+ return I2C_STATUS_SUCCESS;
}
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
@@ -91,18 +104,19 @@ uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t l
}
complete_packet[0] = regaddr;
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_stop(void)
+void i2c_stop(void)
{
i2cStop(&I2C_DRIVER);
- return 0;
}
diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h
index 4ab2301f8cf..a15f1702dd3 100644
--- a/drivers/arm/i2c_master.h
+++ b/drivers/arm/i2c_master.h
@@ -40,11 +40,17 @@
#define I2C_DRIVER I2CD1
#endif
+typedef int16_t i2c_status_t;
+
+#define I2C_STATUS_SUCCESS (0)
+#define I2C_STATUS_ERROR (-1)
+#define I2C_STATUS_TIMEOUT (-2)
+
void i2c_init(void);
-uint8_t i2c_start(uint8_t address);
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
-uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_stop(void);
+i2c_status_t i2c_start(uint8_t address);
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
+i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
+i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
+i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
+i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
+void i2c_stop(void);
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c
index 0db949db4ab..a7364bae08f 100755
--- a/drivers/avr/i2c_master.c
+++ b/drivers/avr/i2c_master.c
@@ -18,6 +18,18 @@
void i2c_init(void) {
TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;
+
+ #ifdef __AVR_ATmega32A__
+ // set pull-up resistors on I2C bus pins
+ PORTC |= 0b11;
+
+ // enable TWI (two-wire interface)
+ TWCR |= (1 << TWEN);
+
+ // enable TWI interrupt and slave address ACK
+ TWCR |= (1 << TWIE);
+ TWCR |= (1 << TWEA);
+ #endif
}
i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
@@ -109,7 +121,7 @@ int16_t i2c_read_nack(uint16_t timeout) {
return TWDR;
}
-i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
for (uint16_t i = 0; i < length && status >= 0; i++) {
@@ -143,7 +155,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
return (status < 0) ? status : I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
+i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(devaddr | 0x00, timeout);
if (status >= 0) {
status = i2c_write(regaddr, timeout);
diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h
index 81a7fb5e322..b4613115d9a 100755
--- a/drivers/avr/i2c_master.h
+++ b/drivers/avr/i2c_master.h
@@ -22,10 +22,10 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout);
i2c_status_t i2c_write(uint8_t data, uint16_t timeout);
int16_t i2c_read_ack(uint16_t timeout);
int16_t i2c_read_nack(uint16_t timeout);
-i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
+i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
void i2c_stop(void);
-#endif // I2C_MASTER_H
\ No newline at end of file
+#endif // I2C_MASTER_H
diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c
index 5bd837ec754..b3ed4fd0b0a 100644
--- a/drivers/avr/ws2812.c
+++ b/drivers/avr/ws2812.c
@@ -27,6 +27,12 @@
#include
#include "debug.h"
+#if !defined(LED_ARRAY) && defined(RGB_MATRIX_ENABLE)
+// LED color buffer
+LED_TYPE led[DRIVER_LED_TOTAL];
+ #define LED_ARRAY led
+#endif
+
#ifdef RGBW_BB_TWI
// Port for the I2C
@@ -141,6 +147,25 @@ unsigned char I2C_Write(unsigned char c)
#endif
+#ifdef RGB_MATRIX_ENABLE
+// Set an led in the buffer to a color
+void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
+{
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+}
+
+void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
+{
+ for (int i = 0; i < RGBLED_NUM; i++) {
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+ }
+}
+#endif
+
// Setleds for standard RGB
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds)
{
diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h
index 1f9299ffb53..ecb1dc4d18c 100644
--- a/drivers/avr/ws2812.h
+++ b/drivers/avr/ws2812.h
@@ -30,7 +30,6 @@
#include "rgblight_types.h"
-
/* User Interface
*
* Input:
@@ -43,6 +42,10 @@
* - Send out the LED data
* - Wait 50�s to reset the LEDs
*/
+#ifdef RGB_MATRIX_ENABLE
+void ws2812_setled (int index, uint8_t r, uint8_t g, uint8_t b);
+void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b);
+#endif
void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c
new file mode 100644
index 00000000000..6491049274b
--- /dev/null
+++ b/drivers/issi/is31fl3737.c
@@ -0,0 +1,252 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ *
+ * 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 .
+ */
+
+#ifdef __AVR__
+#include
+#include
+#include
+#else
+#include "wait.h"
+#endif
+
+#include
+#include "i2c_master.h"
+#include "progmem.h"
+#include "rgb_matrix.h"
+
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define ISSI_ADDR_DEFAULT 0x50
+
+#define ISSI_COMMANDREGISTER 0xFD
+#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
+#define ISSI_INTERRUPTMASKREGISTER 0xF0
+#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
+
+#define ISSI_PAGE_LEDCONTROL 0x00 //PG0
+#define ISSI_PAGE_PWM 0x01 //PG1
+#define ISSI_PAGE_AUTOBREATH 0x02 //PG2
+#define ISSI_PAGE_FUNCTION 0x03 //PG3
+
+#define ISSI_REG_CONFIGURATION 0x00 //PG3
+#define ISSI_REG_GLOBALCURRENT 0x01 //PG3
+#define ISSI_REG_RESET 0x11// PG3
+#define ISSI_REG_SWPULLUP 0x0F //PG3
+#define ISSI_REG_CSPULLUP 0x10 //PG3
+
+#ifndef ISSI_TIMEOUT
+ #define ISSI_TIMEOUT 100
+#endif
+
+#ifndef ISSI_PERSISTENCE
+ #define ISSI_PERSISTENCE 0
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20];
+
+// These buffers match the IS31FL3737 PWM registers.
+// The control buffers match the PG0 LED On/Off registers.
+// Storing them like this is optimal for I2C transfers to the registers.
+// We could optimize this and take out the unused registers from these
+// buffers and the transfers in IS31FL3737_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+uint8_t g_pwm_buffer[DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required = false;
+
+uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 } };
+bool g_led_control_registers_update_required = false;
+
+void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data )
+{
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+ #if ISSI_PERSISTENCE > 0
+ for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
+ break;
+ }
+ #else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ #endif
+}
+
+void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
+{
+ // assumes PG1 is already selected
+
+ // transmit PWM registers in 12 transfers of 16 bytes
+ // g_twi_transfer_buffer[] is 20 bytes
+
+ // iterate over the pwm_buffer contents at 16 byte intervals
+ for ( int i = 0; i < 192; i += 16 ) {
+ g_twi_transfer_buffer[0] = i;
+ // copy the data from i to i+15
+ // device will auto-increment register for data after the first byte
+ // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
+ for ( int j = 0; j < 16; j++ ) {
+ g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
+ }
+
+ #if ISSI_PERSISTENCE > 0
+ for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
+ break;
+ }
+ #else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ #endif
+ }
+}
+
+void IS31FL3737_init( uint8_t addr )
+{
+ // In order to avoid the LEDs being driven with garbage data
+ // in the LED driver's PWM registers, shutdown is enabled last.
+ // Set up the mode and other settings, clear the PWM registers,
+ // then disable software shutdown.
+
+ // Unlock the command register.
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+
+ // Select PG0
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
+ // Turn off all LEDs.
+ for ( int i = 0x00; i <= 0x17; i++ )
+ {
+ IS31FL3737_write_register( addr, i, 0x00 );
+ }
+
+ // Unlock the command register.
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+
+ // Select PG1
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
+ // Set PWM on all LEDs to 0
+ // No need to setup Breath registers to PWM as that is the default.
+ for ( int i = 0x00; i <= 0xBF; i++ )
+ {
+ IS31FL3737_write_register( addr, i, 0x00 );
+ }
+
+ // Unlock the command register.
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+
+ // Select PG3
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION );
+ // Set global current to maximum.
+ IS31FL3737_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF );
+ // Disable software shutdown.
+ IS31FL3737_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 );
+
+ // Wait 10ms to ensure the device has woken up.
+ #ifdef __AVR__
+ _delay_ms( 10 );
+ #else
+ wait_ms(10);
+ #endif
+}
+
+void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
+{
+ if ( index >= 0 && index < DRIVER_LED_TOTAL ) {
+ is31_led led = g_is31_leds[index];
+
+ g_pwm_buffer[led.driver][led.r] = red;
+ g_pwm_buffer[led.driver][led.g] = green;
+ g_pwm_buffer[led.driver][led.b] = blue;
+ g_pwm_buffer_update_required = true;
+ }
+}
+
+void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
+{
+ for ( int i = 0; i < DRIVER_LED_TOTAL; i++ )
+ {
+ IS31FL3737_set_color( i, red, green, blue );
+ }
+}
+
+void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue )
+{
+ is31_led led = g_is31_leds[index];
+
+ uint8_t control_register_r = led.r / 8;
+ uint8_t control_register_g = led.g / 8;
+ uint8_t control_register_b = led.b / 8;
+ uint8_t bit_r = led.r % 8;
+ uint8_t bit_g = led.g % 8;
+ uint8_t bit_b = led.b % 8;
+
+ if ( red ) {
+ g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
+ } else {
+ g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r);
+ }
+ if ( green ) {
+ g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g);
+ } else {
+ g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g);
+ }
+ if ( blue ) {
+ g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b);
+ } else {
+ g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
+ }
+
+ g_led_control_registers_update_required = true;
+
+}
+
+void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
+{
+ if ( g_pwm_buffer_update_required )
+ {
+ // Firstly we need to unlock the command register and select PG1
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
+
+ IS31FL3737_write_pwm_buffer( addr1, g_pwm_buffer[0] );
+ //IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] );
+ }
+ g_pwm_buffer_update_required = false;
+}
+
+void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
+{
+ if ( g_led_control_registers_update_required )
+ {
+ // Firstly we need to unlock the command register and select PG0
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
+ for ( int i=0; i<24; i++ )
+ {
+ IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i] );
+ //IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] );
+ }
+ }
+}
diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h
new file mode 100644
index 00000000000..69c4b9b538f
--- /dev/null
+++ b/drivers/issi/is31fl3737.h
@@ -0,0 +1,207 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ *
+ * 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 .
+ */
+
+
+#ifndef IS31FL3737_DRIVER_H
+#define IS31FL3737_DRIVER_H
+
+#include
+#include
+
+typedef struct is31_led {
+ uint8_t driver:2;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} __attribute__((packed)) is31_led;
+
+extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+
+void IS31FL3737_init( uint8_t addr );
+void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data );
+void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer );
+
+void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue );
+void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
+
+void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue );
+
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
+void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 );
+void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
+
+#define A_1 0x00
+#define A_2 0x01
+#define A_3 0x02
+#define A_4 0x03
+#define A_5 0x04
+#define A_6 0x05
+#define A_7 0x08
+#define A_8 0x09
+#define A_9 0x0A
+#define A_10 0x0B
+#define A_11 0x0C
+#define A_12 0x0D
+
+#define B_1 0x10
+#define B_2 0x11
+#define B_3 0x12
+#define B_4 0x13
+#define B_5 0x14
+#define B_6 0x15
+#define B_7 0x18
+#define B_8 0x19
+#define B_9 0x1A
+#define B_10 0x1B
+#define B_11 0x1C
+#define B_12 0x1D
+
+#define C_1 0x20
+#define C_2 0x21
+#define C_3 0x22
+#define C_4 0x23
+#define C_5 0x24
+#define C_6 0x25
+#define C_7 0x28
+#define C_8 0x29
+#define C_9 0x2A
+#define C_10 0x2B
+#define C_11 0x2C
+#define C_12 0x2D
+
+#define D_1 0x30
+#define D_2 0x31
+#define D_3 0x32
+#define D_4 0x33
+#define D_5 0x34
+#define D_6 0x35
+#define D_7 0x38
+#define D_8 0x39
+#define D_9 0x3A
+#define D_10 0x3B
+#define D_11 0x3C
+#define D_12 0x3D
+
+#define E_1 0x40
+#define E_2 0x41
+#define E_3 0x42
+#define E_4 0x43
+#define E_5 0x44
+#define E_6 0x45
+#define E_7 0x48
+#define E_8 0x49
+#define E_9 0x4A
+#define E_10 0x4B
+#define E_11 0x4C
+#define E_12 0x4D
+
+#define F_1 0x50
+#define F_2 0x51
+#define F_3 0x52
+#define F_4 0x53
+#define F_5 0x54
+#define F_6 0x55
+#define F_7 0x58
+#define F_8 0x59
+#define F_9 0x5A
+#define F_10 0x5B
+#define F_11 0x5C
+#define F_12 0x5D
+
+#define G_1 0x60
+#define G_2 0x61
+#define G_3 0x62
+#define G_4 0x63
+#define G_5 0x64
+#define G_6 0x65
+#define G_7 0x68
+#define G_8 0x69
+#define G_9 0x6A
+#define G_10 0x6B
+#define G_11 0x6C
+#define G_12 0x6D
+
+#define H_1 0x70
+#define H_2 0x71
+#define H_3 0x72
+#define H_4 0x73
+#define H_5 0x74
+#define H_6 0x75
+#define H_7 0x78
+#define H_8 0x79
+#define H_9 0x7A
+#define H_10 0x7B
+#define H_11 0x7C
+#define H_12 0x7D
+
+#define I_1 0x80
+#define I_2 0x81
+#define I_3 0x82
+#define I_4 0x83
+#define I_5 0x84
+#define I_6 0x85
+#define I_7 0x88
+#define I_8 0x89
+#define I_9 0x8A
+#define I_10 0x8B
+#define I_11 0x8C
+#define I_12 0x8D
+
+#define J_1 0x90
+#define J_2 0x91
+#define J_3 0x92
+#define J_4 0x93
+#define J_5 0x94
+#define J_6 0x95
+#define J_7 0x98
+#define J_8 0x99
+#define J_9 0x9A
+#define J_10 0x9B
+#define J_11 0x9C
+#define J_12 0x9D
+
+#define K_1 0xA0
+#define K_2 0xA1
+#define K_3 0xA2
+#define K_4 0xA3
+#define K_5 0xA4
+#define K_6 0xA5
+#define K_7 0xA8
+#define K_8 0xA9
+#define K_9 0xAA
+#define K_10 0xAB
+#define K_11 0xAC
+#define K_12 0xAD
+
+#define L_1 0xB0
+#define L_2 0xB1
+#define L_3 0xB2
+#define L_4 0xB3
+#define L_5 0xB4
+#define L_6 0xB5
+#define L_7 0xB8
+#define L_8 0xB9
+#define L_9 0xBA
+#define L_10 0xBB
+#define L_11 0xBC
+#define L_12 0xBD
+
+#endif // IS31FL3737_DRIVER_H
diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c
new file mode 100644
index 00000000000..8b969057e53
--- /dev/null
+++ b/drivers/oled/glcdfont.c
@@ -0,0 +1,240 @@
+#pragma once
+
+#ifdef __AVR__
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else
+ #define PROGMEM
+#endif
+
+// Helidox 8x6 font with QMK Firmware Logo
+// Online editor: http://teripom.x0.com/
+
+static const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+ 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+ 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+ 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+ 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+ 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+ 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+ 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+ 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+ 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+ 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+ 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+ 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+ 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+ 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+ 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+ 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+ 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+ 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+ 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+ 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+ 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+ 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+ 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+ 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+ 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+ 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+ 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+ 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+ 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+ 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+ 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+ 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+ 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+ 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+ 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+ 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+ 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+ 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+ 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+ 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+ 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+ 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+ 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+ 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+ 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+ 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+ 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+ 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+ 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+ 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+ 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+ 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+ 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+ 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+ 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+ 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+ 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+ 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+ 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+ 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+ 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+ 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+ 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+ 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+ 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+ 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+ 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+ 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+ 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+ 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
+ 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+ 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+ 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+ 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+ 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
+ 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+ 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+ 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+ 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+ 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+ 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+ 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+ 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
+ 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+ 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+ 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+ 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+ 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8,
+ 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F,
+ 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8,
+ 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00,
+ 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0,
+ 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
+ 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E,
+ 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
+ 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
+ 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
+ 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00,
+ 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F,
+ 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00,
+ 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E,
+ 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F,
+ 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F,
+ 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E,
+ 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00,
+ 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E,
+ 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F,
+ 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70,
+ 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49,
+ 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E,
+ 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69,
+ 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C,
+ 0x78, 0x70, 0x60, 0x00, 0x00, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
+ 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
+ 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
+ 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F,
+ 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E,
+ 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F,
+ 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
diff --git a/drivers/oled/licenses.txt b/drivers/oled/licenses.txt
new file mode 100644
index 00000000000..111603ebf3c
--- /dev/null
+++ b/drivers/oled/licenses.txt
@@ -0,0 +1,45 @@
+The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
+
+
+This is the Linux-penguin again...
+
+Originally drewn by Larry Ewing (http://www.isc.tamu.edu/~lewing/)
+(with the GIMP) the Linux Logo has been vectorized by me (Simon Budig,
+http://www.home.unix-ag.org/simon/).
+
+This happened quite some time ago with Corel Draw 4. But luckily
+meanwhile there are tools available to handle vector graphics with
+Linux. Bernhard Herzog (bernhard@users.sourceforge.net) deserves kudos
+for creating Sketch (http://sketch.sourceforge.net), a powerful free
+tool for creating vector graphics. He converted the Corel Draw file to
+the Sketch native format. Since I am unable to maintain the Corel Draw
+file any longer, the Sketch version now is the "official" one.
+
+Anja Gerwinski (anja@gerwinski.de) has created an alternate version of
+the penguin (penguin-variant.sk) with a thinner mouth line and slightly
+altered gradients. It also features a nifty drop shadow.
+
+The third bird (penguin-flat.sk) is a version reduced to three colors
+(black/white/yellow) for e.g. silk screen printing. I made this version
+for a mug, available at the friendly folks at
+http://www.kernelconcepts.de/ - they do good stuff, mail Petra
+(pinguin@kernelconcepts.de) if you need something special or don't
+understand the german :-)
+
+These drawings are copyrighted by Larry Ewing and Simon Budig
+(penguin-variant.sk also by Anja Gerwinski), redistribution is free but
+has to include this README/Copyright notice.
+
+The use of these drawings is free. However I am happy about a sample of
+your mug/t-shirt/whatever with this penguin on it...
+
+Have fun
+ Simon Budig
+
+
+Simon.Budig@unix-ag.org
+http://www.home.unix-ag.org/simon/
+
+Simon Budig
+Am Hardtkoeppel 2
+D-61279 Graevenwiesbach
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
new file mode 100644
index 00000000000..96ea58ccb2c
--- /dev/null
+++ b/drivers/oled/oled_driver.c
@@ -0,0 +1,531 @@
+/*
+Copyright 2019 Ryan Caltabiano
+
+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 .
+*/
+#include "i2c_master.h"
+#include "oled_driver.h"
+#include OLED_FONT_H
+#include "timer.h"
+#include "print.h"
+
+#include
+
+#if defined(__AVR__)
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else // defined(ESP8266)
+ #define PROGMEM
+ #define memcpy_P(des, src, len) memcpy(des, src, len)
+#endif // defined(__AVR__)
+
+// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
+// Fundamental Commands
+#define CONTRAST 0x81
+#define DISPLAY_ALL_ON 0xA5
+#define DISPLAY_ALL_ON_RESUME 0xA4
+#define NORMAL_DISPLAY 0xA6
+#define DISPLAY_ON 0xAF
+#define DISPLAY_OFF 0xAE
+
+// Scrolling Commands
+#define ACTIVATE_SCROLL 0x2F
+#define DEACTIVATE_SCROLL 0x2E
+#define SCROLL_RIGHT 0x26
+#define SCROLL_LEFT 0x27
+#define SCROLL_RIGHT_UP 0x29
+#define SCROLL_LEFT_UP 0x2A
+
+// Addressing Setting Commands
+#define MEMORY_MODE 0x20
+#define COLUMN_ADDR 0x21
+#define PAGE_ADDR 0x22
+
+// Hardware Configuration Commands
+#define DISPLAY_START_LINE 0x40
+#define SEGMENT_REMAP 0xA0
+#define SEGMENT_REMAP_INV 0xA1
+#define MULTIPLEX_RATIO 0xA8
+#define COM_SCAN_INC 0xC0
+#define COM_SCAN_DEC 0xC8
+#define DISPLAY_OFFSET 0xD3
+#define COM_PINS 0xDA
+
+// Timing & Driving Commands
+#define DISPLAY_CLOCK 0xD5
+#define PRE_CHARGE_PERIOD 0xD9
+#define VCOM_DETECT 0xDB
+
+// Charge Pump Commands
+#define CHARGE_PUMP 0x8D
+
+// Misc defines
+#define OLED_TIMEOUT 60000
+#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
+#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
+
+// i2c defines
+#define I2C_CMD 0x00
+#define I2C_DATA 0x40
+#if defined(__AVR__)
+ // already defined on ARM
+ #define I2C_TIMEOUT 100
+ #define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
+#else // defined(__AVR__)
+ #define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
+#endif // defined(__AVR__)
+#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
+#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, I2C_TIMEOUT)
+
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+
+// Display buffer's is the same as the OLED memory layout
+// this is so we don't end up with rounding errors with
+// parts of the display unusable or don't get cleared correctly
+// and also allows for drawing & inverting
+uint8_t oled_buffer[OLED_MATRIX_SIZE];
+uint8_t* oled_cursor;
+OLED_BLOCK_TYPE oled_dirty = 0;
+bool oled_initialized = false;
+bool oled_active = false;
+bool oled_scrolling = false;
+uint8_t oled_rotation = 0;
+uint8_t oled_rotation_width = 0;
+#if !defined(OLED_DISABLE_TIMEOUT)
+ uint16_t oled_last_activity;
+#endif
+
+// Internal variables to reduce math instructions
+
+#if defined(__AVR__)
+// identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently
+// probably should move this into i2c_master...
+static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
+ i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
+
+ for (uint16_t i = 0; i < length && status >= 0; i++) {
+ status = i2c_write(pgm_read_byte((const char*)data++), timeout);
+ if (status) break;
+ }
+
+ i2c_stop();
+
+ return status;
+}
+#endif
+
+// Flips the rendering bits for a character at the current cursor position
+static void InvertCharacter(uint8_t *cursor)
+{
+ const uint8_t *end = cursor + OLED_FONT_WIDTH;
+ while (cursor < end) {
+ *cursor = ~(*cursor);
+ cursor++;
+ }
+}
+
+bool oled_init(uint8_t rotation) {
+ oled_rotation = oled_init_user(rotation);
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ oled_rotation_width = OLED_DISPLAY_WIDTH;
+ } else {
+ oled_rotation_width = OLED_DISPLAY_HEIGHT;
+ }
+ i2c_init();
+
+ static const uint8_t PROGMEM display_setup1[] = {
+ I2C_CMD,
+ DISPLAY_OFF,
+ DISPLAY_CLOCK, 0x80,
+ MULTIPLEX_RATIO, OLED_DISPLAY_HEIGHT - 1,
+ DISPLAY_OFFSET, 0x00,
+ DISPLAY_START_LINE | 0x00,
+ CHARGE_PUMP, 0x14,
+ MEMORY_MODE, 0x00, }; // Horizontal addressing mode
+ if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) {
+ print("oled_init cmd set 1 failed\n");
+ return false;
+ }
+
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) {
+ static const uint8_t PROGMEM display_normal[] = {
+ I2C_CMD,
+ SEGMENT_REMAP_INV,
+ COM_SCAN_DEC };
+ if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) {
+ print("oled_init cmd normal rotation failed\n");
+ return false;
+ }
+ } else {
+ static const uint8_t PROGMEM display_flipped[] = {
+ I2C_CMD,
+ SEGMENT_REMAP,
+ COM_SCAN_INC };
+ if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) {
+ print("display_flipped failed\n");
+ return false;
+ }
+ }
+
+ static const uint8_t PROGMEM display_setup2[] = {
+ I2C_CMD,
+ COM_PINS, 0x02,
+ CONTRAST, 0x8F,
+ PRE_CHARGE_PERIOD, 0xF1,
+ VCOM_DETECT, 0x40,
+ DISPLAY_ALL_ON_RESUME,
+ NORMAL_DISPLAY,
+ DEACTIVATE_SCROLL,
+ DISPLAY_ON };
+ if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) {
+ print("display_setup2 failed\n");
+ return false;
+ }
+
+ oled_clear();
+ oled_initialized = true;
+ oled_active = true;
+ oled_scrolling = false;
+ return true;
+}
+
+__attribute__((weak))
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ return rotation;
+}
+
+void oled_clear(void) {
+ memset(oled_buffer, 0, sizeof(oled_buffer));
+ oled_cursor = &oled_buffer[0];
+ oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type
+}
+
+static void calc_bounds(uint8_t update_start, uint8_t* cmd_array)
+{
+ cmd_array[1] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH;
+ cmd_array[4] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH;
+ cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1];
+ cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1;
+}
+
+static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array)
+{
+ cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8;
+ cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT;
+ cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1];;
+ cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8;
+}
+
+uint8_t crot(uint8_t a, int8_t n)
+{
+ const uint8_t mask = 0x7;
+ n &= mask;
+ return a << n | a >> (-n & mask);
+}
+
+static void rotate_90(const uint8_t* src, uint8_t* dest)
+{
+ for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) {
+ uint8_t selector = (1 << i);
+ for (uint8_t j = 0; j < 8; ++j) {
+ dest[i] |= crot(src[j] & selector, shift - (int8_t)j);
+ }
+ }
+}
+
+void oled_render(void) {
+ // Do we have work to do?
+ if (!oled_dirty || oled_scrolling) {
+ return;
+ }
+
+ // Find first dirty block
+ uint8_t update_start = 0;
+ while (!(oled_dirty & (1 << update_start))) { ++update_start; }
+
+ // Set column & page position
+ static uint8_t display_start[] = {
+ I2C_CMD,
+ COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1,
+ PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1 };
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
+ } else {
+ calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
+ }
+
+ // Send column & page position
+ if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) {
+ print("oled_render offset command failed\n");
+ return;
+ }
+
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ // Send render data chunk as is
+ if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
+ print("oled_render data failed\n");
+ return;
+ }
+ } else {
+ // Rotate the render chunks
+ const static uint8_t source_map[] = OLED_SOURCE_MAP;
+ const static uint8_t target_map[] = OLED_TARGET_MAP;
+
+ static uint8_t temp_buffer[OLED_BLOCK_SIZE];
+ memset(temp_buffer, 0, sizeof(temp_buffer));
+ for(uint8_t i = 0; i < sizeof(source_map); ++i) {
+ rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]);
+ }
+
+ // Send render data chunk after rotating
+ if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
+ print("oled_render data failed\n");
+ return;
+ }
+ }
+
+ // Turn on display if it is off
+ oled_on();
+
+ // Clear dirty flag
+ oled_dirty &= ~(1 << update_start);
+}
+
+void oled_set_cursor(uint8_t col, uint8_t line) {
+ uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH;
+
+ // Out of bounds?
+ if (index >= OLED_MATRIX_SIZE) {
+ index = 0;
+ }
+
+ oled_cursor = &oled_buffer[index];
+}
+
+void oled_advance_page(bool clearPageRemainder) {
+ uint16_t index = oled_cursor - &oled_buffer[0];
+ uint8_t remaining = oled_rotation_width - (index % oled_rotation_width);
+
+ if (clearPageRemainder) {
+ // Remaining Char count
+ remaining = remaining / OLED_FONT_WIDTH;
+
+ // Write empty character until next line
+ while (remaining--)
+ oled_write_char(' ', false);
+ } else {
+ // Next page index out of bounds?
+ if (index + remaining >= OLED_MATRIX_SIZE) {
+ index = 0;
+ remaining = 0;
+ }
+
+ oled_cursor = &oled_buffer[index + remaining];
+ }
+}
+
+void oled_advance_char(void) {
+ uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH;
+ uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width);
+
+ // Do we have enough space on the current line for the next character
+ if (remainingSpace < OLED_FONT_WIDTH) {
+ nextIndex += remainingSpace;
+ }
+
+ // Did we go out of bounds
+ if (nextIndex >= OLED_MATRIX_SIZE) {
+ nextIndex = 0;
+ }
+
+ // Update cursor position
+ oled_cursor = &oled_buffer[nextIndex];
+}
+
+// Main handler that writes character data to the display buffer
+void oled_write_char(const char data, bool invert) {
+ // Advance to the next line if newline
+ if (data == '\n') {
+ // Old source wrote ' ' until end of line...
+ oled_advance_page(true);
+ return;
+ }
+
+ // copy the current render buffer to check for dirty after
+ static uint8_t oled_temp_buffer[OLED_FONT_WIDTH];
+ memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH);
+
+ // set the reder buffer data
+ uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index
+ if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) {
+ memset(oled_cursor, 0x00, OLED_FONT_WIDTH);
+ } else {
+ const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH];
+ memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH);
+ }
+
+ // Invert if needed
+ if (invert) {
+ InvertCharacter(oled_cursor);
+ }
+
+ // Dirty check
+ if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) {
+ uint16_t index = oled_cursor - &oled_buffer[0];
+ oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
+ // Edgecase check if the written data spans the 2 chunks
+ oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE));
+ }
+
+ // Finally move to the next char
+ oled_advance_char();
+}
+
+void oled_write(const char *data, bool invert) {
+ const char *end = data + strlen(data);
+ while (data < end) {
+ oled_write_char(*data, invert);
+ data++;
+ }
+}
+
+void oled_write_ln(const char *data, bool invert) {
+ oled_write(data, invert);
+ oled_advance_page(true);
+}
+
+#if defined(__AVR__)
+void oled_write_P(const char *data, bool invert) {
+ uint8_t c = pgm_read_byte(data);
+ while (c != 0) {
+ oled_write_char(c, invert);
+ c = pgm_read_byte(++data);
+ }
+}
+
+void oled_write_ln_P(const char *data, bool invert) {
+ oled_write_P(data, invert);
+ oled_advance_page(true);
+}
+#endif // defined(__AVR__)
+
+bool oled_on(void) {
+#if !defined(OLED_DISABLE_TIMEOUT)
+ oled_last_activity = timer_read();
+#endif
+
+ static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON };
+ if (!oled_active) {
+ if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) {
+ print("oled_on cmd failed\n");
+ return oled_active;
+ }
+ oled_active = true;
+ }
+ return oled_active;
+}
+
+bool oled_off(void) {
+ static const uint8_t PROGMEM display_off[] = { I2C_CMD, DISPLAY_OFF };
+ if (oled_active) {
+ if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) {
+ print("oled_off cmd failed\n");
+ return oled_active;
+ }
+ oled_active = false;
+ }
+ return !oled_active;
+}
+
+bool oled_scroll_right(void) {
+ // Dont enable scrolling if we need to update the display
+ // This prevents scrolling of bad data from starting the scroll too early after init
+ if (!oled_dirty && !oled_scrolling) {
+ static const uint8_t PROGMEM display_scroll_right[] = {
+ I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL };
+ if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) {
+ print("oled_scroll_right cmd failed\n");
+ return oled_scrolling;
+ }
+ oled_scrolling = true;
+ }
+ return oled_scrolling;
+}
+
+bool oled_scroll_left(void) {
+ // Dont enable scrolling if we need to update the display
+ // This prevents scrolling of bad data from starting the scroll too early after init
+ if (!oled_dirty && !oled_scrolling) {
+ static const uint8_t PROGMEM display_scroll_left[] = {
+ I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL };
+ if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) {
+ print("oled_scroll_left cmd failed\n");
+ return oled_scrolling;
+ }
+ oled_scrolling = true;
+ }
+ return oled_scrolling;
+}
+
+bool oled_scroll_off(void) {
+ if (oled_scrolling) {
+ static const uint8_t PROGMEM display_scroll_off[] = { I2C_CMD, DEACTIVATE_SCROLL };
+ if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
+ print("oled_scroll_off cmd failed\n");
+ return oled_scrolling;
+ }
+ oled_scrolling = false;
+ }
+ return !oled_scrolling;
+}
+
+uint8_t oled_max_chars(void) {
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH;
+ }
+ return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH;
+}
+
+uint8_t oled_max_lines(void) {
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT;
+ }
+ return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT;
+}
+
+void oled_task(void) {
+ if (!oled_initialized) {
+ return;
+ }
+
+ oled_set_cursor(0, 0);
+
+ oled_task_user();
+
+ // Smart render system, no need to check for dirty
+ oled_render();
+
+ // Display timeout check
+#if !defined(OLED_DISABLE_TIMEOUT)
+ if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) {
+ oled_off();
+ }
+#endif
+}
+
+__attribute__((weak))
+void oled_task_user(void) {
+}
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
new file mode 100644
index 00000000000..ec07f1d9b84
--- /dev/null
+++ b/drivers/oled/oled_driver.h
@@ -0,0 +1,192 @@
+/*
+Copyright 2019 Ryan Caltabiano
+
+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 .
+*/
+#pragma once
+
+#include
+#include
+
+
+#if defined(OLED_DISPLAY_CUSTOM)
+ // Expected user to implement the necessary defines
+#elif defined(OLED_DISPLAY_128X64)
+ // Double height 128x64
+ #define OLED_DISPLAY_WIDTH 128
+ #define OLED_DISPLAY_HEIGHT 64
+ #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed)
+ #define OLED_BLOCK_TYPE uint32_t
+ #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed)
+ #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
+
+ // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
+ // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
+ #define OLED_SOURCE_MAP { 32, 40, 48, 56 }
+ #define OLED_TARGET_MAP { 24, 16, 8, 0 }
+ // If OLED_BLOCK_TYPE is uint16_t, these tables would look like:
+ // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
+ // #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 }
+ // If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
+ // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 }
+ // #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 }
+#else // defined(OLED_DISPLAY_128X64)
+ // Default 128x32
+ #define OLED_DISPLAY_WIDTH 128
+ #define OLED_DISPLAY_HEIGHT 32
+ #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed)
+ #define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only
+ #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed)
+ #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
+
+ // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
+ // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
+ #define OLED_SOURCE_MAP { 0, 8, 16, 24 }
+ #define OLED_TARGET_MAP { 24, 16, 8, 0 }
+ // If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
+ // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
+ // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 }
+#endif // defined(OLED_DISPLAY_CUSTOM)
+
+// Address to use for tthe i2d oled communication
+#if !defined(OLED_DISPLAY_ADDRESS)
+ #define OLED_DISPLAY_ADDRESS 0x3C
+#endif
+
+// Custom font file to use
+#if !defined(OLED_FONT_H)
+ #define OLED_FONT_H "glcdfont.c"
+#endif
+// unsigned char value of the first character in the font file
+#if !defined(OLED_FONT_START)
+ #define OLED_FONT_START 0
+#endif
+// unsigned char value of the last character in the font file
+#if !defined(OLED_FONT_END)
+ #define OLED_FONT_END 224
+#endif
+// Font render width
+#if !defined(OLED_FONT_WIDTH)
+ #define OLED_FONT_WIDTH 6
+#endif
+// Font render height
+#if !defined(OLED_FONT_HEIGHT)
+ #define OLED_FONT_HEIGHT 8
+#endif
+
+// OLED Rotation enum values are flags
+typedef enum {
+ OLED_ROTATION_0 = 0,
+ OLED_ROTATION_90 = 1,
+ OLED_ROTATION_180 = 2,
+ OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
+} oled_rotation_t;
+
+// Initialize the oled display, rotating the rendered output based on the define passed in.
+// Returns true if the OLED was initialized successfully
+bool oled_init(oled_rotation_t rotation);
+
+// Called at the start of oled_init, weak function overridable by the user
+// rotation - the value passed into oled_init
+// Return new oled_rotation_t if you want to override default rotation
+oled_rotation_t oled_init_user(oled_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void oled_clear(void);
+
+// Renders the dirty chunks of the buffer to oled display
+void oled_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions
+void oled_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void oled_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void oled_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void oled_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void oled_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void oled_write_ln(const char *data, bool invert);
+
+#if defined(__AVR__)
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
+void oled_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
+void oled_write_ln_P(const char *data, bool invert);
+#else
+ // Writes a string to the buffer at current cursor position
+ // Advances the cursor while writing, inverts the pixels if true
+ #define oled_write_P(data, invert) oled_write(data, invert)
+
+ // Writes a string to the buffer at current cursor position
+ // Advances the cursor while writing, inverts the pixels if true
+ // Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+ #define oled_write_ln_P(data, invert) oled_write(data, invert)
+#endif // defined(__AVR__)
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool oled_on(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool oled_off(void);
+
+// Basically it's oled_render, but with timeout management and oled_task_user calling!
+void oled_task(void);
+
+// Called at the start of oled_task, weak function overridable by the user
+void oled_task_user(void);
+
+// Scrolls the entire display right
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_right(void);
+
+// Scrolls the entire display left
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_left(void);
+
+// Turns off display scrolling
+// Returns true if the screen was not scrolling or stops scrolling
+bool oled_scroll_off(void);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t oled_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the oled
+uint8_t oled_max_lines(void);
diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h
index 810aa254e4b..4af4dda63ae 100644
--- a/keyboards/1upkeyboards/super16/config.h
+++ b/keyboards/1upkeyboards/super16/config.h
@@ -21,7 +21,7 @@ along with this program. If not, see .
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x0000
+#define PRODUCT_ID 0x2010
#define DEVICE_VER 0x0001
#define MANUFACTURER 1upkeyboards
#define PRODUCT super16
@@ -65,9 +65,9 @@ along with this program. If not, see .
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
-/*== all animations enable ==*/
-// #define RGBLIGHT_ANIMATIONS
-// /*== or choose animations ==*/
+ /*== all animations enable ==*/
+ #define RGBLIGHT_ANIMATIONS
+ /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
@@ -85,10 +85,9 @@ along with this program. If not, see .
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
-/* number of backlight levels */
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
+
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
@@ -242,3 +241,5 @@ along with this program. If not, see .
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0
+
+/* prevent stuck modifiers */
diff --git a/keyboards/1upkeyboards/super16/info.json b/keyboards/1upkeyboards/super16/info.json
index e8f4faa23d4..10f81f4d08b 100644
--- a/keyboards/1upkeyboards/super16/info.json
+++ b/keyboards/1upkeyboards/super16/info.json
@@ -1,12 +1,15 @@
{
- "keyboard_name": "super16",
- "url": "",
- "maintainer": "qmk",
- "width": 4,
- "height": 4,
- "layouts": {
- "LAYOUT_ortho_4x4": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}]
- }
+ "keyboard_name": "super16",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}]
+ },
+ "LAYOUT_numpad_4x4": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}]
}
-}
\ No newline at end of file
+ }
+}
diff --git a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c
index 36ad3f2839a..47889abae57 100644
--- a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c
@@ -15,40 +15,16 @@
*/
#include QMK_KEYBOARD_H
-// Defines the keycodes used by our macros in process_record_user
-enum custom_keycodes {
- QMKBEST = SAFE_RANGE,
- QMKURL
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4( /* Base */
- KC_A, KC_1, KC_2, KC_4, \
- KC_A, KC_1, KC_2, KC_4, \
- KC_A, KC_1, KC_2, KC_4, \
- KC_A, KC_1, KC_2, KC_4 \
+ RGB_TOG, KC_1, KC_U, KC_P,
+ RGB_MOD, KC_1, KC_U, KC_P,
+ RGB_TOG, KC_1, KC_U, KC_P,
+ RGB_MOD, KC_1, KC_U, KC_P
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QMKBEST:
- if (record->event.pressed) {
- // when keycode QMKBEST is pressed
- SEND_STRING("QMK is the best thing ever!");
- } else {
- // when keycode QMKBEST is released
- }
- break;
- case QMKURL:
- if (record->event.pressed) {
- // when keycode QMKURL is pressed
- SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
- } else {
- // when keycode QMKURL is released
- }
- break;
- }
return true;
}
diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk
index 8fb44b9b5cf..31042dfb811 100644
--- a/keyboards/1upkeyboards/super16/rules.mk
+++ b/keyboards/1upkeyboards/super16/rules.mk
@@ -1,5 +1,4 @@
# MCU name
-#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.
@@ -15,7 +14,6 @@ MCU = atmega32u4
# software delays.
F_CPU = 16000000
-
#
# LUFA specific
#
@@ -48,7 +46,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# atmega32a bootloadHID
BOOTLOADER = caterina
-
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
@@ -58,26 +55,27 @@ BOOTLOADER = caterina
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+#EXTRAFLAGS += -flto
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
-HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
-LAYOUTS = ortho_4x4
+LAYOUTS = ortho_4x4 numpad_4x4
diff --git a/keyboards/1upkeyboards/super16/super16.c b/keyboards/1upkeyboards/super16/super16.c
index cf33cab9269..72e47f447b1 100644
--- a/keyboards/1upkeyboards/super16/super16.c
+++ b/keyboards/1upkeyboards/super16/super16.c
@@ -16,28 +16,28 @@
#include "super16.h"
void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
- matrix_init_user();
+ matrix_init_user();
}
void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
- matrix_scan_user();
+ 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
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
- return process_record_user(keycode, record);
+ 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
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- led_set_user(usb_led);
+ led_set_user(usb_led);
}
diff --git a/keyboards/1upkeyboards/super16/super16.h b/keyboards/1upkeyboards/super16/super16.h
index a95f687b164..0595af8dcd6 100644
--- a/keyboards/1upkeyboards/super16/super16.h
+++ b/keyboards/1upkeyboards/super16/super16.h
@@ -25,15 +25,27 @@
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
+
#define LAYOUT_ortho_4x4( \
- k00, k01, k02, k03, \
- k10, k11, k12, k13, \
- k20, k21, k22, k23, \
- k30, k31, k32, k33 \
-) \
-{ \
- { k00, k01, k02, k03 }, \
- { k10, k11, k12, k13 }, \
- { k20, k21, k22, k23 }, \
- { k30, k31, k32, k33 }, \
+ K00, K01, K02, K03, \
+ K10, K11, K12, K13, \
+ K20, K21, K22, K23, \
+ K30, K31, K32, K33 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, K23 }, \
+ { K30, K31, K32, K33 } \
+}
+
+#define LAYOUT_numpad_4x4( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, \
+ K20, K21, K22, K23, \
+ K31, K32 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, KC_NO }, \
+ { K20, K21, K22, K23 }, \
+ { KC_NO, K31, K32, KC_NO } \
}
diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h
index 36840d2f6c1..5eb65c74ad8 100644
--- a/keyboards/40percentclub/nano/config.h
+++ b/keyboards/40percentclub/nano/config.h
@@ -31,12 +31,29 @@ along with this program. If not, see .
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
+/*
+ * 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)
+ * NO_DIODE = switches are directly connected to AVR pins
+ *
+*/
+// #define MATRIX_ROW_PINS { D0, D5 }
+// #define MATRIX_COL_PINS { F1, F0, B0 }
+#define DIRECT_PINS { \
+ { F4, F5, F6, F7 }, \
+ { D1, D0, D4, C6 }, \
+}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+//#define DIODE_DIRECTION CUSTOM_MATRIX
+
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 6 // Number of LEDs
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-#define TAPPING_TERM 200
diff --git a/keyboards/40percentclub/nano/matrix.c b/keyboards/40percentclub/nano/matrix.c
deleted file mode 100644
index fa2461af5fe..00000000000
--- a/keyboards/40percentclub/nano/matrix.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-
-Note for ErgoDox EZ customizers: Here be dragons!
-This is not a file you want to be messing with.
-All of the interesting stuff for you is under keymaps/ :)
-Love, Erez
-
-Copyright 2013 Oleg Kostyuk
-
-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 .
-*/
-
-/*
- * scan matrix
- */
-#include
-#include
-#include
-#include
-#include "action_layer.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "nano.h"
-#include
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_stage[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-static uint16_t debouncing_time;
-static bool debouncing = false;
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-
- DDRF &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
- PORTF |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
- DDRC &= ~(1<<6);
- PORTC |= (1<<6);
- DDRD &= ~(1<<0 | 1<<1 | 1<<4);
- PORTD |= (1<<0 | 1<<1 | 1<<4);
-
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- matrix_stage[i] = 0;
- }
-
- matrix_init_quantum();
-
-}
-
-uint8_t matrix_scan(void)
-{
- matrix_stage[0] =
- (PINF&(1<<4) ? 0 : (1<<0)) |
- (PINF&(1<<5) ? 0 : (1<<1)) |
- (PINF&(1<<6) ? 0 : (1<<2)) |
- (PINF&(1<<7) ? 0 : (1<<3));
- matrix_stage[1] =
- (PIND&(1<<1) ? 0 : (1<<0)) |
- (PIND&(1<<0) ? 0 : (1<<1)) |
- (PIND&(1<<4) ? 0 : (1<<2)) |
- (PINC&(1<<6) ? 0 : (1<<3));
-
- if (memcmp(matrix_debouncing, matrix_stage, sizeof(matrix)) != 0) {
- debouncing = true;
- debouncing_time = timer_read();
- }
-
- matrix_debouncing[0] = matrix_stage[0];
- matrix_debouncing[1] = matrix_stage[1];
-
- if (debouncing && (timer_elapsed(debouncing_time) > 20)) {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- debouncing = false;
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-bool matrix_is_modified(void)
-{
- return true;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<
+
+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 .
+*/
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_tsangan(
+ KC_GESC, 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_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1),\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [_FN1] = LAYOUT_tsangan(
+ KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______,\
+ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ KC_GRV, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c
index d81eb92d494..ce0e0a7ba16 100644
--- a/keyboards/cannonkeys/satisfaction75/i2c_master.c
+++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c
@@ -29,8 +29,6 @@
#include "quantum.h"
#include
#include
-#include "chtypes.h"
-#include "ch.h"
static uint8_t i2c_address;
@@ -44,6 +42,18 @@ static const I2CConfig i2cconfig = {
0
};
+static i2c_status_t chibios_to_qmk(const msg_t* status) {
+ switch (*status) {
+ case I2C_NO_ERROR:
+ return I2C_STATUS_SUCCESS;
+ case I2C_TIMEOUT:
+ return I2C_STATUS_TIMEOUT;
+ // I2C_BUS_ERROR, I2C_ARBITRATION_LOST, I2C_ACK_FAILURE, I2C_OVERRUN, I2C_PEC_ERROR, I2C_SMB_ALERT
+ default:
+ return I2C_STATUS_ERROR;
+ }
+}
+
__attribute__ ((weak))
void i2c_init(void)
{
@@ -59,34 +69,32 @@ void i2c_init(void)
//i2cInit(); //This is invoked by halInit() so no need to redo it.
}
-// This is usually not needed
-uint8_t i2c_start(uint8_t address)
+i2c_status_t i2c_start(uint8_t address)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return 0;
+ return I2C_STATUS_SUCCESS;
}
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout)
{
- msg_t status = MSG_OK;
-
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
i2cAcquireBus(&I2C_DRIVER);
- status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
i2cReleaseBus(&I2C_DRIVER);
- return status;
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
@@ -98,19 +106,19 @@ uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t l
}
complete_packet[0] = regaddr;
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-// This is usually not needed. It releases the driver to allow pins to become GPIO again.
-uint8_t i2c_stop(void)
+void i2c_stop(void)
{
i2cStop(&I2C_DRIVER);
- return 0;
}
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c
index 4316d518679..f94ecb5fbb0 100644
--- a/keyboards/cannonkeys/stm32f072/keyboard.c
+++ b/keyboards/cannonkeys/stm32f072/keyboard.c
@@ -15,7 +15,6 @@ backlight_config_t kb_backlight_config = {
.level = BACKLIGHT_LEVELS
};
-
bool eeprom_is_valid(void)
{
return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC &&
@@ -51,9 +50,13 @@ void eeprom_init_kb(void)
} else {
// Save the magic number last, in case saving was interrupted
eeprom_set_valid(true);
+ save_backlight_config_to_eeprom();
}
}
+__attribute__ ((weak))
+void matrix_init_board(void);
+
void matrix_init_kb(void){
eeprom_init_kb();
/* MOSI pin*/
@@ -64,6 +67,8 @@ void matrix_init_kb(void){
leds_init();
#endif
backlight_init_ports();
+
+ matrix_init_board();
}
void matrix_scan_kb(void)
diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json
index fec60338af6..17bdacaa5db 100644
--- a/keyboards/canoe/info.json
+++ b/keyboards/canoe/info.json
@@ -2,7 +2,7 @@
"keyboard_name": "Canoe",
"maintainer": "qmk",
"url": "",
- "height": 8,
+ "height": 6,
"width": 15,
"layouts": {
"LAYOUT_iso": {
diff --git a/keyboards/clueboard/card/info.json b/keyboards/clueboard/card/info.json
index 86dbb4faa7e..8dfa035996f 100644
--- a/keyboards/clueboard/card/info.json
+++ b/keyboards/clueboard/card/info.json
@@ -4,7 +4,7 @@
"url": "",
"maintainer": "skullydazed",
"width": 10,
- "height": 7,
+ "height": 8,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c
index 0ac7133591f..4a7cb3a3a2f 100644
--- a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c
+++ b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c
@@ -1,4 +1,5 @@
#include "quantum.h"
+#include "command.h"
#include "action_pseudo_lut.h"
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
diff --git a/keyboards/converter/modelm101/config.h b/keyboards/converter/modelm101/config.h
new file mode 100644
index 00000000000..97b78614ce6
--- /dev/null
+++ b/keyboards/converter/modelm101/config.h
@@ -0,0 +1,123 @@
+/*
+Copyright 2019 iw0rm3r
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER iw0rm3r
+#define PRODUCT IBM Model M 101/102
+#define DESCRIPTION Controlled by AVR chip
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 16
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2, F1, F0 }
+#define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */
+#define DEBOUNCING_DELAY 5
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
\ No newline at end of file
diff --git a/keyboards/converter/modelm101/info.json b/keyboards/converter/modelm101/info.json
new file mode 100644
index 00000000000..868cd89b1a6
--- /dev/null
+++ b/keyboards/converter/modelm101/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "IBM Model M 101 ANSI/102 ISO",
+ "url": "https://github.com/iw0rm3r/qmk_firmware/tree/modelm101/keyboards/converter/modelm101",
+ "maintainer": "iw0rm3r",
+ "width": 22.5,
+ "height": 6.5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/handwired/woodpad/keymaps/drashna/config.h b/keyboards/converter/modelm101/keymaps/default/config.h
similarity index 50%
rename from keyboards/handwired/woodpad/keymaps/drashna/config.h
rename to keyboards/converter/modelm101/keymaps/default/config.h
index c4f28034c87..779e5a858f9 100644
--- a/keyboards/handwired/woodpad/keymaps/drashna/config.h
+++ b/keyboards/converter/modelm101/keymaps/default/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2019 iw0rm3r
*
* 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,32 +14,6 @@
* along with this program. If not, see .
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include QMK_KEYBOARD_CONFIG_H
-
-#if (defined(TAP_DANCE_ENABLE) && !defined(TAPPING_TERM))
-#define TAPPING_TERM 200
-#endif // TAP_DANCE_ENABLE
-
-
-#define B5_AUDIO
-
-
-#ifdef RGBLIGHT_ENABLE
-#define RGB_DI_PIN D3
-#define RGBLED_NUM 14 // Number of LEDs
-#define RGBLIGHT_ANIMATIONS
-#define RGBLIGHT_HUE_STEP 12
-#define RGBLIGHT_SAT_STEP 12
-#define RGBLIGHT_VAL_STEP 12
-#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4
-#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
-#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
-#define RGBLIGHT_SLEEP
-#endif // RGBLIGHT_ENABLE
-
-#define FORCE_NKRO
-
-#endif
+// place overrides here
diff --git a/keyboards/converter/modelm101/keymaps/default/keymap.c b/keyboards/converter/modelm101/keymaps/default/keymap.c
new file mode 100644
index 00000000000..4a8614a3f9c
--- /dev/null
+++ b/keyboards/converter/modelm101/keymaps/default/keymap.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 iw0rm3r
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base layer */
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_LGUI,
+ KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/converter/modelm101/keymaps/default/readme.md b/keyboards/converter/modelm101/keymaps/default/readme.md
new file mode 100644
index 00000000000..fb91a8ebe52
--- /dev/null
+++ b/keyboards/converter/modelm101/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for modelm101
\ No newline at end of file
diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h b/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h
new file mode 100644
index 00000000000..779e5a858f9
--- /dev/null
+++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 iw0rm3r
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c b/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c
new file mode 100644
index 00000000000..26ced801e5a
--- /dev/null
+++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 iw0rm3r
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base layer */
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_LGUI, 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_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_CAPS,
+ KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_APP, KC_PDOT
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md b/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md
new file mode 100644
index 00000000000..17b0f40da27
--- /dev/null
+++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md
@@ -0,0 +1,5 @@
+# This is my personal keymap for modelm101
+
+Caps Lock is mapped as LGUI (Windows key).
+Num Enter is mapped as Caps Lock.
+Num0 is mapped as App key (context menu).
\ No newline at end of file
diff --git a/keyboards/converter/modelm101/modelm101.c b/keyboards/converter/modelm101/modelm101.c
new file mode 100644
index 00000000000..c2204bea660
--- /dev/null
+++ b/keyboards/converter/modelm101/modelm101.c
@@ -0,0 +1,67 @@
+/* Copyright 2019 iw0rm3r
+ *
+ * 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 .
+ */
+#include "modelm101.h"
+
+void keyboard_pre_init_kb(void) {
+ /* Setting status LEDs pins to output and +5V (off) */
+ setPinOutput(B4);
+ setPinOutput(B5);
+ setPinOutput(B6);
+ writePinHigh(B4);
+ writePinHigh(B5);
+ writePinHigh(B6);
+}
+
+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) {
+ if (usb_led & (1<.
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ * The first section contains "names" for physical keys of the keyboard
+ * and defines their position on the board.
+ * The second section defines position of the keys on the switch matrix
+ * (where COLUMNS and ROWS crosses). */
+
+#define LAYOUT( \
+ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \
+ \
+ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \
+ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \
+ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \
+ K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \
+ K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \
+) \
+{ \
+/* 00 */ { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \
+/* 01 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \
+/* 02 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \
+/* 03 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \
+/* 04 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \
+/* 05 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \
+/* 06 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \
+/* 07 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D }, \
+}
+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
\ No newline at end of file
diff --git a/keyboards/converter/modelm101/readme.md b/keyboards/converter/modelm101/readme.md
new file mode 100644
index 00000000000..5355c800714
--- /dev/null
+++ b/keyboards/converter/modelm101/readme.md
@@ -0,0 +1,42 @@
+# modelm101
+
+
+
+This is a configuration for the QMK firmware for reversible conversion of IBM's Model M keyboards (common 101-key ANSI and 102-key ISO models) from stock, power-hungry controller, to a modern one, running the USB bus.
+Configuration is build for the Atmel AT90USB1286 controller, which you can easily use on the Teensy 2.0++ board (produced by PJRC).
+Project is heavely based on 2 other projects:
+1. Teensy 2.0++-based custom Model M controller running TMK firmware ('modelm" by [lmorchard](https://blog.lmorchard.com/2016/02/21/modelm-controller/)); - had a few issues.
+2. Teensy 2.0++-based custom Model M 122-key controller running QMK firmware ("ibm122m" by [lukexorz](https://github.com/lukexorz)); - had wrong layout for 101/102-key boards and no status LED support.
+
+For this conversion you will need:
+1. Teensy 2.0++ dev board itself (can be used a different dev board, but it will require some changes in configuration);
+2. Ribbon connectors to connect the membrane to a dev board. Depending on your Model M variation, you will need 1 Trio-mate 16pin connector (6-520315-6 or 6-520415-6) and 1 Trio-mate 8pin connector (5-120628-8 or 5-520314-8), or 2 Trio-mate 16pin connectors;
+3. Full-sized breadboard (without power rails; half-size should do, but full-sized one looks more native) or a PCB to wire everything up;
+4. A bunch of jumper wires;
+5. mini-USB male cable with any USB socket you want to use to connect Teensy inside the keyboard to your PC (I use short mini-USB male to mini-USB female cable);
+6. (optional) Resistors for connecting status LEDs if your LED PCB doesn't have any;
+7. (optional) Double-sided tape to fix USB socket on or inside the keyboard case.
+
+Pins of the Teensy board you should use by default:
+```
+Columns: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+Pins: C7 C6 C5 C4 C3 C2 C1 C0 E1 E0 D7 D6 D5 D4 D3 D2
+--------------------------------------------------------
+Rows: 1 2 3 4 5 6 7 8
+Pins: F7 F6 F5 F4 F3 F2 F1 F0
+--------------------------------------------------------
+Status LEDs: CapsLock +5V ScrollLock NumLock
+Pins: B6 5V B5 B4
+```
+
+Please note that some versions of Model M have LED connected with a ribbon cable, and not with separate wires.
+
+Keyboard Maintainer: [iw0rm3r](https://github.com/iw0rm3r)
+Hardware Supported: Teensy 2.0++ board by PJRC
+Hardware Availability: https://www.pjrc.com/store/teensypp.html
+
+Make example for this keyboard (after setting up your build environment):
+
+ make converter/modelm101:default:teensy
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk
new file mode 100644
index 00000000000..62052697151
--- /dev/null
+++ b/keyboards/converter/modelm101/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+MCU = at90usb1286
+#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
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = halfkay
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+#OPT_DEFS += -DBOOTLOADER_SIZE=1024
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/crkbd/info.json b/keyboards/crkbd/info.json
index 45a0255c1ac..d7f6309043b 100644
--- a/keyboards/crkbd/info.json
+++ b/keyboards/crkbd/info.json
@@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 15,
- "height": 4.5,
+ "height": 4.7,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c
index 1e2e57a2b45..5bb89d2594a 100644
--- a/keyboards/crkbd/keymaps/default/keymap.c
+++ b/keyboards/crkbd/keymaps/default/keymap.c
@@ -22,9 +22,9 @@ extern uint8_t is_master;
// 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 3
-#define _RAISE 4
-#define _ADJUST 16
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 3
enum custom_keycodes {
QWERTY = SAFE_RANGE,
@@ -246,4 +246,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
-
diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h
index cbc3feeb616..6f2665f3acb 100644
--- a/keyboards/crkbd/keymaps/drashna/config.h
+++ b/keyboards/crkbd/keymaps/drashna/config.h
@@ -27,7 +27,7 @@ along with this program. If not, see .
// #define MASTER_RIGHT
#define EE_HANDS
-#define SSD1306OLED
+// #define SSD1306OLED
#define USE_SERIAL_PD2
@@ -48,3 +48,12 @@ along with this program. If not, see .
#define B6_AUDIO
// #define NO_MUSIC_MODE
#endif
+
+#undef PRODUCT
+#define PRODUCT Drashna Hacked Corne Keyboard
+
+#define OLED_FONT_H "keyboards/crkbd/keymaps/drashna/glcdfont.c"
+// #define OLED_FONT_WIDTH 5
+// #define OLED_FONT_HEIGHT 7
+
+#define TAPPING_TERM_PER_KEY
diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c
new file mode 100644
index 00000000000..28521b42892
--- /dev/null
+++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c
@@ -0,0 +1,240 @@
+#pragma once
+
+#ifdef __AVR__
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else
+ #define PROGMEM
+#endif
+
+// Helidox 8x6 font with QMK Firmware Logo
+// Online editor: http://teripom.x0.com/
+
+const unsigned char font[] PROGMEM = {
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
+0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
+0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
+0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
+0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0,
+0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0,
+0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF,
+0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0,
+0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
+0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0,
+0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
+0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0,
+0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00,
+0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0,
+0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
+0x00, 0x00, 0x00, 0x00, 0x80, 0xC0,
+0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
+0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
+0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
+0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
+0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
+0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
+0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
+0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
+0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE,
+0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF,
+0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF,
+0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
+0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF,
+0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF,
+0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
+0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
+0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
+0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
+0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
+0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
+0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
+0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
+0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
+0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F,
+0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F,
+0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F,
+0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
+0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C,
+0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x03, 0x07, 0x07,
+0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x01, 0x03, 0x07, 0x07, 0x07, 0x07,
+0x07, 0x07, 0x07, 0x07, 0x03, 0x01,
+0x00, 0x00, 0x00, 0x07, 0x07, 0x07,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x07, 0x07, 0x07, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x07, 0x07,
+0x07, 0x00, 0x00, 0x00, 0x01, 0x03,
+0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
+0x07, 0x07, 0x03, 0x01, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c
index 91f0ebfa270..aaace9483aa 100644
--- a/keyboards/crkbd/keymaps/drashna/keymap.c
+++ b/keyboards/crkbd/keymaps/drashna/keymap.c
@@ -7,6 +7,9 @@
#ifdef SSD1306OLED
#include "ssd1306.h"
#endif
+#ifdef OLED_DRIVER_ENABLE
+ #include "oled_driver.h"
+#endif
extern keymap_config_t keymap_config;
extern uint8_t is_master;
@@ -288,3 +291,123 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
#endif
+
+
+#ifdef OLED_DRIVER_ENABLE
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ if (is_master) {
+ return OLED_ROTATION_270;
+ } else {
+ return rotation;
+ }
+}
+
+void render_crkbd_logo(void) {
+ static const char PROGMEM crkbd_logo[] = {
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
+ 0};
+ oled_write_P(crkbd_logo, false);
+}
+
+
+void render_status(void) {
+
+ oled_write_P(PSTR("Layer"), false);
+ switch (biton32(layer_state)) {
+ case 0:
+ oled_write_P(PSTR("Base "), false);
+ break;
+ case _RAISE:
+ oled_write_P(PSTR("Raise"), false);
+ break;
+ case _LOWER:
+ oled_write_P(PSTR("Lower"), false);
+ break;
+ case _ADJUST:
+ oled_write_P(PSTR("Adjst"), false);
+ break;
+ default:
+ oled_write_P(PSTR("Unkn "), false);
+ break;
+ }
+ oled_write_P(PSTR("Lyout"), false);
+ switch (biton32(default_layer_state)) {
+ case _QWERTY:
+ oled_write_P(PSTR("QWRTY"), false);
+ break;
+ case _COLEMAK:
+ oled_write_P(PSTR("COLMK"), false);
+ break;
+ case _DVORAK:
+ oled_write_P(PSTR("DVRAK"), false);
+ break;
+ case _WORKMAN:
+ oled_write_P(PSTR("WRKMN"), false);
+ break;
+ case _NORMAN:
+ oled_write_P(PSTR("NORMN"), false);
+ break;
+ case _MALTRON:
+ oled_write_P(PSTR("MLTRN"), false);
+ break;
+ case _EUCALYN:
+ oled_write_P(PSTR("ECLYN"), false);
+ break;
+ case _CARPLAX:
+ oled_write_P(PSTR("CRPLX"), false);
+ break;
+ }
+
+ uint8_t modifiers = get_mods();
+ uint8_t one_shot = get_oneshot_mods();
+
+ oled_write_P(PSTR("Mods:"), false);
+ oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
+ oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
+ oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
+ oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
+
+
+ oled_write_P(PSTR("BTMGK"), false);
+ static const char PROGMEM mode_logo[4][4] = {
+ {0x95,0x96,0x0a,0},
+ {0xb5,0xb6,0x0a,0},
+ {0x97,0x98,0x0a,0},
+ {0xb7,0xb8,0x0a,0} };
+
+ if (keymap_config.swap_lalt_lgui != false) {
+ oled_write_P(mode_logo[0], false);
+ oled_write_P(mode_logo[1], false);
+ } else {
+ oled_write_P(mode_logo[2], false);
+ oled_write_P(mode_logo[3], false);
+ }
+
+ uint8_t led_usb_state = host_keyboard_leds();
+ oled_write_P(PSTR("Lock:"), false);
+ oled_write_P(led_usb_state & (1<
#include "crkbd.h"
+// in the future, should use (1U<<_LAYER_NAME) instead, but needs to be moved to keymap,c
#define L_BASE 0
-#define L_LOWER 8
-#define L_RAISE 16
-#define L_ADJUST 65536
-#define L_ADJUST_TRI 65560
+#define L_LOWER 2
+#define L_RAISE 4
+#define L_ADJUST 8
+#define L_ADJUST_TRI 14
char layer_state_str[24];
diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h
index 55bf5930fd2..6564c8503d0 100644
--- a/keyboards/crkbd/rev1/config.h
+++ b/keyboards/crkbd/rev1/config.h
@@ -53,7 +53,14 @@ along with this program. If not, see .
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
+#ifdef RGBLIGHT_ENABLE
#define RGBLED_NUM 12 // Number of LEDs
+#endif
+
+#ifdef RGB_MATRIX_ENABLE
+#define RGBLED_NUM 54 // Number of LEDs
+#define DRIVER_LED_TOTAL RGBLED_NUM
+#endif
/*
* Feature disable options
diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c
index 6523feebade..0104adf1513 100644
--- a/keyboards/crkbd/rev1/rev1.c
+++ b/keyboards/crkbd/rev1/rev1.c
@@ -13,6 +13,119 @@ void led_set_kb(uint8_t usb_led) {
}
#endif
+#ifdef RGB_MATRIX_ENABLE
+
+ // Logical Layout
+ // Columns
+ // Left
+ // 0 1 2 3 4 5
+ // ROWS
+ // 25 24 19 18 11 10 0
+ // 03 02 01
+ // 26 23 20 17 12 09 1
+ // 04 05 06
+ // 27 22 21 16 13 08 2
+ //
+ // 15 14 07 3
+ //
+ // Right
+ // 0 1 2 3 4 5
+ // ROWS
+ // 25 24 19 18 11 10 4
+ // 03 02 01
+ // 26 23 20 17 12 09 5
+ // 04 05 06
+ // 27 22 21 16 13 08 6
+ //
+ // 15 14 07 7
+ //
+ // Physical Layout
+ // Columns
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ // ROWS
+ // 25 24 19 18 11 10 10 11 18 19 24 25 0
+ // 03 02 01 01 02 03
+ // 26 23 20 17 12 09 09 12 17 20 23 26 1
+ // 04 04
+ // 27 22 21 16 13 08 08 13 16 21 22 27 2
+ // 05 06 06 05
+ // 15 14 07 07 14 15 3
+
+/* {row | col << 4} logical layout rows/cols
+ * | {x=0..224, y=0..64} physical layout
+ * | | | modifier
+ * | | | */
+#define RGB_MATRIX_LEFT_LEDS \
+ { { 0xFF }, { 85, 16 }, 0 }, /* 1 */ \
+ { { 0xFF }, { 50, 13 }, 0 }, /* 2 */ \
+ { { 0xFF }, { 16, 20 }, 0 }, /* 3 */ \
+ { { 0xFF }, { 16, 38 }, 0 }, /* 4 */ \
+ { { 0xFF }, { 50, 48 }, 0 }, /* 5 */ \
+ { { 0xFF }, { 85, 52 }, 0 }, /* 6 */ \
+ { { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \
+ { { 2 | ( 5 << 4 ) }, { 85, 39 }, 0 }, /* 8 */ \
+ { { 1 | ( 5 << 4 ) }, { 85, 21 }, 0 }, /* 9 */ \
+ { { 0 | ( 5 << 4 ) }, { 85, 4 }, 0 }, /* 10 */ \
+ { { 0 | ( 4 << 4 ) }, { 68, 02 }, 0 }, /* 11 */ \
+ { { 1 | ( 4 << 4 ) }, { 68, 19 }, 0 }, /* 12 */ \
+ { { 2 | ( 4 << 4 ) }, { 68, 37 }, 0 }, /* 13 */ \
+ { { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \
+ { { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \
+ { { 2 | ( 3 << 4 ) }, { 50, 35 }, 0 }, /* 16 */ \
+ { { 1 | ( 3 << 4 ) }, { 50, 13 }, 0 }, /* 17 */ \
+ { { 0 | ( 3 << 4 ) }, { 50, 0 }, 0 }, /* 18 */ \
+ { { 0 | ( 2 << 4 ) }, { 33, 3 }, 0 }, /* 19 */ \
+ { { 1 | ( 2 << 4 ) }, { 33, 20 }, 0 }, /* 20 */ \
+ { { 2 | ( 2 << 4 ) }, { 33, 37 }, 0 }, /* 21 */ \
+ { { 2 | ( 1 << 4 ) }, { 16, 42 }, 0 }, /* 22 */ \
+ { { 1 | ( 1 << 4 ) }, { 16, 24 }, 0 }, /* 23 */ \
+ { { 0 | ( 1 << 4 ) }, { 16, 7 }, 0 }, /* 24 */ \
+ { { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \
+ { { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \
+ { { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */
+
+#define RGB_MATRIX_RIGHT_LEDS \
+ { { 0xFF }, { 139, 16 }, 0 }, /* 1 */ \
+ { { 0xFF }, { 174, 13 }, 0 }, /* 2 */ \
+ { { 0xFF }, { 208, 20 }, 0 }, /* 3 */ \
+ { { 0xFF }, { 208, 38 }, 0 }, /* 4 */ \
+ { { 0xFF }, { 174, 48 }, 0 }, /* 5 */ \
+ { { 0xFF }, { 139, 52 }, 0 }, /* 6 */ \
+ { { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \
+ { { 6 | ( 5 << 4 ) }, { 139, 39 }, 0 }, /* 8 */ \
+ { { 5 | ( 5 << 4 ) }, { 139, 21 }, 0 }, /* 9 */ \
+ { { 4 | ( 5 << 4 ) }, { 139, 4 }, 0 }, /* 10 */ \
+ { { 4 | ( 4 << 4 ) }, { 156, 02 }, 0 }, /* 11 */ \
+ { { 5 | ( 4 << 4 ) }, { 156, 19 }, 0 }, /* 12 */ \
+ { { 6 | ( 4 << 4 ) }, { 156, 37 }, 0 }, /* 13 */ \
+ { { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \
+ { { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \
+ { { 6 | ( 3 << 4 ) }, { 174, 35 }, 0 }, /* 16 */ \
+ { { 5 | ( 3 << 4 ) }, { 174, 13 }, 0 }, /* 17 */ \
+ { { 4 | ( 3 << 4 ) }, { 174, 0 }, 0 }, /* 18 */ \
+ { { 4 | ( 2 << 4 ) }, { 191, 3 }, 0 }, /* 19 */ \
+ { { 5 | ( 2 << 4 ) }, { 191, 20 }, 0 }, /* 20 */ \
+ { { 6 | ( 2 << 4 ) }, { 191, 37 }, 0 }, /* 21 */ \
+ { { 6 | ( 1 << 4 ) }, { 208, 42 }, 0 }, /* 22 */ \
+ { { 5 | ( 1 << 4 ) }, { 208, 24 }, 0 }, /* 23 */ \
+ { { 4 | ( 1 << 4 ) }, { 208, 7 }, 0 }, /* 24 */ \
+ { { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \
+ { { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \
+ { { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */
+
+#ifdef RGB_MATRIX_SPLIT_RIGHT
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ RGB_MATRIX_RIGHT_LEDS
+ RGB_MATRIX_LEFT_LEDS
+ };
+#else
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ RGB_MATRIX_LEFT_LEDS
+ RGB_MATRIX_RIGHT_LEDS
+ };
+#endif
+
+#endif
void matrix_init_kb(void) {
#ifdef AUDIO_ENABLE
diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk
index 6028b5a5b95..f12849f989d 100644
--- a/keyboards/crkbd/rev1/rules.mk
+++ b/keyboards/crkbd/rev1/rules.mk
@@ -1,3 +1,9 @@
+RGB_MATRIX_SPLIT_RIGHT = no # if no, order LEDs for left hand, if yes, order LEDs for right hand
+
+ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes)
+ OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT
+endif
+
SRC += rev1/matrix.c
SRC += rev1/split_util.c
SRC += rev1/split_scomm.c
diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c
new file mode 100644
index 00000000000..7831a91f523
--- /dev/null
+++ b/keyboards/donutcables/budget96/budget96.c
@@ -0,0 +1,80 @@
+/* Copyright 2019 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 .
+ */
+#include "budget96.h"
+
+#ifdef BACKLIGHT_ENABLE
+#include "backlight.h"
+#endif
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.h"
+#endif
+
+#include
+
+#include "action_layer.h"
+#include "i2c_master.h"
+#include "quantum.h"
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ }
+ }
+
+ i2c_init();
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+}
+#endif
+
+void backlight_init_ports(void) {
+ // initialize pins D0, D1, D4 and D6 as output
+ setPinOutput(D0);
+ setPinOutput(D1);
+ setPinOutput(D4);
+ setPinOutput(D6);
+
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+}
+
+ void backlight_set(uint8_t level) {
+ if (level == 0) {
+ // turn RGB LEDs off
+ writePinLow(D0);
+ writePinLow(D1);
+ writePinLow(D4);
+ writePinLow(D6);
+ } else {
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+ }
+ }
diff --git a/keyboards/donutcables/budget96/budget96.h b/keyboards/donutcables/budget96/budget96.h
new file mode 100644
index 00000000000..561d0cbfa22
--- /dev/null
+++ b/keyboards/donutcables/budget96/budget96.h
@@ -0,0 +1,56 @@
+/* Copyright 2019 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_all( \
+ k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \
+ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k46, k47, k48, k49, \
+ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \
+ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k26, k27, k28, k29, \
+ k10, k03, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, k19, \
+ k00, k01, k02, k65, k75, k0A, k0B, k66, k67, k69, k06, k08, k09 \
+) \
+{ \
+ { k00, k01, k02, k03, KC_NO, KC_NO, k06, KC_NO, k08, k09, k0A, k0B, KC_NO, k0D, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, KC_NO, k1D, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
+ { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \
+ { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \
+ { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \
+}
+
+#define LAYOUT_96_ansi( \
+ k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \
+ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \
+ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \
+ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \
+ k10, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, \
+ k00, k01, k02, k65, k75, k0B, k66, k67, k69, k06, k08, k09 \
+) \
+{ \
+ { k00, k01, k02, KC_NO, KC_NO, KC_NO, k06, KC_NO, k08, k09, KC_NO, k0B, KC_NO, k0D, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, KC_NO, k1A, k1B, KC_NO, k1D, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \
+ { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \
+ { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \
+ { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \
+}
diff --git a/keyboards/ps2avrGB/config.h b/keyboards/donutcables/budget96/config.h
similarity index 68%
rename from keyboards/ps2avrGB/config.h
rename to keyboards/donutcables/budget96/config.h
index c0de5a2116b..74661d828cd 100644
--- a/keyboards/ps2avrGB/config.h
+++ b/keyboards/donutcables/budget96/config.h
@@ -15,24 +15,27 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
+
+#include "config_common.h"
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
-// TODO: share these strings with usbconfig.h
-// Edit usbconfig.h to change these.
-#define MANUFACTURER winkeyless.kr
-#define PRODUCT ps2avrGB
+#define MANUFACTURER DonutCables
+#define PRODUCT budget96
+
+#define RGBLED_NUM 16
-/* matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 15
-#define RGBLED_NUM 16
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
+#define UNUSED_PINS
+
+#define DIODE_DIRECTION COL2ROW
+#define DEBOUNCING_DELAY 5
+
+#define NO_BACKLIGHT_CLOCK
+#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
-
-#endif
diff --git a/keyboards/donutcables/budget96/info.json b/keyboards/donutcables/budget96/info.json
new file mode 100644
index 00000000000..40a942127f4
--- /dev/null
+++ b/keyboards/donutcables/budget96/info.json
@@ -0,0 +1,16 @@
+{
+ "keyboard_name": "budget96",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 19,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3, "w":1.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":18, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":5}]
+ },
+
+ "LAYOUT_96_ansi": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1, "w":2}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5, "w":1.5}, {"x":11.5, "y":5, "w":1.5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":4, "h":2}]
+ }
+ }
+}
diff --git a/keyboards/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/budget96/keymaps/default/config.h
similarity index 100%
rename from keyboards/scrabblepad/keymaps/default/config.h
rename to keyboards/donutcables/budget96/keymaps/default/config.h
diff --git a/keyboards/donutcables/budget96/keymaps/default/keymap.c b/keyboards/donutcables/budget96/keymaps/default/keymap.c
new file mode 100644
index 00000000000..dcb79780e08
--- /dev/null
+++ b/keyboards/donutcables/budget96/keymaps/default/keymap.c
@@ -0,0 +1,35 @@
+/* Copyright 2018 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_96_ansi(\
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_INS, KC_HOME, KC_PGUP, KC_PSLS, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGDN, KC_PSLS, KC_PAST, \
+ 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_P7, KC_P8, KC_P9, KC_PMNS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
+ 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_UP, KC_P1, KC_P2, KC_P3, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT, KC_PENT), \
+
+[1] = LAYOUT_96_ansi(\
+ RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), \
+};
+
diff --git a/keyboards/donutcables/budget96/keymaps/default/readme.md b/keyboards/donutcables/budget96/keymaps/default/readme.md
new file mode 100644
index 00000000000..acbac7b4e0b
--- /dev/null
+++ b/keyboards/donutcables/budget96/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for budget96
diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md
new file mode 100644
index 00000000000..70e4d3afba7
--- /dev/null
+++ b/keyboards/donutcables/budget96/readme.md
@@ -0,0 +1,44 @@
+# budget96
+
+96 key atmega32a keyboard.
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: Budget96 PCB
+Hardware Availability: [DonutCables](https://donutcables.com/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make donutcables/budget96:default
+
+Flashing
+
+**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard.
+
+ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
+
+Windows:
+1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
+2. Place your keyboard into reset.
+3. Press the `Find Device` button and ensure that your keyboard is found.
+4. Press the `Open .hex File` button and locate the `.hex` file you created.
+5. Press the `Flash Device` button and wait for the process to complete.
+
+macOS:
+1. Install homebrew by typing the following:
+ ```
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+ ```
+2. Install `crosspack-avr`.
+ ```
+ brew cask install crosspack-avr
+ ```
+3. Install the following packages:
+ ```
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+
+4. Place your keyboard into reset.
+5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/donutcables/budget96/rules.mk
similarity index 91%
rename from keyboards/ps2avrGB/rules.mk
rename to keyboards/donutcables/budget96/rules.mk
index 95d287f7f41..67697ac7333 100644
--- a/keyboards/ps2avrGB/rules.mk
+++ b/keyboards/donutcables/budget96/rules.mk
@@ -28,23 +28,22 @@ F_CPU = 12000000
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
-BOOTLOADER = atmel-dfu
+BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = full
-MOUSEKEY_ENABLE = no
+BOOTMAGIC_ENABLE = no
+MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
-BACKLIGHT_ENABLE = no
+BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/donutcables/budget96/usbconfig.h
similarity index 98%
rename from keyboards/ps2avrGB/usbconfig.h
rename to keyboards/donutcables/budget96/usbconfig.h
index d2d848fcdc8..223b69bb94c 100644
--- a/keyboards/ps2avrGB/usbconfig.h
+++ b/keyboards/donutcables/budget96/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -241,8 +240,8 @@ section at the end of this file).
#define USB_CFG_DEVICE_VERSION 0x00, 0x02
/* Version number of the device: Minor number first, then major number.
*/
-#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
-#define USB_CFG_VENDOR_NAME_LEN 13
+#define USB_CFG_VENDOR_NAME 'D', 'o', 'n', 'u', 't', 'C', 'a', 'b', 'l', 'e', 's'
+#define USB_CFG_VENDOR_NAME_LEN 11
/* These two values define the vendor name returned by the USB device. The name
* must be given as a list of characters under single quotes. The characters
* are interpreted as Unicode (UTF-16) entities.
@@ -251,7 +250,7 @@ section at the end of this file).
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
* details.
*/
-#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
+#define USB_CFG_DEVICE_NAME 'b', 'u', 'd', 'g', 'e', 't', '9', '6'
#define USB_CFG_DEVICE_NAME_LEN 8
/* Same as above for the device name. If you don't want a device name, undefine
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
@@ -393,4 +392,3 @@ section at the end of this file).
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/donutcables/readme.md b/keyboards/donutcables/readme.md
new file mode 100644
index 00000000000..d68b6a743cc
--- /dev/null
+++ b/keyboards/donutcables/readme.md
@@ -0,0 +1,12 @@
+# Donut Cables
+
+Donut Cables LLC is located in North Carolina, USA.
+
+Website: https://donutcables.com/
+
+**Contact Donut Cables at the following:**
+
+Email: contact@donutcables.com
+Reddit: /u/donutcat_cables
+Geekhack/DeskThority: donutcat
+Discord: @donutcat on the #mechkeys Discord
\ No newline at end of file
diff --git a/keyboards/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h
similarity index 98%
rename from keyboards/scrabblepad/config.h
rename to keyboards/donutcables/scrabblepad/config.h
index 8c23ccdabd4..bf3d3db72a8 100644
--- a/keyboards/scrabblepad/config.h
+++ b/keyboards/donutcables/scrabblepad/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -49,7 +48,7 @@ along with this program. If not, see .
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-// #define BACKLIGHT_PIN
+// #define BACKLIGHT_PIN
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
@@ -188,5 +187,3 @@ along with this program. If not, see .
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
-
-#endif
diff --git a/keyboards/scrabblepad/info.json b/keyboards/donutcables/scrabblepad/info.json
similarity index 100%
rename from keyboards/scrabblepad/info.json
rename to keyboards/donutcables/scrabblepad/info.json
diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/scrabblepad/keymaps/default/config.h
new file mode 100644
index 00000000000..a3ed4f762a6
--- /dev/null
+++ b/keyboards/donutcables/scrabblepad/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/scrabblepad/keymaps/default/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c
similarity index 100%
rename from keyboards/scrabblepad/keymaps/default/keymap.c
rename to keyboards/donutcables/scrabblepad/keymaps/default/keymap.c
diff --git a/keyboards/scrabblepad/keymaps/default/readme.md b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md
similarity index 100%
rename from keyboards/scrabblepad/keymaps/default/readme.md
rename to keyboards/donutcables/scrabblepad/keymaps/default/readme.md
diff --git a/keyboards/scrabblepad/keymaps/random/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c
similarity index 100%
rename from keyboards/scrabblepad/keymaps/random/keymap.c
rename to keyboards/donutcables/scrabblepad/keymaps/random/keymap.c
diff --git a/keyboards/scrabblepad/keymaps/random/readme.md b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md
similarity index 100%
rename from keyboards/scrabblepad/keymaps/random/readme.md
rename to keyboards/donutcables/scrabblepad/keymaps/random/readme.md
diff --git a/keyboards/scrabblepad/readme.md b/keyboards/donutcables/scrabblepad/readme.md
similarity index 67%
rename from keyboards/scrabblepad/readme.md
rename to keyboards/donutcables/scrabblepad/readme.md
index 0227b988fa8..f0b05cbcedf 100644
--- a/keyboards/scrabblepad/readme.md
+++ b/keyboards/donutcables/scrabblepad/readme.md
@@ -12,6 +12,6 @@ Hardware Availability: [Donut Cables](https://donutcables.com/)
Make example for this keyboard (after setting up your build environment):
- make scrabblepad:default
+ make donutcables/scrabblepad:default
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk
similarity index 100%
rename from keyboards/scrabblepad/rules.mk
rename to keyboards/donutcables/scrabblepad/rules.mk
diff --git a/keyboards/scrabblepad/scrabblepad.c b/keyboards/donutcables/scrabblepad/scrabblepad.c
similarity index 100%
rename from keyboards/scrabblepad/scrabblepad.c
rename to keyboards/donutcables/scrabblepad/scrabblepad.c
diff --git a/keyboards/scrabblepad/scrabblepad.h b/keyboards/donutcables/scrabblepad/scrabblepad.h
similarity index 98%
rename from keyboards/scrabblepad/scrabblepad.h
rename to keyboards/donutcables/scrabblepad/scrabblepad.h
index fbe0dfc7276..b4ac8b2c4f5 100644
--- a/keyboards/scrabblepad/scrabblepad.h
+++ b/keyboards/donutcables/scrabblepad/scrabblepad.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef SCRABBLEPAD_H
-#define SCRABBLEPAD_H
+#pragma once
#include "quantum.h"
@@ -53,5 +52,3 @@
{ kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, }, \
{ kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE } \
}
-
-#endif
diff --git a/keyboards/doro67/multi/config.h b/keyboards/doro67/multi/config.h
new file mode 100644
index 00000000000..4a15063cc26
--- /dev/null
+++ b/keyboards/doro67/multi/config.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xD070
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Backprop Studio
+#define PRODUCT Doro67 Multi PCB
+#define DESCRIPTION 65% custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 }
+
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN B7
+#define BACKLIGHT_LEVELS 7
diff --git a/keyboards/doro67/multi/info.json b/keyboards/doro67/multi/info.json
new file mode 100644
index 00000000000..03252140dd5
--- /dev/null
+++ b/keyboards/doro67/multi/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Doro67 Multi PCB",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_ansi": {
+ "layout": [{"label":"Esc", "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":"Ins", "x":15, "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":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"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}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "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":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}]
+ },
+ "LAYOUT_iso": {
+ "layout": [{"label":"Esc", "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":"Ins", "x":15, "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "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":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "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":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}]
+ },
+ "LAYOUT_multi": {
+ "layout": [{"label":"Esc", "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":"Back", "x":13, "y":0}, {"label":"F2", "x":14, "y":0}, {"label":"Ins", "x":15, "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":"Del", "x":15, "y":1}, {"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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"F1", "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":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"MO(1)", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/doro67/multi/keymaps/default/keymap.c b/keyboards/doro67/multi/keymaps/default/keymap.c
new file mode 100644
index 00000000000..dd40a6c3faa
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2019 ShadeDream
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ansi(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
+ KC_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_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_ansi(
+ 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_TRNS,
+ BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+};
diff --git a/keyboards/doro67/multi/keymaps/default/readme.md b/keyboards/doro67/multi/keymaps/default/readme.md
new file mode 100644
index 00000000000..6e63cde3a16
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default/readme.md
@@ -0,0 +1,36 @@
+# Default Doro67 ANSI layout.
+
+This is the default ANSI layout that comes flashed on the Doro67 multi PCB with
+the exception of adding backtick as it was not mapped.
+
+Default Layer:
+
+```
+,---------------------------------------------------------------.
+|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins|
+|---------------------------------------------------------------|
+|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del|
+|---------------------------------------------------------------|
+|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp|
+|---------------------------------------------------------------|
+|Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn|
+|---------------------------------------------------------------|
+|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt|
+`---------------------------------------------------------------'
+```
+
+FN Layer:
+
+```
+,---------------------------------------------------------------.
+|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
+|---------------------------------------------------------------|
+|BLTog|Stp|Dec|Inc| | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | |
+`---------------------------------------------------------------'
+```
diff --git a/keyboards/doro67/multi/keymaps/default_iso/keymap.c b/keyboards/doro67/multi/keymaps/default_iso/keymap.c
new file mode 100644
index 00000000000..2e8d8398204
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_iso/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2019 ShadeDream
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_iso(
+ 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_INS,
+ 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_DEL,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_PGUP,
+ 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_LSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_iso(
+ 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_TRNS,
+ BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+};
diff --git a/keyboards/doro67/multi/keymaps/default_iso/readme.md b/keyboards/doro67/multi/keymaps/default_iso/readme.md
new file mode 100644
index 00000000000..d375f0cc5d2
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_iso/readme.md
@@ -0,0 +1,36 @@
+# Default Doro67 ISO layout.
+
+This is the default ISO layout that comes flashed on the Doro67 multi PCB with
+the exception of adding backtick and UK ISO specific keycodes as they were not mapped.
+
+Default Layer:
+
+```
+,---------------------------------------------------------------.
+|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins|
+|---------------------------------------------------------------|
+|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del|
+|------------------------------------------------------|Entr|---|
+|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| #| |PUp|
+|---------------------------------------------------------------|
+|Shft| \| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn|
+|---------------------------------------------------------------|
+|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt|
+`---------------------------------------------------------------'
+```
+
+FN Layer:
+
+```
+,---------------------------------------------------------------.
+|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
+|---------------------------------------------------------------|
+|BLTog|Stp|Dec|Inc| | | | | | | | | | | |
+|------------------------------------------------------| |---|
+| | | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | |
+`---------------------------------------------------------------'
+```
diff --git a/keyboards/doro67/multi/keymaps/default_multi/keymap.c b/keyboards/doro67/multi/keymaps/default_multi/keymap.c
new file mode 100644
index 00000000000..e57dce1ea2b
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_multi/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2019 ShadeDream
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_multi(
+ 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_F2, KC_INS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
+ KC_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_PGUP,
+ KC_LSFT, KC_F1, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_multi(
+ 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_TRNS, KC_TRNS,
+ BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+};
diff --git a/keyboards/doro67/multi/keymaps/default_multi/readme.md b/keyboards/doro67/multi/keymaps/default_multi/readme.md
new file mode 100644
index 00000000000..e32f820c289
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_multi/readme.md
@@ -0,0 +1,39 @@
+# Default Doro67 Multi layout.
+
+This is the default Multi layout that comes flashed on the Doro67 multi PCB with
+the exception of adding backtick as it was not mapped.
+
+This layout supports both the blocker and non-blocker layouts (2 & 4) with the
+difference that the blocker layout lacks the right control key.
+
+Default Layer:
+
+```
+,---------------------------------------------------------------.
+|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS| F2|Ins|
+|---------------------------------------------------------------|
+|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del|
+|---------------------------------------------------------------|
+|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp|
+|---------------------------------------------------------------|
+|Shft| F1| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn|
+|---------------------------------------------------------------|
+|Ctrl |GUI |Alt | Space |Space| Space |Alt|MO1|Ctl|Lft|Dwn|Rgt|
+`---------------------------------------------------------------'
+```
+
+FN Layer:
+
+```
+,---------------------------------------------------------------.
+|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
+|---------------------------------------------------------------|
+|BLTog|Stp|Dec|Inc| | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | |
+`---------------------------------------------------------------'
+```
diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c
new file mode 100644
index 00000000000..477ab245c34
--- /dev/null
+++ b/keyboards/doro67/multi/multi.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 ShadeDream
+ *
+ * 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 .
+ */
+#include "multi.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);
+}
diff --git a/keyboards/doro67/multi/multi.h b/keyboards/doro67/multi/multi.h
new file mode 100644
index 00000000000..0b68aed4260
--- /dev/null
+++ b/keyboards/doro67/multi/multi.h
@@ -0,0 +1,59 @@
+/* Copyright 2019 ShadeDream
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \
+}
+
+#define LAYOUT_iso( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \
+}
+
+#define LAYOUT_multi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K48, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K43, K44, K45, K49, K4A, K4B, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \
+}
diff --git a/keyboards/doro67/multi/readme.md b/keyboards/doro67/multi/readme.md
new file mode 100644
index 00000000000..40fd53ee11a
--- /dev/null
+++ b/keyboards/doro67/multi/readme.md
@@ -0,0 +1,13 @@
+# Doro67 Multi PCB
+
+65% custom keyboard made by 80ultraman/Alf/Backprop Studios with multiple layout support. Despite the layout options available, layout is dictated by the selected integrated plate.
+
+Keyboard Maintainer: [ShadeDream](https://github.com/shadedream)
+Hardware Supported: Doro67 Multi PCB
+Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make doro67/multi:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk
new file mode 100644
index 00000000000..387ce74822c
--- /dev/null
+++ b/keyboards/doro67/multi/rules.mk
@@ -0,0 +1,47 @@
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/doro67/readme.md b/keyboards/doro67/readme.md
index e69de29bb2d..1648fbde577 100644
--- a/keyboards/doro67/readme.md
+++ b/keyboards/doro67/readme.md
@@ -0,0 +1,12 @@
+# Doro67
+
+The Doro67 is a 65% USB C, integrated plate keyboard with blocker based on the M65-a by Keyclack/Rama.
+
+The [Group Buy](https://geekhack.org/index.php?topic=97265.0) was run by 80ultraman in coordination with Alf for machining and Backprop Studios for PCB design.
+
+There were 3 different PCBs available for this group buy.
+## **Please be aware of which PCB you own and flash the correct firmware on it.**
+
+**Regular:** PCB made for the China GB which only had 1 layout.
+**Multi:** PCB made for the international GB comprising of multiple layouts. While several layouts were possible, layout was determined by the integrated plate layout chosen by the customer.
+**RGB:** PCB made for the international GB which had an identical switch matrix and layout to the regular PCB, with the addition of per key RGB LEDs.
\ No newline at end of file
diff --git a/keyboards/doro67/regular/config.h b/keyboards/doro67/regular/config.h
index 9ba591cdd94..8c5c670da92 100644
--- a/keyboards/doro67/regular/config.h
+++ b/keyboards/doro67/regular/config.h
@@ -6,8 +6,8 @@
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
-#define MANUFACTURER 80ultraman
-#define PRODUCT doro67
+#define MANUFACTURER Backprop Studio
+#define PRODUCT Doro67 Regular PCB
#define DESCRIPTION 65% custom keyboard
/* key matrix size */
diff --git a/keyboards/doro67/regular/readme.md b/keyboards/doro67/regular/readme.md
index 71d27ceb527..7635a40f95e 100644
--- a/keyboards/doro67/regular/readme.md
+++ b/keyboards/doro67/regular/readme.md
@@ -1,8 +1,8 @@
-# Regular PCB for the Doro67
+# Doro67 Regular PCB
-Regular PCB for the Doro67 having ONLY one layout. This is not the PCB with RGB support.
+65% custom keyboard made by 80ultraman/Alf/Backprop Studios available during the China Group Buy.
-Do not flash RGB firmware for this board.
+This is not the PCB with RGB support. Do not flash RGB firmware for this board.
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Doro67 Regular PCB
diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h
new file mode 100644
index 00000000000..87a30e08472
--- /dev/null
+++ b/keyboards/doro67/rgb/config.h
@@ -0,0 +1,71 @@
+/*
+Copyright 2019 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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Backprop Studio
+#define PRODUCT Doro67 RGB PCB
+#define DESCRIPTION 65% custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+// The pin connected to the data pin of the LEDs
+#define RGB_DI_PIN B7
+// The number of LEDs connected
+#define DRIVER_LED_TOTAL 67
+
+#define RGB_MATRIX_KEYPRESSES
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define RGBLED_NUM 67
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/doro67/rgb/info.json b/keyboards/doro67/rgb/info.json
new file mode 100644
index 00000000000..2d9b79a23e1
--- /dev/null
+++ b/keyboards/doro67/rgb/info.json
@@ -0,0 +1,82 @@
+{
+ "keyboard_name": "Doro 67 RGB",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 67,
+ "layout": [
+ {"label":"K00", "x":0, "y":0},
+ {"label":"K01", "x":1, "y":0},
+ {"label":"K02", "x":2, "y":0},
+ {"label":"K03", "x":3, "y":0},
+ {"label":"K04", "x":4, "y":0},
+ {"label":"K05", "x":5, "y":0},
+ {"label":"K06", "x":6, "y":0},
+ {"label":"K07", "x":7, "y":0},
+ {"label":"K08", "x":8, "y":0},
+ {"label":"K09", "x":9, "y":0},
+ {"label":"K0A", "x":10, "y":0},
+ {"label":"K0B", "x":11, "y":0},
+ {"label":"K0C", "x":12, "y":0},
+ {"label":"K0D", "x":13, "y":0, "w":2},
+ {"label":"K0E", "x":15, "y":0},
+ {"label":"K10", "x":0, "y":1, "w":1.5},
+ {"label":"K11", "x":1.5, "y":1},
+ {"label":"K12", "x":2.5, "y":1},
+ {"label":"K13", "x":3.5, "y":1},
+ {"label":"K14", "x":4.5, "y":1},
+ {"label":"K15", "x":5.5, "y":1},
+ {"label":"K16", "x":6.5, "y":1},
+ {"label":"K17", "x":7.5, "y":1},
+ {"label":"K18", "x":8.5, "y":1},
+ {"label":"K19", "x":9.5, "y":1},
+ {"label":"K1A", "x":10.5, "y":1},
+ {"label":"K1B", "x":11.5, "y":1},
+ {"label":"K1C", "x":12.5, "y":1},
+ {"label":"K1D", "x":13.5, "y":1, "w":1.5},
+ {"label":"K1E", "x":15, "y":1},
+ {"label":"K20", "x":0, "y":2, "w":1.75},
+ {"label":"K21", "x":1.75, "y":2},
+ {"label":"K22", "x":2.75, "y":2},
+ {"label":"K23", "x":3.75, "y":2},
+ {"label":"K24", "x":4.75, "y":2},
+ {"label":"K25", "x":5.75, "y":2},
+ {"label":"K26", "x":6.75, "y":2},
+ {"label":"K27", "x":7.75, "y":2},
+ {"label":"K28", "x":8.75, "y":2},
+ {"label":"K29", "x":9.75, "y":2},
+ {"label":"K2A", "x":10.75, "y":2},
+ {"label":"K2B", "x":11.75, "y":2},
+ {"label":"K2D", "x":12.75, "y":2, "w":2.25},
+ {"label":"K2E", "x":15, "y":2},
+ {"label":"K30", "x":0, "y":3, "w":2.25},
+ {"label":"K32", "x":2.25, "y":3},
+ {"label":"K33", "x":3.25, "y":3},
+ {"label":"K34", "x":4.25, "y":3},
+ {"label":"K35", "x":5.25, "y":3},
+ {"label":"K36", "x":6.25, "y":3},
+ {"label":"K37", "x":7.25, "y":3},
+ {"label":"K38", "x":8.25, "y":3},
+ {"label":"K39", "x":9.25, "y":3},
+ {"label":"K3A", "x":10.25, "y":3},
+ {"label":"K3B", "x":11.25, "y":3},
+ {"label":"K3C", "x":12.25, "y":3, "w":1.75},
+ {"label":"K3D", "x":14, "y":3},
+ {"label":"K3E", "x":15, "y":3},
+ {"label":"K40", "x":0, "y":4, "w":1.25},
+ {"label":"K41", "x":1.25, "y":4, "w":1.25},
+ {"label":"K42", "x":2.5, "y":4, "w":1.25},
+ {"label":"K43", "x":3.75, "y":4, "w":6.25},
+ {"label":"K49", "x":10, "y":4, "w":1.25},
+ {"label":"K4A", "x":11.25, "y":4, "w":1.25},
+ {"label":"K4C", "x":13, "y":4},
+ {"label":"K4D", "x":14, "y":4},
+ {"label":"K4E", "x":15, "y":4}
+ ]
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/keyboards/doro67/rgb/keymaps/default/config.h b/keyboards/doro67/rgb/keymaps/default/config.h
new file mode 100644
index 00000000000..26c6d6ade10
--- /dev/null
+++ b/keyboards/doro67/rgb/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/doro67/rgb/keymaps/default/keymap.c b/keyboards/doro67/rgb/keymaps/default/keymap.c
new file mode 100644
index 00000000000..d02665ae768
--- /dev/null
+++ b/keyboards/doro67/rgb/keymaps/default/keymap.c
@@ -0,0 +1,62 @@
+/* Copyright 2019 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 .
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( \
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \
+ KC_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_PGUP, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ [1] = 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_TRNS, \
+ QMKBEST, QMKURL, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/doro67/rgb/keymaps/default/readme.md b/keyboards/doro67/rgb/keymaps/default/readme.md
new file mode 100644
index 00000000000..4ba5eb30fde
--- /dev/null
+++ b/keyboards/doro67/rgb/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for rgb
diff --git a/keyboards/doro67/rgb/readme.md b/keyboards/doro67/rgb/readme.md
new file mode 100644
index 00000000000..3a527c933c5
--- /dev/null
+++ b/keyboards/doro67/rgb/readme.md
@@ -0,0 +1,17 @@
+# Doro67 RGB PCB
+
+65% custom keyboard made by 80ultraman/Alf/Backprop Studios with in switch RGB featuring the same switch matrix and layout as the regular PCB.
+
+Flashing the regular PCB firmware on this board will work, but will disable RGB lighting.
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: Doro 67 RGB PCB
+Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make doro67/rgb:default
+
+**RGB Note:** The WS2812 string of LEDs starts from the `K00` key connected to pin `B7` and is connected from left to right, top to bottom, following the physical layout of the board.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/doro67/rgb/rgb.c b/keyboards/doro67/rgb/rgb.c
new file mode 100644
index 00000000000..6f39e00c615
--- /dev/null
+++ b/keyboards/doro67/rgb/rgb.c
@@ -0,0 +1,127 @@
+/* Copyright 2019 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 .
+ */
+#include "rgb.h"
+
+// Optional override functions below.
+// You can leave any or all of these undefined.
+// These are only required if you want to perform custom actions.
+
+
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ setPinOutput(E6);
+ 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
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ writePinLow(E6);
+ } else {
+ writePinHigh(E6);
+ }
+ led_set_user(usb_led);
+}
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ {{0|(0<<4)}, {15*0, 0}, 0}, // Esc
+ {{0|(1<<4)}, {15*1, 0}, 0}, // 1
+ {{0|(2<<4)}, {15*2, 0}, 0}, // 2
+ {{0|(3<<4)}, {15*3, 0}, 0}, // 3
+ {{0|(4<<4)}, {15*4, 0}, 0}, // 4
+ {{0|(5<<4)}, {15*5, 0}, 0}, // 5
+ {{0|(6<<4)}, {15*6, 0}, 0}, // 6
+ {{0|(7<<4)}, {15*7, 0}, 0}, // 7
+ {{0|(8<<4)}, {15*8, 0}, 0}, // 8
+ {{0|(9<<4)}, {15*9, 0}, 0}, // 9
+ {{0|(10<<4)}, {15*10, 0}, 0}, // 0
+ {{0|(11<<4)}, {15*11, 0}, 0}, // -
+ {{0|(12<<4)}, {15*12, 0}, 0}, // =
+ {{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace
+ {{0|(14<<4)}, {15*15, 0}, 1}, // Ins
+
+ {{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab
+ {{1|(1<<4)}, {15*1.5, 16}, 0}, // Q
+ {{1|(2<<4)}, {15*2.5, 16}, 0}, // W
+ {{1|(3<<4)}, {15*3.5, 16}, 0}, // E
+ {{1|(4<<4)}, {15*4.5, 16}, 0}, // R
+ {{1|(5<<4)}, {15*5.5, 16}, 0}, // T
+ {{1|(6<<4)}, {15*6.5, 16}, 0}, // Y
+ {{1|(7<<4)}, {15*7.5, 16}, 0}, // U
+ {{1|(8<<4)}, {15*8.5, 16}, 0}, // I
+ {{1|(9<<4)}, {15*9.5, 16}, 0}, // O
+ {{1|(10<<4)}, {15*10.5, 16}, 0}, // P
+ {{1|(11<<4)}, {15*11.5, 16}, 0}, // [
+ {{1|(12<<4)}, {15*12.5, 16}, 0}, // ]
+ {{1|(13<<4)}, {15*13.75, 16}, 1}, //
+ {{1|(14<<4)}, {15*15, 16}, 1}, // Del
+
+ {{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock
+ {{2|(1<<4)}, {15*1.75, 32}, 0}, // A
+ {{2|(2<<4)}, {15*2.75, 32}, 0}, // S
+ {{2|(3<<4)}, {15*3.75, 32}, 0}, // D
+ {{2|(4<<4)}, {15*4.75, 32}, 0}, // F
+ {{2|(5<<4)}, {15*5.75, 32}, 0}, // G
+ {{2|(6<<4)}, {15*6.75, 32}, 0}, // H
+ {{2|(7<<4)}, {15*7.75, 32}, 0}, // J
+ {{2|(8<<4)}, {15*8.75, 32}, 0}, // K
+ {{2|(9<<4)}, {15*9.75, 32}, 0}, // L
+ {{2|(10<<4)}, {15*10.75, 32}, 0}, // ;
+ {{2|(11<<4)}, {15*11.75, 32}, 0}, // '
+ {{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter
+ {{2|(14<<4)}, {15*15, 32}, 1}, // Pgup
+
+ {{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift
+ {{3|(2<<4)}, {15*2, 48}, 0}, // Z
+ {{3|(3<<4)}, {15*3, 48}, 0}, // X
+ {{3|(4<<4)}, {15*4, 48}, 0}, // C
+ {{3|(5<<4)}, {15*5, 48}, 0}, // V
+ {{3|(6<<4)}, {15*6, 48}, 0}, // B
+ {{3|(7<<4)}, {15*7, 48}, 0}, // N
+ {{3|(8<<4)}, {15*8, 48}, 0}, // M
+ {{3|(9<<4)}, {15*9, 48}, 0}, // ,
+ {{3|(10<<4)}, {15*10, 48}, 0}, // .
+ {{3|(11<<4)}, {15*11, 48}, 0}, // /
+ {{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift
+ {{3|(13<<4)}, {15*14, 48}, 1}, // Up
+ {{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn
+
+ {{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl
+ {{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI
+ {{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt
+ {{4|(3<<4)}, {15*6.75, 64}, 0}, // Space
+ {{4|(9<<4)}, {15*9, 64}, 1}, // RAlt
+ {{4|(10<<4)}, {15*10.25, 64}, 1}, // FN
+ {{4|(12<<4)}, {15*13, 64}, 1}, // Left
+ {{4|(13<<4)}, {15*14, 64}, 1}, // Down
+ {{4|(14<<4)}, {15*15, 64}, 1}, // Right
+};
diff --git a/keyboards/doro67/rgb/rgb.h b/keyboards/doro67/rgb/rgb.h
new file mode 100644
index 00000000000..aafba11d0e6
--- /dev/null
+++ b/keyboards/doro67/rgb/rgb.h
@@ -0,0 +1,41 @@
+/* Copyright 2019 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \
+ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \
+ k40, k41, k42, k43, k49, k4A, k4C, k4D, k4E \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \
+ { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
+ { k40, k41, k42, k43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \
+}
diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk
new file mode 100644
index 00000000000..6438868dc03
--- /dev/null
+++ b/keyboards/doro67/rgb/rules.mk
@@ -0,0 +1,83 @@
+# MCU name
+#MCU = at90usb1286
+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
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+RGB_MATRIX_ENABLE = WS2812
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/duck/duck_led/duck_led.c b/keyboards/duck/duck_led/duck_led.c
new file mode 100644
index 00000000000..2fa920e4b61
--- /dev/null
+++ b/keyboards/duck/duck_led/duck_led.c
@@ -0,0 +1,7 @@
+#include
+#include "duck_led.h"
+#include "quantum.h"
+
+void show(void) {
+ wait_us((RES / 1000UL) + 1);
+}
diff --git a/keyboards/duck/duck_led/duck_led.h b/keyboards/duck/duck_led/duck_led.h
new file mode 100644
index 00000000000..2546366d0c5
--- /dev/null
+++ b/keyboards/duck/duck_led/duck_led.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#define RES 6000
+
+#define NS_PER_SEC (1000000000L)
+#define CYCLES_PER_SEC (F_CPU)
+#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
+#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+
+enum Device {
+ Device_PCBRGB,
+ Device_STATUSLED
+};
+
+void show(void);
+
diff --git a/keyboards/duck/eagle_viper/readme.md b/keyboards/duck/eagle_viper/readme.md
index 14fb1666983..3fec11bc0a8 100644
--- a/keyboards/duck/eagle_viper/readme.md
+++ b/keyboards/duck/eagle_viper/readme.md
@@ -9,4 +9,3 @@ Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127)
Make example for this keyboard (after setting up your build environment):
make duck/eagle_viper/v2:default
-
diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h
index f454b2e0e1d..a0ce866cc35 100644
--- a/keyboards/duck/eagle_viper/v2/config.h
+++ b/keyboards/duck/eagle_viper/v2/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,9 @@ along with this program. If not, see .
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 4
+#define BOOTMAGIC_LITE_COLUMN 10
+
#define TAPPING_TERM 200
-#endif
diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.c b/keyboards/duck/eagle_viper/v2/indicator_leds.c
index 03a93197da6..fc90ed3fbda 100644
--- a/keyboards/duck/eagle_viper/v2/indicator_leds.c
+++ b/keyboards/duck/eagle_viper/v2/indicator_leds.c
@@ -19,19 +19,13 @@ along with this program. If not, see .
#include
#include
#include "indicator_leds.h"
-
-#define RES 6000
+#include "duck_led/duck_led.h"
#define LED_T1H 600
#define LED_T1L 650
#define LED_T0H 250
#define LED_T0L 1000
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
-
void send_bit_d4(bool bitVal) {
if(bitVal) {
asm volatile (
@@ -66,14 +60,12 @@ void send_bit_d4(bool bitVal) {
}
}
-void show(void) {
- _delay_us((RES / 1000UL) + 1);
-}
-
-void send_value(uint8_t byte) {
+void send_value(uint8_t byte, enum Device device) {
for(uint8_t b = 0; b < 8; b++) {
- send_bit_d4(byte & 0b10000000);
- byte <<= 1;
+ if(device == Device_STATUSLED) {
+ send_bit_d4(byte & 0b10000000);
+ byte <<= 1;
+ }
}
}
@@ -83,7 +75,8 @@ void indicator_leds_set(bool leds[8]) {
cli();
for(led_cnt = 0; led_cnt < 8; led_cnt++)
- send_value(leds[led_cnt] ? 255 : 0);
+ send_value(leds[led_cnt] ? 255 : 0, Device_STATUSLED);
sei();
show();
}
+
diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.h b/keyboards/duck/eagle_viper/v2/indicator_leds.h
index c174fa404da..fe66eef6b2f 100644
--- a/keyboards/duck/eagle_viper/v2/indicator_leds.h
+++ b/keyboards/duck/eagle_viper/v2/indicator_leds.h
@@ -1,2 +1 @@
void indicator_leds_set(bool leds[8]);
-void show(void);
diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c
index 7003a7ae00d..a6bc5634225 100644
--- a/keyboards/duck/eagle_viper/v2/matrix.c
+++ b/keyboards/duck/eagle_viper/v2/matrix.c
@@ -89,6 +89,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<
.
*/
-#ifndef V2_H
-#define V2_H
+#pragma once
#include "quantum.h"
@@ -78,4 +77,3 @@
#define LAYOUT_eagle LAYOUT_60_ansi
-#endif
diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h
index 4bc535b1926..774e2849183 100644
--- a/keyboards/duck/jetfire/config.h
+++ b/keyboards/duck/jetfire/config.h
@@ -48,6 +48,10 @@ along with this program. If not, see .
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
+
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
diff --git a/keyboards/duck/jetfire/backlight_led.c b/keyboards/duck/jetfire/indicator_leds.c
similarity index 76%
rename from keyboards/duck/jetfire/backlight_led.c
rename to keyboards/duck/jetfire/indicator_leds.c
index 7e9dca6e9f1..7dbdb1ff79b 100644
--- a/keyboards/duck/jetfire/backlight_led.c
+++ b/keyboards/duck/jetfire/indicator_leds.c
@@ -17,21 +17,13 @@ along with this program. If not, see .
#include
#include
#include
-#include "backlight_led.h"
+#include "indicator_leds.h"
#include "quantum.h"
-// #include "led.h"
-
-#define T1H 900
-#define T1L 600
-#define T0H 400
-#define T0L 900
-#define RES 6000
-
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+#define LED_T1H 900
+#define LED_T1L 600
+#define LED_T0H 400
+#define LED_T0L 900
void send_bit_d4(bool bitVal)
{
@@ -48,8 +40,8 @@ void send_bit_d4(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -63,8 +55,8 @@ void send_bit_d4(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
@@ -83,8 +75,8 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -98,20 +90,15 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
-void show(void)
-{
- _delay_us((RES / 1000UL) + 1);
-}
-
void send_value(uint8_t byte, enum Device device)
{
for(uint8_t b = 0; b < 8; b++) {
- if(device == Device_STATELED) {
+ if(device == Device_STATUSLED) {
send_bit_d4(byte & 0b10000000);
}
if(device == Device_PCBRGB) {
@@ -123,7 +110,7 @@ void send_value(uint8_t byte, enum Device device)
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device)
{
- send_value(g, device);
send_value(r, device);
+ send_value(g, device);
send_value(b, device);
}
diff --git a/keyboards/duck/jetfire/backlight_led.h b/keyboards/duck/jetfire/indicator_leds.h
similarity index 70%
rename from keyboards/duck/jetfire/backlight_led.h
rename to keyboards/duck/jetfire/indicator_leds.h
index 36d8d9aa9b3..695e1db6d41 100644
--- a/keyboards/duck/jetfire/backlight_led.h
+++ b/keyboards/duck/jetfire/indicator_leds.h
@@ -1,10 +1,6 @@
-#ifndef BACKLIGHT_LED_H
-#define BACKLIGHT_LED_H
+#pragma once
-enum Device {
- Device_PCBRGB,
- Device_STATELED
-};
+#include "duck_led/duck_led.h"
void backlight_init_ports(void);
void backlight_set_state(bool cfg[7]);
@@ -13,6 +9,3 @@ void backlight_toggle_rgb(bool enabled);
void backlight_set_rgb(uint8_t cfg[17][3]);
void backlight_set(uint8_t level);
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device);
-void show(void);
-
-#endif
diff --git a/keyboards/duck/jetfire/jetfire.c b/keyboards/duck/jetfire/jetfire.c
index 81bdb95ba1f..0662489c6f2 100644
--- a/keyboards/duck/jetfire/jetfire.c
+++ b/keyboards/duck/jetfire/jetfire.c
@@ -14,9 +14,9 @@
* along with this program. If not, see .
*/
#include "jetfire.h"
-#include "backlight_led.h"
+#include "indicator_leds.h"
-enum backlight_level {
+enum BACKLIGHT_AREAS {
BACKLIGHT_ALPHA = 0b0000001,
BACKLIGHT_MOD = 0b0000010,
BACKLIGHT_FROW = 0b0000100,
@@ -137,15 +137,15 @@ void backlight_update_state()
send_color(backlight_state_led & (1<.
*/
-#ifndef JETFIRE_H
-#define JETFIRE_H
+#pragma once
#include "quantum.h"
@@ -57,4 +56,3 @@
{ K0A, K0B, K0C, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, K0I, KC_NO,KC_NO,KC_NO, K0M, K0N, K0O, K0P, K0Q, K0R, K0S, KC_NO } \
}
-#endif
diff --git a/keyboards/duck/jetfire/readme.md b/keyboards/duck/jetfire/readme.md
index 34b351a7266..8de2f5ced6f 100644
--- a/keyboards/duck/jetfire/readme.md
+++ b/keyboards/duck/jetfire/readme.md
@@ -9,7 +9,7 @@ Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Duck Jetfire PCB
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=92708.0)
-To get into bootloader mode, hold the top top most key above the 2 navigation keys while connecting the USB cable.
+**Reset Key:** To put the Jetfire into reset, hold top most key above the 2 navigation keys (`K5P`) while plugging in.
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk
index 8e05516df3d..c708593293a 100644
--- a/keyboards/duck/jetfire/rules.mk
+++ b/keyboards/duck/jetfire/rules.mk
@@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
@@ -70,5 +70,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
CUSTOM_MATRIX = yes
-SRC += backlight_led.c \
- matrix.c
+SRC += indicator_leds.c \
+ matrix.c duck_led/duck_led.c
diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h
index 9e3a08fbd1a..d302fb39532 100644
--- a/keyboards/duck/lightsaver/config.h
+++ b/keyboards/duck/lightsaver/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,9 @@ along with this program. If not, see .
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
+
#define TAPPING_TERM 200
-#endif
diff --git a/keyboards/duck/lightsaver/indicator_leds.c b/keyboards/duck/lightsaver/indicator_leds.c
index 0a54e151e1d..5d2e1ad9f63 100644
--- a/keyboards/duck/lightsaver/indicator_leds.c
+++ b/keyboards/duck/lightsaver/indicator_leds.c
@@ -18,17 +18,12 @@ along with this program. If not, see .
#include
#include
#include
+#include "duck_led/duck_led.h"
-#define T1H 900
-#define T1L 600
-#define T0H 400
-#define T0L 900
-#define RES 6000
-
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+#define LED_T1H 900
+#define LED_T1L 600
+#define LED_T0H 400
+#define LED_T0L 900
void send_bit_d4(bool bitVal) {
if(bitVal) {
@@ -44,8 +39,8 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -59,33 +54,31 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
-void show(void) {
- _delay_us((RES / 1000UL) + 1);
-}
-
-void send_value(uint8_t byte) {
+void send_value(uint8_t byte, enum Device device) {
for(uint8_t b = 0; b < 8; b++) {
- send_bit_d4(byte & 0b10000000);
- byte <<= 1;
+ if(device == Device_STATUSLED) {
+ send_bit_d4(byte & 0b10000000);
+ byte <<= 1;
+ }
}
}
-void send_color(uint8_t r, uint8_t g, uint8_t b) {
- send_value(g);
- send_value(r);
- send_value(b);
+void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) {
+ send_value(r, device);
+ send_value(g, device);
+ send_value(b, device);
}
void indicator_leds_set(bool leds[8]) {
cli();
- send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0);
- send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0);
- send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0);
+ send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0, Device_STATUSLED);
+ send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0, Device_STATUSLED);
+ send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0, Device_STATUSLED);
sei();
show();
}
diff --git a/keyboards/duck/lightsaver/lightsaver.h b/keyboards/duck/lightsaver/lightsaver.h
index 19fcf36bacb..1e1185713b1 100644
--- a/keyboards/duck/lightsaver/lightsaver.h
+++ b/keyboards/duck/lightsaver/lightsaver.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef LIGHTSAVER_H
-#define LIGHTSAVER_H
+#pragma once
#include "quantum.h"
@@ -37,4 +36,3 @@
/* 5 */ { K0A, K0B, K0C, NO, NO, NO, NO, NO, K0I, NO, K0K, NO, K0M, K0N, K0O, K0P, K0Q, K0R } \
}
-#endif
diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c
index a07cdd0d161..543205c0b78 100644
--- a/keyboards/duck/lightsaver/matrix.c
+++ b/keyboards/duck/lightsaver/matrix.c
@@ -87,6 +87,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<
.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,8 @@ along with this program. If not, see .
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
-#define TAPPING_TERM 200
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
-#endif
+#define TAPPING_TERM 200
diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c
index 8555349943c..233404ed30f 100644
--- a/keyboards/duck/octagon/v1/matrix.c
+++ b/keyboards/duck/octagon/v1/matrix.c
@@ -84,6 +84,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<
.
*/
-#ifndef V1_H
-#define V1_H
+#pragma once
#include "quantum.h"
@@ -49,4 +48,3 @@
{ K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \
{ K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \
}
-#endif
diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h
index 78d18d3bb3b..4aab587f663 100644
--- a/keyboards/duck/octagon/v2/config.h
+++ b/keyboards/duck/octagon/v2/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,9 @@ along with this program. If not, see .
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
+
#define TAPPING_TERM 200
-#endif
diff --git a/keyboards/duck/octagon/v2/indicator_leds.c b/keyboards/duck/octagon/v2/indicator_leds.c
index c24509f5144..116306fb712 100644
--- a/keyboards/duck/octagon/v2/indicator_leds.c
+++ b/keyboards/duck/octagon/v2/indicator_leds.c
@@ -20,16 +20,10 @@ along with this program. If not, see .
#include
#include "indicator_leds.h"
-#define T1H 900
-#define T1L 600
-#define T0H 400
-#define T0L 900
-#define RES 6000
-
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+#define LED_T1H 900
+#define LED_T1L 600
+#define LED_T0H 400
+#define LED_T0L 900
void send_bit_d4(bool bitVal) {
if(bitVal) {
@@ -45,8 +39,8 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -60,8 +54,8 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
@@ -80,8 +74,8 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -95,15 +89,11 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
-void show(void) {
- _delay_us((RES / 1000UL) + 1);
-}
-
void send_value(uint8_t byte, enum Device device) {
for(uint8_t b = 0; b < 8; b++) {
if(device == Device_STATUSLED) {
@@ -117,8 +107,8 @@ void send_value(uint8_t byte, enum Device device) {
}
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) {
- send_value(g, device);
send_value(r, device);
+ send_value(g, device);
send_value(b, device);
}
diff --git a/keyboards/duck/octagon/v2/indicator_leds.h b/keyboards/duck/octagon/v2/indicator_leds.h
index 9bb2c8ced93..ad3ec54f52a 100644
--- a/keyboards/duck/octagon/v2/indicator_leds.h
+++ b/keyboards/duck/octagon/v2/indicator_leds.h
@@ -1,11 +1,7 @@
-enum Device {
- Device_PCBRGB,
- Device_STATUSLED
-};
+#include "duck_led/duck_led.h"
void indicator_leds_set(bool leds[8]);
void backlight_toggle_rgb(bool enabled);
void backlight_set_rgb(uint8_t cfg[17][3]);
void backlight_init_ports(void);
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device);
-void show(void);
\ No newline at end of file
diff --git a/keyboards/duck/octagon/v2/matrix.c b/keyboards/duck/octagon/v2/matrix.c
index a63a37640ff..e6e7046b45b 100644
--- a/keyboards/duck/octagon/v2/matrix.c
+++ b/keyboards/duck/octagon/v2/matrix.c
@@ -89,6 +89,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<
.
*/
-#ifndef V2_H
-#define V2_H
+#pragma once
#include "quantum.h"
@@ -49,4 +48,3 @@
{ K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, K1P, KC_NO }, \
{ K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O, K0P, KC_NO } \
}
-#endif
diff --git a/keyboards/dz60/keymaps/billiams/build_flash.sh b/keyboards/dz60/keymaps/billiams/build_flash.sh
new file mode 100644
index 00000000000..e7a81114415
--- /dev/null
+++ b/keyboards/dz60/keymaps/billiams/build_flash.sh
@@ -0,0 +1,9 @@
+# dfu-programmer atmega32u4 erase --force
+# dfu-programmer atmega32u4 flash /path/to/firmware.hex
+# dfu-programmer atmega32u4 reset
+
+# run this in the qmk_firmware directory
+make dz60:billiams
+dfu-programmer atmega32u4 erase --force && \
+dfu-programmer atmega32u4 flash dz60_billiams.hex && \
+dfu-programmer atmega32u4 reset
\ No newline at end of file
diff --git a/keyboards/dz60/keymaps/billiams/config.h b/keyboards/dz60/keymaps/billiams/config.h
new file mode 100644
index 00000000000..9560d51a6f9
--- /dev/null
+++ b/keyboards/dz60/keymaps/billiams/config.h
@@ -0,0 +1 @@
+#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c
new file mode 100644
index 00000000000..88ce0f329ca
--- /dev/null
+++ b/keyboards/dz60/keymaps/billiams/keymap.c
@@ -0,0 +1,48 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Qwerty
+ * ,-----------------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
+ * |-----------------------------------------------------------------------------------------+
+ * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
+ * `-----------------------------------------------------------------------------------------'
+ */
+
+ LAYOUT_directional(
+ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+ /* FN Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
+ * |-----------------------------------------------------------------------------------------+
+ * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | | | Prev | Next | Play/Pause |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | HOME|PG_DN| END |
+ * `-----------------------------------------------------------------------------------------'
+ */
+
+ LAYOUT_directional(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
+ _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_MFFD,
+ KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
+ ),
+};
diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md
new file mode 100644
index 00000000000..5a3a7213f86
--- /dev/null
+++ b/keyboards/dz60/keymaps/billiams/readme.md
@@ -0,0 +1,73 @@
+## Billiam's DZ60 layout
+
+This layout is optimized for MacOS and is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow
+cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny.
+
+Settings:
+
+* The `CAPS LOCK` key is replaced with a second function key.
+* The `ALT` and `CMD` keys are swapped to replicate the Mac layout.
+* Del is available as `Fn` + `Backspace`
+* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
+* RESET is available as `Fn`+ ` ESC`
+* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
+* Media play/pause doesn't seem to work with anything but iTunes at the moment. FML
+
+
+### Initial Installation
+
+I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process.
+
+1. Clone the qmk_firmware repo locally
+```
+# Choose one:
+git clone git@github.com:qmk/qmk_firmware.git # OR
+git clone https://github.com/qmk/qmk_firmware.git
+```
+2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`.
+
+3. Build your hex file
+```
+make dz60:billiams # be in the qmk_firmware directory to do this
+```
+A hex file `dz60_billiams.hex` will be created in the base qmk_firmware directory
+
+4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down
+5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode
+6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away.
+
+Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard.
+
+Hope this helps!
+
+### 0 Qwerty
+```
+,-----------------------------------------------------------------------------------------.
+| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
+|-----------------------------------------------------------------------------------------+
+| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
+|-----------------------------------------------------------------------------------------+
+| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+|-----------------------------------------------------------------------------------------+
+| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC |
+|-----------------------------------------------------------------------------------------+
+| Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
+`-----------------------------------------------------------------------------------------'
+```
+
+### 1 Fn Layer
+```
+FN Layer
+,-----------------------------------------------------------------------------------------.
+| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
+|-----------------------------------------------------------------------------------------+
+| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ |
+|-----------------------------------------------------------------------------------------+
+| | | | | | | | | | | Prev | Next | Play/Pause |
+|-----------------------------------------------------------------------------------------+
+| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
+|-----------------------------------------------------------------------------------------+
+| | | | | | | HOME | PG_DN | END |
+`-----------------------------------------------------------------------------------------'
+```
+
diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h
index 5b9f6dc0899..0d6c4ae39a7 100644
--- a/keyboards/dztech/dz40rgb/config.h
+++ b/keyboards/dztech/dz40rgb/config.h
@@ -22,7 +22,6 @@
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-#define RGB_MATRIX_SKIP_FRAMES 10
#define RGB_MATRIX_KEYPRESSES
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h
index 19f32440eaa..0c04acce3fd 100644
--- a/keyboards/dztech/dz60rgb/config.h
+++ b/keyboards/dztech/dz60rgb/config.h
@@ -22,9 +22,10 @@
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-#define RGB_MATRIX_SKIP_FRAMES 10
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 4
+#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c
index 99e3b5646fa..a6825e750fd 100644
--- a/keyboards/dztech/dz60rgb/dz60rgb.c
+++ b/keyboards/dztech/dz60rgb/dz60rgb.c
@@ -1,14 +1,7 @@
#include "dz60rgb.h"
#include "config.h"
#if defined (dzrgb60_iso)
-
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
@@ -23,7 +16,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
-
{0, H_15, G_15, I_15},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
@@ -38,7 +30,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
-
{0, B_14, A_14, C_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
@@ -52,7 +43,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
-
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
@@ -65,7 +55,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
-
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
@@ -73,9 +62,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
- {0, K_16, J_16, L_16}
+ {0, K_16, J_16, L_16},
};
-
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {16*13.5, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1},
@@ -91,7 +79,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(2<<4)}, {16*2, 0}, 1},
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
-
{{2|(13<<4)}, {16*13.75, 24}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
@@ -106,7 +93,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
-
{{1|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
@@ -120,7 +106,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
-
{{3|(11<<4)}, {16*13.125, 48}, 1},
{{3|(10<<4)}, {16*11.25, 48}, 0},
{{3|(9<<4)}, {16*10.25, 48}, 0},
@@ -133,7 +118,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(0<<4)}, {16*0.625, 48}, 1},
-
{{4|(13<<4)}, {16*13.875, 64}, 1},
{{4|(11<<4)}, {16*12.625, 64}, 1},
{{4|(10<<4)}, {16*11.375, 64}, 1},
@@ -141,21 +125,10 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{4|(5<<4)}, { 16*6.375, 64}, 0},
{{4|(2<<4)}, { 16*2.625, 64}, 1},
{{4|(1<<4)}, { 16*1.375, 64}, 1},
- {{4|(0<<4)}, { 16*0.125, 64}, 1}
-
+ {{4|(0<<4)}, { 16*0.125, 64}, 1},
};
-
-
-
#elif defined (dzrgb60_hhkb)
-
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
{0, H_15, G_15, I_15},
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
@@ -171,7 +144,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
-
{0, H_14, G_14, I_14},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
@@ -186,7 +158,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
-
{0, E_14, D_14, F_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
@@ -200,7 +171,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
-
{0, B_14, A_14, C_14},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
@@ -214,16 +184,14 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
-
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
- {0, K_16, J_16, L_16}
+ {0, K_16, J_16, L_16},
};
-
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(12<<4)}, {16*14, 0}, 1},
{{0|(13<<4)}, {16*13, 0}, 1},
@@ -240,7 +208,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(2<<4)}, {16*2, 0}, 1},
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
-
{{1|(13<<4)}, {16*13.75, 16}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
@@ -255,7 +222,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
-
{{2|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
@@ -269,7 +235,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
-
{{3|(13<<4)}, {16*14, 48}, 1},
{{3|(11<<4)}, {16*12.625, 48}, 0},
{{3|(10<<4)}, {16*11.25, 48}, 0},
@@ -283,24 +248,16 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(0<<4)}, {16*0.625, 48}, 1},
-
{{4|(13<<4)}, {16*13.625, 64}, 1},
{{4|(11<<4)}, {16*12.375, 64}, 1},
{{4|(10<<4)}, {16*11.125, 64}, 1},
{{4|(5<<4)}, { 16*7, 64}, 0},
{{4|(2<<4)}, { 16*2.875, 64}, 1},
{{4|(1<<4)}, { 16*1.625, 64}, 1},
- {{4|(0<<4)}, { 16*0.375, 64}, 1}
-
+ {{4|(0<<4)}, { 16*0.375, 64}, 1},
};
#elif defined (dzrgb60_hhkb_iso)
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
{0, H_15, G_15, I_15},
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
@@ -316,7 +273,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
-
{0, K_15, J_15, L_15},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
@@ -331,7 +287,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
-
{0, E_15, D_15, F_15},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
@@ -345,7 +300,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
-
{0, B_14, A_14, C_14},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
@@ -359,16 +313,14 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
-
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
- {0, K_16, J_16, L_16}
+ {0, K_16, J_16, L_16},
};
-
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(12<<4)}, {16*14, 0}, 1},
{{0|(13<<4)}, {16*13, 0}, 1},
@@ -385,7 +337,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(2<<4)}, {16*2, 0}, 1},
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
-
{{2|(13<<4)}, {16*13.75, 24}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
@@ -400,7 +351,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
-
{{1|(13<<4)}, {16*12.75, 32}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
@@ -414,7 +364,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
-
{{3|(13<<4)}, {16*14, 48}, 1},
{{3|(11<<4)}, {16*12.625, 48}, 0},
{{3|(10<<4)}, {16*11.25, 48}, 0},
@@ -428,24 +377,16 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(0<<4)}, {16*0.625, 48}, 1},
-
{{4|(13<<4)}, {16*13.625, 64}, 1},
{{4|(11<<4)}, {16*12.375, 64}, 1},
{{4|(10<<4)}, {16*11.125, 64}, 1},
{{4|(5<<4)}, { 16*7, 64}, 0},
{{4|(2<<4)}, { 16*2.875, 64}, 1},
{{4|(1<<4)}, { 16*1.625, 64}, 1},
- {{4|(0<<4)}, { 16*0.375, 64}, 1}
-
+ {{4|(0<<4)}, { 16*0.375, 64}, 1},
};
#elif defined (dzrgb60_ansi)
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
@@ -460,7 +401,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
-
{0, H_14, G_14, I_14},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
@@ -475,7 +415,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
-
{0, E_14, D_14, F_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
@@ -489,7 +428,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
-
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
{0, B_10, A_10, C_10},
@@ -502,7 +440,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
-
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
@@ -510,9 +447,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
- {0, K_16, J_16, L_16}
+ {0, K_16, J_16, L_16},
};
-
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {16*13.5, 0}, 1},
{{0|(12<<4)}, {16*12, 0}, 1},
@@ -528,7 +464,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(2<<4)}, {16*2, 0}, 1},
{{0|(1<<4)}, {16*1, 0}, 1},
{{0|(0<<4)}, {16*0, 0}, 1},
-
{{1|(13<<4)}, {16*13.75, 16}, 1},
{{1|(12<<4)}, {16*12.5, 16}, 0},
{{1|(11<<4)}, {16*11.5, 16}, 0},
@@ -543,7 +478,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{1|(2<<4)}, { 16*2.5, 16}, 0},
{{1|(1<<4)}, { 16*1.5, 16}, 0},
{{1|(0<<4)}, { 16*0.25, 16}, 1},
-
{{2|(13<<4)}, {16*13.375, 24}, 1},
{{2|(11<<4)}, {16*11.75, 32}, 0},
{{2|(10<<4)}, {16*10.75, 32}, 0},
@@ -557,7 +491,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(2<<4)}, { 16*2.75, 32}, 0},
{{2|(1<<4)}, { 16*1.75, 32}, 0},
{{2|(0<<4)}, { 16*0.375, 32}, 1},
-
{{3|(11<<4)}, {16*13.125, 48}, 1},
{{3|(10<<4)}, {16*11.25, 48}, 0},
{{3|(9<<4)}, {16*10.25, 48}, 0},
@@ -570,7 +503,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, {16*3.25, 48}, 0},
{{3|(1<<4)}, {16*1.25, 48}, 0},
{{3|(0<<4)}, {16*0.625, 48}, 1},
-
{{4|(13<<4)}, {16*13.875, 64}, 1},
{{4|(11<<4)}, {16*12.625, 64}, 1},
{{4|(10<<4)}, {16*11.375, 64}, 1},
@@ -578,17 +510,10 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{4|(5<<4)}, { 16*6.375, 64}, 0},
{{4|(2<<4)}, { 16*2.625, 64}, 1},
{{4|(1<<4)}, { 16*1.375, 64}, 1},
- {{4|(0<<4)}, { 16*0.125, 64}, 1}
+ {{4|(0<<4)}, { 16*0.125, 64}, 1},
};
#else
-
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
@@ -603,7 +528,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, K_3, J_3, L_3},
{0, K_2, J_2, L_2},
{0, K_1, J_1, L_1},
-
{0, H_14, G_14, I_14},
{0, H_13, G_13, I_13},
{0, H_12, G_12, I_12},
@@ -618,7 +542,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, H_3, G_3, I_3},
{0, H_2, G_2, I_2},
{0, H_1, G_1, I_1},
-
{0, E_14, D_14, F_14},
{0, E_12, D_12, F_12},
{0, E_11, D_11, F_11},
@@ -632,7 +555,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
-
{0, B_14, A_14, C_14},
{0, B_13, A_13, C_13},
{0, B_11, A_11, C_11},
@@ -646,7 +568,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_3, A_3, C_3},
{0, B_2, A_2, C_2},
{0, B_1, A_1, C_1},
-
{0, B_15, A_15, C_15},
{0, E_13, D_13, F_13},
{0, B_12, A_12, C_12},
@@ -655,9 +576,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, B_16, A_16, C_16},
{0, E_16, D_16, F_16},
{0, H_16, G_16, I_16},
- {0, K_16, J_16, L_16}
+ {0, K_16, J_16, L_16},
};
-
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(13<<4)}, {17.23*13, 0}, 1},
{{0|(12<<4)}, {17.23*12, 0}, 1},
@@ -673,7 +593,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{0|(2<<4)}, { 17.23*2, 0}, 1},
{{0|(1<<4)}, { 17.23*1, 0}, 1},
{{0|(0<<4)}, { 17.23*0, 0}, 1},
-
{{1|(13<<4)}, {17.23*13, 16}, 1},
{{1|(12<<4)}, {17.23*12, 16}, 0},
{{1|(11<<4)}, {17.23*11, 16}, 0},
@@ -688,7 +607,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{1|(2<<4)}, { 17.23*2, 16}, 0},
{{1|(1<<4)}, { 17.23*1, 16}, 0},
{{1|(0<<4)}, { 17.23*0, 16}, 1},
-
{{2|(13<<4)}, {17.23*13, 32}, 1},
{{2|(11<<4)}, {17.23*11, 32}, 0},
{{2|(10<<4)}, {17.23*10, 32}, 0},
@@ -702,7 +620,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{2|(2<<4)}, { 17.23*2, 32}, 0},
{{2|(1<<4)}, { 17.23*1, 32}, 0},
{{2|(0<<4)}, { 17.23*0, 32}, 1},
-
{{3|(13<<4)}, {17.23*13, 48}, 1},
{{3|(11<<4)}, {17.23*11, 48}, 0},
{{3|(10<<4)}, {17.23*10, 48}, 0},
@@ -716,7 +633,6 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{3|(2<<4)}, { 17.23*2, 48}, 0},
{{3|(1<<4)}, { 17.23*1, 48}, 0},
{{3|(0<<4)}, { 17.23*0, 48}, 1},
-
{{4|(13<<4)}, {17.23*13, 64}, 1},
{{4|(11<<4)}, {17.23*11, 64}, 1},
{{4|(10<<4)}, {17.23*10, 64}, 1},
@@ -725,32 +641,27 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
{{4|(5<<4)}, { 17.23*5, 64}, 0},
{{4|(2<<4)}, { 17.23*2, 64}, 1},
{{4|(1<<4)}, { 17.23*1, 64}, 1},
- {{4|(0<<4)}, { 17.23*0, 64}, 1}
-
+ {{4|(0<<4)}, { 17.23*0, 64}, 1},
};
#endif
void matrix_init_kb(void) {
matrix_init_user();
}
-
-
void matrix_scan_kb(void) {
matrix_scan_user();
}
-
-
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
-
-
void suspend_power_down_kb(void)
{
rgb_matrix_set_suspend_state(true);
+ suspend_power_down_user();
}
void suspend_wakeup_init_kb(void)
{
rgb_matrix_set_suspend_state(false);
+ suspend_wakeup_init_user();
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c
index 0eff4ca8a37..c0bc1b89b1d 100644
--- a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c
@@ -5,26 +5,23 @@ extern bool g_suspend_state;
#define _LAYER2 2
#define _LAYER3 3
#define _LAYER4 4
-#define _LAYER5 5
-#define _LAYER6 6
-#define _LAYER7 7
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT( /* Base */
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\
- CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\
- KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RIGHT),
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\
+ CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\
+ KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT),
[_LAYER1] = LAYOUT( /* FN */
TO(3), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\
- KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_VOLU, KC_MUTE,\
KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
[_LAYER2] = LAYOUT( /* LIGHT */
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\
KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_LAYER3] = LAYOUT( /* NUMPAD */
@@ -33,38 +30,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT,\
KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS,\
KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS),
- [_LAYER4] = LAYOUT( /* MAC */
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\
- CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(5) , KC_LEFT, KC_DOWN, KC_RIGHT),
+ [_LAYER4] = LAYOUT( /* SWITCH LALT AND LGUI */
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\
+ CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, TO(0), KC_LEFT, KC_DOWN, KC_RIGHT),
};
-
-
-void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (led.matrix_co.raw < 0xFF) {
- if (led.modifier) {
- rgb_matrix_set_color( i, red, green, blue );
- }
- }
- }
-}
-
void rgb_matrix_indicators_user(void) {
uint8_t this_led = host_keyboard_leds();
if (!g_suspend_state) {
switch (biton32(layer_state)) {
- case _LAYER1:
- rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false);
- break;
- case _LAYER2:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false);
- break;
case _LAYER3:
if ( this_led & (1<.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0076
+#define PRODUCT_ID 0x0037
+#define DEVICE_VER 0x0100
+#define MANUFACTURER emptystring
+#define PRODUCT NQG
+#define DESCRIPTION 30% ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 10
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS {B6, B2, B3, B1}
+#define MATRIX_COL_PINS {F7, F6, B5, B4, E6, D7, C6, D4, D0, D1}
+
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+#define TAPPING_TERM 200
diff --git a/keyboards/emptystring/NQG/keymaps/default/keymap.c b/keyboards/emptystring/NQG/keymaps/default/keymap.c
new file mode 100644
index 00000000000..cd465519bf6
--- /dev/null
+++ b/keyboards/emptystring/NQG/keymaps/default/keymap.c
@@ -0,0 +1,61 @@
+#include QMK_KEYBOARD_H
+
+#define _BASE 0
+#define _LOWER 1
+#define _RAISE 2
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_ENSL,
+ TD_N0BS,
+ TD_RPPI,
+};
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_ENSL TD(TD_ENSL)
+#define KC_N0BS TD(TD_N0BS)
+#define KC_RPPI TD(TD_RPPI)
+
+#define KC_BSCT LCTL_T(KC_BSPC)
+#define KC_ALEN LALT(KC_ENT)
+#define KC_CTEN LCTL(KC_ENT)
+#define KC_STAB LSFT_T(KC_TAB)
+#define KC_WLNG LALT(KC_LSFT)
+#define KC_LOCK LGUI(KC_L)
+#define KC_ULCK LCTL(LALT(KC_DEL))
+#define KC_DSTP LGUI(KC_D)
+#define KC_ESLO LT(_LOWER, KC_ESC)
+
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_ENSL] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ENT),
+ [TD_N0BS] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_BSLS),
+ [TD_RPPI] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_PIPE),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = 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, KC_SCCL, \
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENSL,\
+ KC_STAB, KC_ESLO, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, MO(_RAISE)
+ ),
+
+ [_LOWER] = LAYOUT(
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPPI, \
+ _______, _______, KC_DSTP, _______, KC_WLNG, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \
+ _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_HOME, KC_END,\
+ KC_CTEN, _______, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, KC_ULCK
+ ),
+
+ [_RAISE] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_N0BS, \
+ _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \
+ _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,\
+ KC_ALEN, KC_LOCK, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, _______
+ ),
+
+
+};
diff --git a/keyboards/tetris/keymaps/default/rules.mk b/keyboards/emptystring/NQG/keymaps/default/rules.mk
similarity index 100%
rename from keyboards/tetris/keymaps/default/rules.mk
rename to keyboards/emptystring/NQG/keymaps/default/rules.mk
diff --git a/keyboards/emptystring/NQG/readme.md b/keyboards/emptystring/NQG/readme.md
new file mode 100644
index 00000000000..a8c89986342
--- /dev/null
+++ b/keyboards/emptystring/NQG/readme.md
@@ -0,0 +1,15 @@
+# NQG: Not Quite Gherkin
+
+
+
+NQG (Not Quite Gherkin) is a 30% ortholinear keyboard with a macro key and dedicated row for thumb keys, made by emptystring studio.
+
+Keyboard Maintainer: [Culturalsnow](http://github.com/culturalsnow)
+Hardware Supported: NQG PCB, Pro Micro
+Hardware Availability: Kits are available from [SA_EndlessGame](http://twitter.com/SA_EndlessGame)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make emptystring/NQG:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk
new file mode 100644
index 00000000000..9a46bb85440
--- /dev/null
+++ b/keyboards/emptystring/NQG/rules.mk
@@ -0,0 +1,64 @@
+# 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*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
diff --git a/keyboards/ergodone/info.json b/keyboards/ergodone/info.json
index 81c7e2afaa7..33128758ac3 100644
--- a/keyboards/ergodone/info.json
+++ b/keyboards/ergodone/info.json
@@ -1,8 +1,8 @@
{
"keyboard_name": "Ergodone",
"maintainer": "Yu He",
- "width": 19.5,
- "height": 9.375,
+ "width": 17,
+ "height": 8,
"layouts": {
"LAYOUT_ergodox": {
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index 096368f7abc..cbf7f8aaa29 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -98,7 +98,6 @@ along with this program. If not, see .
* 5, which is now closer to 10ms, but still plenty according to
* manufacturer specs.
*/
-#define DEBOUNCE 10
#define USB_MAX_POWER_CONSUMPTION 500
@@ -109,7 +108,6 @@ along with this program. If not, see .
#define DRIVER_1_LED_TOTAL 24
#define DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
-#define RGB_MATRIX_SKIP_FRAMES 10
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json
index 7470ab90683..6f7a941574b 100644
--- a/keyboards/ergodox_ez/info.json
+++ b/keyboards/ergodox_ez/info.json
@@ -2,8 +2,8 @@
"keyboard_name": "ErgoDox EZ",
"url": "ergodox-ez.com",
"maintainer": "erez",
- "width": 19.5,
- "height": 9.375,
+ "width": 17,
+ "height": 8,
"layouts": {
"LAYOUT_ergodox": {
diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c
index 860cf7b229a..6f604ae2b95 100644
--- a/keyboards/ergodox_ez/matrix.c
+++ b/keyboards/ergodox_ez/matrix.c
@@ -33,14 +33,14 @@ along with this program. If not, see .
#include "debug.h"
#include "util.h"
#include "matrix.h"
+#include "debounce.h"
#include QMK_KEYBOARD_H
#ifdef DEBUG_MATRIX_SCAN_RATE
-#include "timer.h"
+# include "timer.h"
#endif
/*
- * This constant define not debouncing time in msecs, but amount of matrix
- * scan loops which should be made to get stable debounced results.
+ * This constant define not debouncing time in msecs, assuming eager_pr.
*
* On Ergodox matrix scan rate is relatively low, because of slow I2C.
* Now it's only 317 scans/second, or about 3.15 msec/scan.
@@ -52,26 +52,17 @@ along with this program. If not, see .
*/
#ifndef DEBOUNCE
-# define DEBOUNCE 5
+# define DEBOUNCE 5
#endif
/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-/*
- * matrix state(1:on, 0:off)
- * contains the raw values without debounce filtering of the last read cycle.
- */
-static matrix_row_t raw_matrix[MATRIX_ROWS];
-
-// Debouncing: store for each key the number of scans until it's eligible to
-// change. When scanning the matrix, ignore any changes in keys that have
-// already changed in the last DEBOUNCE scans.
-static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
+static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
+static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
static matrix_row_t read_cols(uint8_t row);
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
static uint8_t mcp23018_reset_loop;
// static uint16_t mcp23018_reset_loop;
@@ -81,197 +72,150 @@ uint32_t matrix_timer;
uint32_t matrix_scan_count;
#endif
+__attribute__((weak)) void matrix_init_user(void) {}
-__attribute__ ((weak))
-void matrix_init_user(void) {}
+__attribute__((weak)) void matrix_scan_user(void) {}
-__attribute__ ((weak))
-void matrix_scan_user(void) {}
+__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
+__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
+inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
+inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
+void matrix_init(void) {
+ // initialize row and col
-void matrix_init(void)
-{
- // initialize row and col
+ mcp23018_status = init_mcp23018();
- mcp23018_status = init_mcp23018();
+ unselect_rows();
+ init_cols();
-
- unselect_rows();
- init_cols();
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- raw_matrix[i] = 0;
- for (uint8_t j=0; j < MATRIX_COLS; ++j) {
- debounce_matrix[i * MATRIX_COLS + j] = 0;
- }
- }
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ raw_matrix[i] = 0;
+ }
#ifdef DEBUG_MATRIX_SCAN_RATE
- matrix_timer = timer_read32();
- matrix_scan_count = 0;
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
#endif
-
- matrix_init_quantum();
-
+ debounce_init(MATRIX_ROWS);
+ matrix_init_quantum();
}
void matrix_power_up(void) {
- mcp23018_status = init_mcp23018();
+ mcp23018_status = init_mcp23018();
- unselect_rows();
- init_cols();
+ unselect_rows();
+ init_cols();
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- }
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
#ifdef DEBUG_MATRIX_SCAN_RATE
- matrix_timer = timer_read32();
- matrix_scan_count = 0;
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
#endif
}
-// Returns a matrix_row_t whose bits are set if the corresponding key should be
-// eligible to change in this scan.
-matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) {
- matrix_row_t result = 0;
- matrix_row_t change = rawcols ^ raw_matrix[row];
- raw_matrix[row] = rawcols;
- for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
- if (debounce_matrix[row * MATRIX_COLS + i]) {
- --debounce_matrix[row * MATRIX_COLS + i];
- } else {
- result |= (1 << i);
- }
- if (change & (1 << i)) {
- debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
+// Reads and stores a row, returning
+// whether a change occurred.
+static inline bool store_raw_matrix_row(uint8_t index) {
+ matrix_row_t temp = read_cols(index);
+ if (raw_matrix[index] != temp) {
+ raw_matrix[index] = temp;
+ return true;
+ }
+ return false;
+}
+
+uint8_t matrix_scan(void) {
+ if (mcp23018_status) { // if there was an error
+ if (++mcp23018_reset_loop == 0) {
+ // if (++mcp23018_reset_loop >= 1300) {
+ // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
+ // this will be approx bit more frequent than once per second
+ print("trying to reset mcp23018\n");
+ mcp23018_status = init_mcp23018();
+ if (mcp23018_status) {
+ print("left side not responding\n");
+ } else {
+ print("left side attached\n");
+ ergodox_blink_all_leds();
+ }
}
}
- return result;
-}
-
-matrix_row_t debounce_read_cols(uint8_t row) {
- // Read the row without debouncing filtering and store it for later usage.
- matrix_row_t cols = read_cols(row);
- // Get the Debounce mask.
- matrix_row_t mask = debounce_mask(cols, row);
- // debounce the row and return the result.
- return (cols & mask) | (matrix[row] & ~mask);;
-}
-
-uint8_t matrix_scan(void)
-{
- if (mcp23018_status) { // if there was an error
- if (++mcp23018_reset_loop == 0) {
- // if (++mcp23018_reset_loop >= 1300) {
- // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
- // this will be approx bit more frequent than once per second
- print("trying to reset mcp23018\n");
- mcp23018_status = init_mcp23018();
- if (mcp23018_status) {
- print("left side not responding\n");
- } else {
- print("left side attached\n");
- ergodox_blink_all_leds();
- }
- }
- }
#ifdef DEBUG_MATRIX_SCAN_RATE
- matrix_scan_count++;
+ matrix_scan_count++;
- uint32_t timer_now = timer_read32();
- if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
- print("matrix scan frequency: ");
- pdec(matrix_scan_count);
- print("\n");
+ uint32_t timer_now = timer_read32();
+ if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) {
+ print("matrix scan frequency: ");
+ pdec(matrix_scan_count);
+ print("\n");
- matrix_timer = timer_now;
- matrix_scan_count = 0;
- }
+ matrix_timer = timer_now;
+ matrix_scan_count = 0;
+ }
#endif
#ifdef LEFT_LEDS
- mcp23018_status = ergodox_left_leds_update();
-#endif // LEFT_LEDS
- for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
- select_row(i);
- // and select on left hand
- select_row(i + MATRIX_ROWS_PER_SIDE);
- // we don't need a 30us delay anymore, because selecting a
- // left-hand row requires more than 30us for i2c.
+ mcp23018_status = ergodox_left_leds_update();
+#endif // LEFT_LEDS
+ bool changed = false;
+ for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
+ // select rows from left and right hands
+ uint8_t left_index = i;
+ uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
+ select_row(left_index);
+ select_row(right_index);
- // grab cols from left hand
- matrix[i] = debounce_read_cols(i);
- // grab cols from right hand
- matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
+ // we don't need a 30us delay anymore, because selecting a
+ // left-hand row requires more than 30us for i2c.
+
+ changed |= store_raw_matrix_row(left_index);
+ changed |= store_raw_matrix_row(right_index);
- unselect_rows();
- }
+ unselect_rows();
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
+ matrix_scan_quantum();
- matrix_scan_quantum();
-
- return 1;
+ return 1;
}
-bool matrix_is_modified(void) // deprecated and evidently not called.
+bool matrix_is_modified(void) // deprecated and evidently not called.
{
- return true;
+ return true;
}
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<> 2));
+ uint8_t data = 0;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status < 0) goto out;
+ data = ~((uint8_t)mcp23018_status);
+ mcp23018_status = I2C_STATUS_SUCCESS;
+ out:
+ i2c_stop();
+ return data;
}
+ } else {
+ /* read from teensy
+ * bitmask is 0b11110011, but we want those all
+ * in the lower six bits.
+ * we'll return 1s for the top two, but that's harmless.
+ */
+
+ return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2));
+ }
}
/* Row pin configuration
@@ -333,69 +279,70 @@ static matrix_row_t read_cols(uint8_t row)
* row: 0 1 2 3 4 5 6
* pin: A0 A1 A2 A3 A4 A5 A6
*/
-static void unselect_rows(void)
-{
- // no need to unselect on mcp23018, because the select step sets all
- // the other row bits high, and it's not changing to a different
- // direction
+static void unselect_rows(void) {
+ // no need to unselect on mcp23018, because the select step sets all
+ // the other row bits high, and it's not changing to a different
+ // direction
- // unselect on teensy
- // Hi-Z(DDR:0, PORT:0) to unselect
- DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
- PORTB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
- DDRD &= ~(1<<2 | 1<<3);
- PORTD &= ~(1<<2 | 1<<3);
- DDRC &= ~(1<<6);
- PORTC &= ~(1<<6);
+ // unselect on teensy
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
+ PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
+ DDRD &= ~(1 << 2 | 1 << 3);
+ PORTD &= ~(1 << 2 | 1 << 3);
+ DDRC &= ~(1 << 6);
+ PORTC &= ~(1 << 6);
}
-static void select_row(uint8_t row)
-{
- if (row < 7) {
- // select on mcp23018
- if (mcp23018_status) { // if there was an error
- // do nothing
- } else {
- // set active row low : 0
- // set other rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0xFF & ~(1<
.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
#define DIODE_DIRECTION COL2ROW
-
#define RGBLED_NUM 6
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
-
-// Set bootmagic lite key to the key commonly programmed as Esc.
-#define BOOTMAGIC_LITE_ROW 5
-#define BOOTMAGIC_LITE_COLUMN 0
\ No newline at end of file
diff --git a/keyboards/exclusive/e6v2/bmc/i2c.c b/keyboards/exclusive/e6v2/bmc/i2c.c
deleted file mode 100644
index 801242e0d08..00000000000
--- a/keyboards/exclusive/e6v2/bmc/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-// Please do not modify this file
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<.
*/
-#ifndef FACEW_CONFIG_H
-#define FACEW_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -40,7 +39,3 @@ along with this program. If not, see .
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-
-#endif
diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c
index 9c255c68f45..7ec56548b16 100644
--- a/keyboards/facew/facew.c
+++ b/keyboards/facew/facew.c
@@ -26,7 +26,7 @@ along with this program. If not, see .
#include
#include "action_layer.h"
-#include "i2c.h"
+#include "i2c_master.h"
#include "quantum.h"
#ifdef RGBLIGHT_ENABLE
@@ -42,7 +42,7 @@ void rgblight_set(void) {
}
i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif
diff --git a/keyboards/facew/facew.h b/keyboards/facew/facew.h
index 215e06090cc..b3356f2628e 100644
--- a/keyboards/facew/facew.h
+++ b/keyboards/facew/facew.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef FACEW_H
-#define FACEW_H
+#pragma once
#include "quantum.h"
@@ -53,5 +52,3 @@ along with this program. If not, see .
{ KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \
{ KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \
}
-
-#endif
diff --git a/keyboards/facew/i2c.c b/keyboards/facew/i2c.c
deleted file mode 100644
index a4f95213524..00000000000
--- a/keyboards/facew/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-// Please do not modify this file
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/facew/keymaps/mechmerlin/keymap.c b/keyboards/facew/keymaps/mechmerlin/keymap.c
deleted file mode 100644
index d7fb7a7aed3..00000000000
--- a/keyboards/facew/keymaps/mechmerlin/keymap.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_all(
- KC_GESC, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2),
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL
- ),
- [1] = LAYOUT_all(
- 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_NO, KC_DEL,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
- [2] = LAYOUT_all(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT
- ),
-
- [3] = LAYOUT_all(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-};
-
diff --git a/keyboards/facew/keymaps/mechmerlin/readme.md b/keyboards/facew/keymaps/mechmerlin/readme.md
deleted file mode 100644
index eeb83b0a16d..00000000000
--- a/keyboards/facew/keymaps/mechmerlin/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-MechMerlin's FaceW Sprit Edition Layout
-======================
-
-This is the preferred 60% layout used by u/merlin36, host of the [MechMerlin YouTube channel](www.youtube.com/mechmerlin).
-
-## Keyboard Notes
-- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com)
-- Uses ps2avru instead of ps2avrgb
-- To put in reset mode hold `q` while inserting the USB cable
-- Use flashing instructions from ps2avrgb QMK port
-
-## Keymap Notes
-- Does not support any form of inswitch lighting as Merlin hates them.
-- Arrow toggle switch to the right of right shift
-- Reset is FN + Left Shift + R
-
-### Build
-To build this keymap, simply run `make facew:mechmerlin` from the qmk_firmware directory.
diff --git a/keyboards/facew/matrix.c b/keyboards/facew/matrix.c
deleted file mode 100644
index 57aa36b5ff7..00000000000
--- a/keyboards/facew/matrix.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include
-#include
-
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-#define DEBOUNCE 5
-#endif
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_init(void) {
- // all outputs for rows high
- DDRB = 0xFF;
- PORTB = 0xFF;
- // all inputs for columns
- DDRA = 0x00;
- DDRC &= ~(0x111111<<2);
- DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
- return x;
-}
-
-uint8_t matrix_scan(void) {
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- matrix_set_row_status(row);
- _delay_us(5);
-
- matrix_row_t cols = (
- // cols 0..7, PORTA 0 -> 7
- (~PINA) & 0xFF
- ) | (
- // cols 8..13, PORTC 7 -> 0
- bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
- );
-
- if (matrix_debouncing[row] != cols) {
- matrix_debouncing[row] = cols;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_user();
-
- return 1;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md
index 578dcf88884..b749d18d296 100644
--- a/keyboards/facew/readme.md
+++ b/keyboards/facew/readme.md
@@ -2,20 +2,12 @@
A 60% no frills keyboard.
-The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs
-but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It
-is designed and manufactured in Korea. It originally uses BootMapperClient for programming but
-can now also use QMK.
+The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It is designed and manufactured in Korea.
Keyboard Maintainer: [MechMerlin](www.github.com/mechmerlin)
Hardware Supported: FaceW Sprit Edition PCB
Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1352
-## Keyboard Notes
-- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com)
-- Uses ps2avru instead of ps2avrgb
-- To put in reset mode hold `q` while inserting the USB cable
-
Make example for this keyboard (after setting up your build environment):
make facew:default
@@ -24,6 +16,8 @@ Flashing
ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
+**Reset Key:** To put the FaceW into reset, hold `q` (`K01`) while plugging in.
+
Windows:
1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
2. Place your keyboard into reset.
@@ -42,12 +36,12 @@ macOS:
```
3. Install the following packages:
```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk
index 77d29b3320d..b939b0fd240 100644
--- a/keyboards/facew/rules.mk
+++ b/keyboards/facew/rules.mk
@@ -31,20 +31,19 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = yes
+BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
-BACKLIGHT_ENABLE = no
-RGBLIGHT_ENABLE = no
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h
index d2d848fcdc8..f3d663f8a6e 100644
--- a/keyboards/facew/usbconfig.h
+++ b/keyboards/facew/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -241,8 +240,8 @@ section at the end of this file).
#define USB_CFG_DEVICE_VERSION 0x00, 0x02
/* Version number of the device: Minor number first, then major number.
*/
-#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
-#define USB_CFG_VENDOR_NAME_LEN 13
+#define USB_CFG_VENDOR_NAME 'S', 'p', 'r', 'i', 't'
+#define USB_CFG_VENDOR_NAME_LEN 5
/* These two values define the vendor name returned by the USB device. The name
* must be given as a list of characters under single quotes. The characters
* are interpreted as Unicode (UTF-16) entities.
@@ -251,8 +250,8 @@ section at the end of this file).
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
* details.
*/
-#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
-#define USB_CFG_DEVICE_NAME_LEN 8
+#define USB_CFG_DEVICE_NAME 'F', 'a', 'c', 'e', 'W'
+#define USB_CFG_DEVICE_NAME_LEN 5
/* Same as above for the device name. If you don't want a device name, undefine
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
* you use a shared VID/PID.
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h
index b35762fbcfc..30f07667e3a 100644
--- a/keyboards/georgi/config.h
+++ b/keyboards/georgi/config.h
@@ -23,15 +23,13 @@ along with this program. If not, see .
/* Defaults */
-#define VERSION "Alpha 01: Ted "
+#define VERSION "v1.0: Stenoknight"
#define VERBOSE
#define FORCE_NKRO
-#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
-#define NO_DEBUG
#define NO_ACTION_ONESHOT
-#define NO_ACTION_FUNCTION
+#define NO_ACTION_MACRO
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
diff --git a/keyboards/georgi/keymaps/default/keymap.c b/keyboards/georgi/keymaps/default/keymap.c
index c3d69eb8aa0..3a0edb8923f 100644
--- a/keyboards/georgi/keymaps/default/keymap.c
+++ b/keyboards/georgi/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/*
+/*
* Good on you for modifying your layout, this is the most nonQMK layout you will come across
* There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer
*
@@ -15,215 +15,224 @@
#include "keymap_steno.h"
#define IGNORE_MOD_TAP_INTERRUPT
-int getKeymapCount(void);
-
// Proper Layers
#define FUNCT (LSD | LK | LP | LH)
#define MEDIA (LSD | LK | LW | LR)
#define MOVE (ST1 | ST2)
+// QMK Layers
+#define STENO_LAYER 0
+#define GAMING 1
+#define GAMING_2 2
+
/* Keyboard Layout
* ,---------------------------------. ,------------------------------.
* | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD |
* |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----|
- * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RG | RB | RS | RZ |
+ * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | BB | RG | RS | RZ |
* `---------------------------------' `------------------------------'
* ,---------------, .---------------.
- * | NUM | LA | LO | | RE | RU | NUM |
+ * | LNO | LA | LO | | RE | RU | RNO |
* `---------------' `---------------'
*/
-// YOU MUST ORDER THIS!
-// P Will return from processing on the first match it finds. Therefore
-// PJ Will run the requested action, remove the matched chord and continue
-//
-// First any chords that would conflict with PJs need to be checked, then PJs, lastly Ps.
-// For all chords should be ordered by length in their section!
+// Note: You can only use basic keycodes here!
+// P() is just a wrapper to make your life easier.
//
// http://docs.gboards.ca
-bool processQwerty(void) {
- // Place P's that would be trashed by PJ's here
- P( RT | RS | RD | RZ | NUM, SEND_STRING(VERSION); SEND_STRING(__DATE__));
- P( NUM | LA | LO | RE | RU, SEND(KC_MPLY));
- P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC));
+uint32_t processQwerty(bool lookup) {
+ // Specials
+ P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__));
+ P( LNO | RNO | LA | LO | RE | RU, SEND(KC_MPLY));
+ P( LFT | LK | LP | LW, REPEAT());
+ P( ST1 | ST2 | LW | ST4, SEND(KC_BSPC));
- // Thumb Chords
- P( LA | LO | RE | RU, SEND(KC_CAPS));
- P( LA | RU, SEND(KC_ESC));
- PJ( LO | RE, SEND(KC_LCTL));
- PJ( NUM | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
- PJ( NUM | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
-
- // Mods
- PJ( RT | RD | RS | RZ, SEND(KC_LGUI));
- PJ( RT | RD, SEND(KC_LCTL));
- PJ( RS | RZ, SEND(KC_LALT));
- PJ( LA | NUM, SEND(KC_LCTL));
- PJ( LA | LO, SEND(KC_LALT));
- PJ( LO, SEND(KC_LSFT));
+ // Mouse Keys
+ P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2));
+ P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1));
- // Function Layer
- P( FUNCT | RF | RR, SEND(KC_F5));
- P( FUNCT | RP | RB, SEND(KC_F6));
- P( FUNCT | RL | RG, SEND(KC_F7));
- P( FUNCT | RT | RS, SEND(KC_F8));
- P( FUNCT | RF, SEND(KC_F1));
- P( FUNCT | RP, SEND(KC_F2));
- P( FUNCT | RL, SEND(KC_F3));
- P( FUNCT | RT, SEND(KC_F4));
- P( FUNCT | RR, SEND(KC_F9));
- P( FUNCT | RG, SEND(KC_F10));
- P( FUNCT | RB, SEND(KC_F11));
- P( FUNCT | RS, SEND(KC_F12));
+ // Thumb Chords
+ P( LA | LO | RE | RU, SEND(KC_CAPS));
+ P( LA | RU, SEND(KC_ESC));
+ P( LO | RE, SEND(KC_LCTL));
+ P( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
+ P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
- // Movement Layer
- P( MOVE | RF, SEND(KC_LEFT));
- P( MOVE | RP, SEND(KC_DOWN));
- P( MOVE | RL, SEND(KC_UP));
- P( MOVE | RT, SEND(KC_RIGHT));
- P( MOVE | ST3, SEND(KC_PGUP));
- P( MOVE | ST4, SEND(KC_PGDN));
+ // Mods
+ P( RT | RD | RS | RZ, SEND(KC_LGUI));
+ P( RT | RD, SEND(KC_LCTL));
+ P( RS | RZ, SEND(KC_LALT));
+ P( LA | LNO, SEND(KC_LCTL));
+ P( LA | LO, SEND(KC_LALT));
+ P( LO, SEND(KC_LSFT));
- // Media Layer
- P( MEDIA | RF, SEND(KC_MPRV));
- P( MEDIA | RP, SEND(KC_MPLY));
- P( MEDIA | RL, SEND(KC_MPLY));
- P( MEDIA | RT, SEND(KC_MNXT));
- P( MEDIA | RD, SEND(KC_VOLU));
- P( MEDIA | RZ, SEND(KC_VOLD));
- P( MEDIA | RS, SEND(KC_MUTE));
+ // Function Layer
+ P( FUNCT | RF | RR, SEND(KC_F5));
+ P( FUNCT | RP | RB, SEND(KC_F6));
+ P( FUNCT | RL | RG, SEND(KC_F7));
+ P( FUNCT | RT | RS, SEND(KC_F8));
+ P( FUNCT | RF, SEND(KC_F1));
+ P( FUNCT | RP, SEND(KC_F2));
+ P( FUNCT | RL, SEND(KC_F3));
+ P( FUNCT | RT, SEND(KC_F4));
+ P( FUNCT | RR, SEND(KC_F9));
+ P( FUNCT | RG, SEND(KC_F10));
+ P( FUNCT | RB, SEND(KC_F11));
+ P( FUNCT | RS, SEND(KC_F12));
- // Mouse Keys
- P( LP | LH, clickMouse(KC_MS_BTN1));
- P( LW | LR, clickMouse(KC_MS_BTN2));
-
- // Number Row
- P( NUM | LSU, SEND(KC_1));
- P( NUM | LFT, SEND(KC_2));
- P( NUM | LP, SEND(KC_3));
- P( NUM | LH, SEND(KC_4));
- P( NUM | ST1, SEND(KC_5));
- P( NUM | ST3, SEND(KC_6));
- P( NUM | RF, SEND(KC_7));
- P( NUM | RP, SEND(KC_8));
- P( NUM | RL, SEND(KC_9));
- P( NUM | RT, SEND(KC_0));
- P( NUM | LA, SEND(KC_5));
- P( NUM | RT, SEND(KC_0));
-
- // Specials
- P( LA | NUM, SEND(KC_ESC));
- P( RU | NUM, SEND(KC_TAB));
- P( RE | RU, SEND(KC_BSPC));
- P( RD | RZ, SEND(KC_ENT));
- P( RE, SEND(KC_ENT));
- P( RD, SEND(KC_BSPC));
- P( NUM, SEND(KC_BSPC));
- P( LA, SEND(KC_SPC));
- P( RU, SEND(KC_SPC));
- P( RZ, SEND(KC_ESC));
+ // Movement Layer
+ P( MOVE | RF, SEND(KC_LEFT));
+ P( MOVE | RP, SEND(KC_DOWN));
+ P( MOVE | RL, SEND(KC_UP));
+ P( MOVE | RT, SEND(KC_RIGHT));
+ P( MOVE | ST3, SEND(KC_PGUP));
+ P( MOVE | ST4, SEND(KC_PGDN));
- // Letters
- P( LSU | LSD, SEND(KC_A));
- P( LFT | LK, SEND(KC_S));
- P( LP | LW, SEND(KC_D));
- P( LH | LR, SEND(KC_F));
- P( ST1 | ST2, SEND(KC_G));
- P( ST3 | ST4, SEND(KC_H));
- P( RF | RR, SEND(KC_J));
- P( RT | RS, SEND(KC_SCLN))
- P( RG | RL, SEND(KC_L));
- P( RP | RB, SEND(KC_K));
- P( LSU, SEND(KC_Q));
- P( LSD, SEND(KC_Z));
- P( LFT, SEND(KC_W));
- P( LK, SEND(KC_X));
- P( LP, SEND(KC_E));
- P( LW, SEND(KC_C));
- P( LH, SEND(KC_R));
- P( LR, SEND(KC_V));
- P( ST1, SEND(KC_T));
- P( ST2, SEND(KC_B));
- P( ST3, SEND(KC_Y));
- P( ST4, SEND(KC_N));
- P( RF, SEND(KC_U));
- P( RR, SEND(KC_M));
- P( RP, SEND(KC_I));
- P( RB, SEND(KC_COMM));
- P( RL, SEND(KC_O));
- P( RG, SEND(KC_DOT));
- P( RT, SEND(KC_P));
- P( RS, SEND(KC_SLSH));
+ // Media Layer
+ P( MEDIA | RF, SEND(KC_MPRV));
+ P( MEDIA | RP, SEND(KC_MPLY));
+ P( MEDIA | RL, SEND(KC_MPLY));
+ P( MEDIA | RT, SEND(KC_MNXT));
+ P( MEDIA | RD, SEND(KC_VOLU));
+ P( MEDIA | RZ, SEND(KC_VOLD));
+ P( MEDIA | RS, SEND(KC_MUTE));
- // Symbols and Numbers
- P( PWR | RE | RU, SEND(KC_ENT));
- P( PWR | LA | LO, SEND(KC_SPC));
- P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
- P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
- P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
- P( PWR | RD | RZ, SEND(KC_ESC));
- P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
- P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
- P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
- P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
- P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
- P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
- P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
- P( PWR | LW, SEND(KC_LBRC));
- P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
- P( PWR | LR, SEND(KC_RBRC));
- P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
- P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
- P( PWR | ST3, SEND(KC_QUOT));
- P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
- P( PWR | RF, SEND(KC_KP_PLUS));
- P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
- P( PWR | RP, SEND(KC_MINS));
- P( PWR | RB, SEND(KC_EQL));
- P( PWR | RL, SEND(KC_SLSH));
- P( PWR | RG, SEND(KC_COMM));
- P( PWR | RT, SEND(KC_PAST));
- P( PWR | RS, SEND(KC_DOT));
- P( PWR | RD, SEND(KC_TAB));
- P( PWR | LA, SEND(KC_SCLN));
- P( PWR | LO, SEND(KC_SLSH));
- P( PWR | RE, SEND(KC_SCLN));
- P( PWR | RU, SEND(KC_SLSH));
+ // Number Row, Left
+ P( LNO | LSU, SEND(KC_1));
+ P( LNO | LFT, SEND(KC_2));
+ P( LNO | LP, SEND(KC_3));
+ P( LNO | LH, SEND(KC_4));
+ P( LNO | ST1, SEND(KC_5));
+ P( LNO | ST3, SEND(KC_6));
+ P( LNO | RF, SEND(KC_7));
+ P( LNO | RP, SEND(KC_8));
+ P( LNO | RL, SEND(KC_9));
+ P( LNO | RT, SEND(KC_0));
+ // Number Row, Right
+ P( RNO | LSU, SEND(KC_1));
+ P( RNO | LFT, SEND(KC_2));
+ P( RNO | LP, SEND(KC_3));
+ P( RNO | LH, SEND(KC_4));
+ P( RNO | ST1, SEND(KC_5));
+ P( RNO | ST3, SEND(KC_6));
+ P( RNO | RF, SEND(KC_7));
+ P( RNO | RP, SEND(KC_8));
+ P( RNO | RL, SEND(KC_9));
+ P( RNO | RT, SEND(KC_0));
+ P( RNO | LA, SEND(KC_5));
- // If we make here, send as a steno chord
- // If plover is running we can hook that host side
- return false;
+ // Specials
+ P( RU | RNO, SEND(KC_TAB));
+ P( RE | RU, SEND(KC_BSPC));
+ P( RD | RZ, SEND(KC_ENT));
+ P( RE, SEND(KC_ENT));
+ P( RD, SEND(KC_BSPC));
+ P( LNO, SEND(KC_BSPC));
+ P( RNO, SEND(KC_BSPC));
+ P( LA, SEND(KC_SPC));
+ P( RU, SEND(KC_SPC));
+ P( RZ, SEND(KC_ESC));
+
+ // Symbols and Numbers
+ P( PWR | RE | RU, SEND(KC_ENT));
+ P( PWR | LA | LO, SEND(KC_SPC));
+ P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
+ P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
+ P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
+ P( PWR | RD | RZ, SEND(KC_ESC));
+ P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
+ P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
+ P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
+ P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
+ P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
+ P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
+ P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
+ P( PWR | LW, SEND(KC_LBRC));
+ P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
+ P( PWR | LR, SEND(KC_RBRC));
+ P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
+ P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
+ P( PWR | ST3, SEND(KC_QUOT));
+ P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
+ P( PWR | RF, SEND(KC_KP_PLUS));
+ P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
+ P( PWR | RP, SEND(KC_MINS));
+ P( PWR | RB, SEND(KC_EQL));
+ P( PWR | RL, SEND(KC_SLSH));
+ P( PWR | RG, SEND(KC_COMM));
+ P( PWR | RT, SEND(KC_PAST));
+ P( PWR | RS, SEND(KC_DOT));
+ P( PWR | RD, SEND(KC_TAB));
+ P( PWR | LA, SEND(KC_LSFT));
+ P( PWR | LO, SEND(KC_SLSH));
+ P( PWR | RE, SEND(KC_SCLN));
+ P( PWR | RU, SEND(KC_BSLS));
+ P( PWR | LNO, SEND(KC_BSLS));
+
+ // Letters
+ P( LSU | LSD, SEND(KC_A));
+ P( LFT | LK, SEND(KC_S));
+ P( LP | LW, SEND(KC_D));
+ P( LH | LR, SEND(KC_F));
+ P( ST1 | ST2, SEND(KC_G));
+ P( ST3 | ST4, SEND(KC_H));
+ P( RF | RR, SEND(KC_J));
+ P( RT | RS, SEND(KC_SCLN));
+ P( RG | RL, SEND(KC_L));
+ P( RP | RB, SEND(KC_K));
+ P( LSU, SEND(KC_Q));
+ P( LSD, SEND(KC_Z));
+ P( LFT, SEND(KC_W));
+ P( LK, SEND(KC_X));
+ P( LP, SEND(KC_E));
+ P( LW, SEND(KC_C));
+ P( LH, SEND(KC_R));
+ P( LR, SEND(KC_V));
+ P( ST1, SEND(KC_T));
+ P( ST2, SEND(KC_B));
+ P( ST3, SEND(KC_Y));
+ P( ST4, SEND(KC_N));
+ P( RF, SEND(KC_U));
+ P( RR, SEND(KC_M));
+ P( RP, SEND(KC_I));
+ P( RB, SEND(KC_COMM));
+ P( RL, SEND(KC_O));
+ P( RG, SEND(KC_DOT));
+ P( RT, SEND(KC_P));
+ P( RS, SEND(KC_SLSH));
+ P( RNO, SEND(KC_BSPC));
+ P( LNO, SEND(KC_BSPC));
+
+ return 0;
}
-#define STENO_LAYER 0
-#define GAMING 1
-#define GAMING_2 2
-
// "Layers"
// Steno layer should be first in your map.
-// When PWR | FN | RR | RG | RB | RS is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
-// If you have only a single layer, you must set SINGLELAYER = yes in your rules.mk, otherwise you may experince undefined behaviour
+// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
+// If you need more space for chords, remove the two gaming layers.
+// Note: If using NO_ACTION_TAPPING, LT will not work!
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-// Main layer, everything goes through here
-[STENO_LAYER] = LAYOUT_georgi(
-STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
-STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
- STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N1)
-,
-// Gaming layer with Numpad, Very limited
-[GAMING] = LAYOUT_georgi(
-KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
-KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO,
-KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER)),
+ // Main layer, everything goes through here
+ [STENO_LAYER] = LAYOUT_georgi(
+ STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+ STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7
+ ),
+ // Gaming layer with Numpad, Very limited
+ [GAMING] = LAYOUT_georgi(
+ KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO,
+ KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER)
+ ),
-[GAMING_2] = LAYOUT_georgi(
-KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
-KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT,
- KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER))
-};
+ [GAMING_2] = LAYOUT_georgi(
+ KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT,
+ KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER)
+ )
+};
-int getKeymapCount(void) {
- return sizeof(keymaps)/sizeof(keymaps[0]);
-}
+// Don't fuck with this, thanks.
+size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
diff --git a/keyboards/georgi/keymaps/default/rules.mk b/keyboards/georgi/keymaps/default/rules.mk
index 2973c45918d..90d8057c325 100644
--- a/keyboards/georgi/keymaps/default/rules.mk
+++ b/keyboards/georgi/keymaps/default/rules.mk
@@ -1,18 +1,23 @@
#----------------------------------------------------------------------------
-# make georgi:extrakey:dfu
+# make georgi:default:dfu
# Make sure you have dfu-programmer installed!
#----------------------------------------------------------------------------
-#Debug options
+NO_REPEAT = no
VERBOSE = yes
-CONSOLE_ENABLE = yes
-DEBUG_MATRIX_SCAN_RATE = no
-DEBUG_MATRIX = no
KEYBOARD_SHARED_EP = yes
CUSTOM_MATRIX = yes
-MOUSEKEY_ENABLE = yes
-SINGLE_LAYER = no
+#Firmware reduction options
+MOUSEKEY_ENABLE = yes # 1500 bytes
+NO_TAPPING = no # 2000 bytes
+NO_PRINT = yes
+
+#Debug options
+CONSOLE_ENABLE = no
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = no
+ONLY_QWERTY = no
# A bunch of stuff that you shouldn't touch unless you
# know what you're doing.
@@ -22,6 +27,15 @@ SRC += matrix.c i2c_master.c
ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif
-ifeq ($(strip $(SINGLE_LAYER)), yes)
- OPT_DEFS += -DSINGLE_LAYER
+ifeq ($(strip $(NO_REPEAT)), yes)
+ OPT_DEFS += -DNO_REPEAT
+endif
+ifeq ($(strip $(NO_PRINT)), yes)
+ OPT_DEFS += -DNO_PRINT -DNO_DEBUG
+endif
+ifeq ($(strip $(ONLY_QWERTY)), yes)
+ OPT_DEFS += -DONLYQWERTY
+endif
+ifeq ($(strip $(NO_TAPPING)), yes)
+ OPT_DEFS += -DNO_ACTION_TAPPING
endif
diff --git a/keyboards/georgi/keymaps/minimal/keymap.c b/keyboards/georgi/keymaps/minimal/keymap.c
new file mode 100644
index 00000000000..1d9b57e9a54
--- /dev/null
+++ b/keyboards/georgi/keymaps/minimal/keymap.c
@@ -0,0 +1,223 @@
+/*
+ * Good on you for modifying your layout, this is the most nonQMK layout you will come across
+ * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer
+ *
+ * Don't modify the steno layer directly, instead add chords using the keycodes and macros
+ * from sten.h to the layout you want to modify.
+ *
+ * Observe the comment above processQWERTY!
+ *
+ * http://docs.gboards.ca
+ */
+
+#include QMK_KEYBOARD_H
+#include "sten.h"
+#include "keymap_steno.h"
+#define IGNORE_MOD_TAP_INTERRUPT
+
+// Proper Layers
+#define FUNCT (LSD | LK | LP | LH)
+#define MEDIA (LSD | LK | LW | LR)
+#define MOVE (ST1 | ST2)
+
+// QMK Layers
+#define STENO_LAYER 0
+
+/* Keyboard Layout
+ * ,---------------------------------. ,------------------------------.
+ * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD |
+ * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----|
+ * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | BB | RG | RS | RZ |
+ * `---------------------------------' `------------------------------'
+ * ,---------------, .---------------.
+ * | LNO | LA | LO | | RE | RU | RNO |
+ * `---------------' `---------------'
+ */
+
+// Note: You can only use basic keycodes here!
+// P() is just a wrapper to make your life easier.
+//
+// http://docs.gboards.ca
+uint32_t processQwerty(bool lookup) {
+ // Specials
+ P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__));
+ P( LNO | RNO | LA | LO | RE | RU, SEND(KC_MPLY));
+ P( LFT | LK | LP | LW, REPEAT());
+ P( ST1 | ST2 | LW | ST4, SEND(KC_BSPC));
+
+ // Mouse Keys
+ P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2));
+ P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1));
+
+ // Thumb Chords
+ P( LA | LO | RE | RU, SEND(KC_CAPS));
+ P( LA | RU, SEND(KC_ESC));
+ P( LO | RE, SEND(KC_LCTL));
+ P( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
+ P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
+
+ // Mods
+ P( RT | RD | RS | RZ, SEND(KC_LGUI));
+ P( RT | RD, SEND(KC_LCTL));
+ P( RS | RZ, SEND(KC_LALT));
+ P( LA | LNO, SEND(KC_LCTL));
+ P( LA | LO, SEND(KC_LALT));
+ P( LO, SEND(KC_LSFT));
+
+ // Function Layer
+ P( FUNCT | RF | RR, SEND(KC_F5));
+ P( FUNCT | RP | RB, SEND(KC_F6));
+ P( FUNCT | RL | RG, SEND(KC_F7));
+ P( FUNCT | RT | RS, SEND(KC_F8));
+ P( FUNCT | RF, SEND(KC_F1));
+ P( FUNCT | RP, SEND(KC_F2));
+ P( FUNCT | RL, SEND(KC_F3));
+ P( FUNCT | RT, SEND(KC_F4));
+ P( FUNCT | RR, SEND(KC_F9));
+ P( FUNCT | RG, SEND(KC_F10));
+ P( FUNCT | RB, SEND(KC_F11));
+ P( FUNCT | RS, SEND(KC_F12));
+
+ // Movement Layer
+ P( MOVE | RF, SEND(KC_LEFT));
+ P( MOVE | RP, SEND(KC_DOWN));
+ P( MOVE | RL, SEND(KC_UP));
+ P( MOVE | RT, SEND(KC_RIGHT));
+ P( MOVE | ST3, SEND(KC_PGUP));
+ P( MOVE | ST4, SEND(KC_PGDN));
+
+ // Media Layer
+ P( MEDIA | RF, SEND(KC_MPRV));
+ P( MEDIA | RP, SEND(KC_MPLY));
+ P( MEDIA | RL, SEND(KC_MPLY));
+ P( MEDIA | RT, SEND(KC_MNXT));
+ P( MEDIA | RD, SEND(KC_VOLU));
+ P( MEDIA | RZ, SEND(KC_VOLD));
+ P( MEDIA | RS, SEND(KC_MUTE));
+
+ // Number Row, Left
+ P( LNO | LSU, SEND(KC_1));
+ P( LNO | LFT, SEND(KC_2));
+ P( LNO | LP, SEND(KC_3));
+ P( LNO | LH, SEND(KC_4));
+ P( LNO | ST1, SEND(KC_5));
+ P( LNO | ST3, SEND(KC_6));
+ P( LNO | RF, SEND(KC_7));
+ P( LNO | RP, SEND(KC_8));
+ P( LNO | RL, SEND(KC_9));
+ P( LNO | RT, SEND(KC_0));
+
+ // Number Row, Right
+ P( RNO | LSU, SEND(KC_1));
+ P( RNO | LFT, SEND(KC_2));
+ P( RNO | LP, SEND(KC_3));
+ P( RNO | LH, SEND(KC_4));
+ P( RNO | ST1, SEND(KC_5));
+ P( RNO | ST3, SEND(KC_6));
+ P( RNO | RF, SEND(KC_7));
+ P( RNO | RP, SEND(KC_8));
+ P( RNO | RL, SEND(KC_9));
+ P( RNO | RT, SEND(KC_0));
+ P( RNO | LA, SEND(KC_5));
+
+ // Specials
+ P( RU | RNO, SEND(KC_TAB));
+ P( RE | RU, SEND(KC_BSPC));
+ P( RD | RZ, SEND(KC_ENT));
+ P( RE, SEND(KC_ENT));
+ P( RD, SEND(KC_BSPC));
+ P( LNO, SEND(KC_BSPC));
+ P( RNO, SEND(KC_BSPC));
+ P( LA, SEND(KC_SPC));
+ P( RU, SEND(KC_SPC));
+ P( RZ, SEND(KC_ESC));
+
+ // Symbols and Numbers
+ P( PWR | RE | RU, SEND(KC_ENT));
+ P( PWR | LA | LO, SEND(KC_SPC));
+ P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
+ P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
+ P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
+ P( PWR | RD | RZ, SEND(KC_ESC));
+ P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
+ P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
+ P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
+ P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
+ P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
+ P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
+ P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
+ P( PWR | LW, SEND(KC_LBRC));
+ P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
+ P( PWR | LR, SEND(KC_RBRC));
+ P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
+ P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
+ P( PWR | ST3, SEND(KC_QUOT));
+ P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
+ P( PWR | RF, SEND(KC_KP_PLUS));
+ P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
+ P( PWR | RP, SEND(KC_MINS));
+ P( PWR | RB, SEND(KC_EQL));
+ P( PWR | RL, SEND(KC_SLSH));
+ P( PWR | RG, SEND(KC_COMM));
+ P( PWR | RT, SEND(KC_PAST));
+ P( PWR | RS, SEND(KC_DOT));
+ P( PWR | RD, SEND(KC_TAB));
+ P( PWR | LA, SEND(KC_LSFT));
+ P( PWR | LO, SEND(KC_SLSH));
+ P( PWR | RE, SEND(KC_SCLN));
+ P( PWR | RU, SEND(KC_BSLS));
+ P( PWR | LNO, SEND(KC_BSLS));
+
+ // Letters
+ P( LSU | LSD, SEND(KC_A));
+ P( LFT | LK, SEND(KC_S));
+ P( LP | LW, SEND(KC_D));
+ P( LH | LR, SEND(KC_F));
+ P( ST1 | ST2, SEND(KC_G));
+ P( ST3 | ST4, SEND(KC_H));
+ P( RF | RR, SEND(KC_J));
+ P( RT | RS, SEND(KC_SCLN));
+ P( RG | RL, SEND(KC_L));
+ P( RP | RB, SEND(KC_K));
+ P( LSU, SEND(KC_Q));
+ P( LSD, SEND(KC_Z));
+ P( LFT, SEND(KC_W));
+ P( LK, SEND(KC_X));
+ P( LP, SEND(KC_E));
+ P( LW, SEND(KC_C));
+ P( LH, SEND(KC_R));
+ P( LR, SEND(KC_V));
+ P( ST1, SEND(KC_T));
+ P( ST2, SEND(KC_B));
+ P( ST3, SEND(KC_Y));
+ P( ST4, SEND(KC_N));
+ P( RF, SEND(KC_U));
+ P( RR, SEND(KC_M));
+ P( RP, SEND(KC_I));
+ P( RB, SEND(KC_COMM));
+ P( RL, SEND(KC_O));
+ P( RG, SEND(KC_DOT));
+ P( RT, SEND(KC_P));
+ P( RS, SEND(KC_SLSH));
+ P( RNO, SEND(KC_BSPC));
+ P( LNO, SEND(KC_BSPC));
+
+ return 0;
+}
+
+// "Layers"
+// Steno layer should be first in your map.
+// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
+// If you need more space for chords, remove the two gaming layers.
+// Note: If using NO_ACTION_TAPPING, LT will not work!
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ // Main layer, everything goes through here
+ [STENO_LAYER] = LAYOUT_georgi(
+ STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+ STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7
+ )
+};
+// Don't fuck with this, thanks.
+size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
diff --git a/keyboards/georgi/keymaps/minimal/readme.md b/keyboards/georgi/keymaps/minimal/readme.md
new file mode 100644
index 00000000000..f9da34b0245
--- /dev/null
+++ b/keyboards/georgi/keymaps/minimal/readme.md
@@ -0,0 +1,11 @@
+# Georgi QWERTY/Steno firmware
+
+This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout.
+It is both a ergonomic and programmer friendly keymap.
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
+
+## Space issues
+If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save
+you about 4k for entries!
+Get a free 1k by deleting the Gaming layers from the keymap!
diff --git a/keyboards/georgi/keymaps/minimal/rules.mk b/keyboards/georgi/keymaps/minimal/rules.mk
new file mode 100644
index 00000000000..cdbbbc280ec
--- /dev/null
+++ b/keyboards/georgi/keymaps/minimal/rules.mk
@@ -0,0 +1,41 @@
+#----------------------------------------------------------------------------
+# make georgi:default:dfu
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+
+NO_REPEAT = no
+VERBOSE = yes
+KEYBOARD_SHARED_EP = yes
+CUSTOM_MATRIX = yes
+
+#Firmware reduction options
+MOUSEKEY_ENABLE = no # 1500 bytes
+NO_TAPPING = yes # 2000 bytes
+NO_PRINT = yes
+
+#Debug options
+CONSOLE_ENABLE = no
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = no
+ONLY_QWERTY = no
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+SRC += matrix.c i2c_master.c
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
+ifeq ($(strip $(NO_REPEAT)), yes)
+ OPT_DEFS += -DNO_REPEAT
+endif
+ifeq ($(strip $(NO_PRINT)), yes)
+ OPT_DEFS += -DNO_PRINT -DNO_DEBUG
+endif
+ifeq ($(strip $(ONLY_QWERTY)), yes)
+ OPT_DEFS += -DONLYQWERTY
+endif
+ifeq ($(strip $(NO_TAPPING)), yes)
+ OPT_DEFS += -DNO_ACTION_TAPPING
+endif
diff --git a/keyboards/georgi/keymaps/norman/keymap.c b/keyboards/georgi/keymaps/norman/keymap.c
new file mode 100644
index 00000000000..58c42c85295
--- /dev/null
+++ b/keyboards/georgi/keymaps/norman/keymap.c
@@ -0,0 +1,267 @@
+/*
+ * Good on you for modifying your layout, this is the most nonQMK layout you will come across
+ * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer
+ *
+ * Don't modify the steno layer directly, instead add chords using the keycodes and macros
+ * from sten.h to the layout you want to modify.
+ *
+ * Observe the comment above processQWERTY!
+ *
+ * http://docs.gboards.ca
+ */
+
+#include QMK_KEYBOARD_H
+#include "sten.h"
+#include "keymap_steno.h"
+#define IGNORE_MOD_TAP_INTERRUPT
+
+// Proper Layers
+#define FUNCT (LSD | LK | LP | LH)
+#define MEDIA (LSD | LK | LW | LR)
+#define MOVE (LH | ST2)
+
+/* Keyboard Layout
+ * ,---------------------------------. ,------------------------------.
+ * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD |
+ * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----|
+ * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RB | RG | RS | RZ |
+ * `---------------------------------' `------------------------------'
+ * ,---------------, .---------------.
+ * | LNO | LA | LO | | RE | RU | RNO |
+ * `---------------' `---------------'
+ */
+
+// YOU MUST ORDER THIS!
+// Order your chords from longest to shortest!
+// You can only use basic keycodes here!
+//
+// P() is just a wrapper to make your life easier.
+//
+// http://docs.gboards.ca
+uint32_t processQwerty(bool lookup) {
+ // Specials
+ P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__));
+ P( LNO | LA | LO | RE | RU, SEND(KC_MPLY));
+ P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC));
+
+ // Thumb Chords
+ P( LA | LO | RE | RU, SEND(KC_CAPS));
+ P( LA | RU, SEND(KC_ESC));
+ P( LO | RE, SEND(KC_LCTL));
+ P( LNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
+ P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
+
+ // Mods
+ P( RT | RD | RS | RZ, SEND(KC_LGUI));
+ P( RT | RD, SEND(KC_LCTL));
+ P( RS | RZ, SEND(KC_LALT));
+ P( LA | LNO, SEND(KC_LCTL));
+ P( LA | LO, SEND(KC_LALT));
+ P( LO, SEND(KC_LSFT));
+
+ // Function Layer
+ P( FUNCT | RF | RR, SEND(KC_F6));
+ P( FUNCT | RP | RB, SEND(KC_F7));
+ P( FUNCT | RL | RG, SEND(KC_F8));
+ P( FUNCT | ST3 | ST4, SEND(KC_F5));
+ P( FUNCT| ST3, SEND(KC_F1));
+ P( FUNCT| ST4, SEND(KC_F9));
+ P( FUNCT | RF, SEND(KC_F2));
+ P( FUNCT | RP, SEND(KC_F3));
+ P( FUNCT | RL, SEND(KC_F4));
+ P( FUNCT | RR, SEND(KC_F10));
+ P( FUNCT | RG, SEND(KC_F12));
+ P( FUNCT | RB, SEND(KC_F11));
+ P( FUNCT | RD, SEND(KC_RALT); SEND(KC_T); SEND(KC_H); SEND(KC_U); SEND(KC_P));
+ P( FUNCT | RZ, SEND(KC_RALT); SEND(KC_T); SEND(KC_H); SEND(KC_D); SEND(KC_N));
+ P( FUNCT | RT, SEND(KC_RALT); SEND(KC_S); SEND(KC_F));
+ P( FUNCT | RS, SEND(KC_LALT); SEND(KC_SPC));
+ P( FUNCT | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_ESC));
+ P( FUNCT | RU, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_0));
+
+ // Movement Layer
+ P( MOVE | RF, SEND(KC_LGUI); SEND(KC_LSFT); SEND(KC_LEFT));
+ P( MOVE | RP, SEND(KC_UP));
+ P( MOVE | RL, SEND(KC_LGUI); SEND(KC_LSFT); SEND(KC_RGHT));
+ P( MOVE | RT, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_C));
+ P( MOVE | ST3, SEND(KC_PGUP));
+ P( MOVE | ST4, SEND(KC_PGDN));
+ P( MOVE | RD, SEND(KC_HOME));
+ P( MOVE | RZ, SEND(KC_END));
+ P( MOVE | RG, SEND(KC_RIGHT));
+ P( MOVE | RB, SEND(KC_DOWN));
+ P( MOVE | RR, SEND(KC_LEFT));
+ P( MOVE | RS, SEND(KC_LSFT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_T));
+ P( MOVE | RE, SEND(KC_LSFT); SEND(KC_LALT); SEND(KC_LGUI); SEND(KC_S));
+ P( MOVE | RU, SEND(KC_LSFT); SEND(KC_LCTL); SEND(KC_1));
+
+
+ // Media Layer
+ P( MEDIA | RF, SEND(KC_MEDIA_PREV_TRACK));
+ P( MEDIA | RP, SEND(KC_MPLY));
+ P( MEDIA | RL, SEND(KC_MPLY));
+ P( MEDIA | RT, SEND(KC_MEDIA_NEXT_TRACK));
+ P( MEDIA | RD, SEND(KC_VOLU));
+ P( MEDIA | RZ, SEND(KC_VOLD));
+ P( MEDIA | RS, SEND(KC_MUTE));
+ P( MEDIA | ST3, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_4));
+ P( MEDIA | ST4, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_2));
+ P( MEDIA | RR, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_3));
+ P( MEDIA | RB, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_GRV));
+ P( MEDIA | RG, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_8));
+ P( MEDIA | RE, SEND(KC_RALT); SEND(KC_F); SEND(KC_I); SEND(KC_R); SEND(KC_E));
+ P( MEDIA | RU, SEND(KC_RALT); SEND(KC_T); SEND(KC_A); SEND(KC_D));
+
+ // Mouse Keys and Printscreen
+ P( LFT | LH, CLICK_MOUSE(KC_MS_BTN1));
+ P( LK | LR, CLICK_MOUSE(KC_MS_BTN2));
+ P( RF | RT, SEND(KC_PSCR););
+
+ // Number Row Left
+ P( LNO | LSU, SEND(KC_1));
+ P( LNO | LFT, SEND(KC_2));
+ P( LNO | LP, SEND(KC_3));
+ P( LNO | LH, SEND(KC_4));
+ P( LNO | ST1, SEND(KC_5));
+ P( LNO | ST3, SEND(KC_6));
+ P( LNO | RF, SEND(KC_7));
+ P( LNO | RP, SEND(KC_8));
+ P( LNO | RL, SEND(KC_9));
+ P( LNO | RT, SEND(KC_0));
+ P( LNO | LA, SEND(KC_5));
+ P( LNO | RT, SEND(KC_0));
+
+ // Number Row Right
+ P( RNO | LSU, SEND(KC_1));
+ P( RNO | LFT, SEND(KC_2));
+ P( RNO | LP, SEND(KC_3));
+ P( RNO | LH, SEND(KC_4));
+ P( RNO | ST1, SEND(KC_5));
+ P( RNO | ST3, SEND(KC_6));
+ P( RNO | RF, SEND(KC_7));
+ P( RNO | RP, SEND(KC_8));
+ P( RNO | RL, SEND(KC_9));
+ P( RNO | RT, SEND(KC_0));
+ P( RNO | LA, SEND(KC_5));
+ P( RNO | RT, SEND(KC_0));
+
+ // Specials
+ P( LA | LNO, SEND(KC_ESC));
+ P( RU | RNO, SEND(KC_TAB));
+ P( RE | RU, SEND(KC_LSFT); SEND(KC_SLSH));
+ P( RD | RZ, SEND(KC_ENT));
+ P( RE, SEND(KC_ENT));
+ //P( RD, SEND(KC_BSPC));
+ P( LNO, SEND(KC_BSPC));
+ P( RD, SEND(KC_DEL));
+ P( LA, SEND(KC_SPC));
+ P( RU, SEND(KC_SPC));
+ P( RZ, SEND(KC_ESC));
+ //P( RNO, REPEAT());
+
+ // Letters
+ P( LSU | LSD, SEND(KC_A));
+ P( LFT | LK, SEND(KC_S));
+ P( LP | LW, SEND(KC_E));
+ P( LH | LR, SEND(KC_T));
+ P( ST1 | ST2, SEND(KC_G));
+ P( ST3 | ST4, SEND(KC_Y));
+ P( RF | RR, SEND(KC_N));
+ P( RT | RS, SEND(KC_H))
+ P( RG | RL, SEND(KC_O));
+ P( RP | RB, SEND(KC_I));
+ P( LSU, SEND(KC_Q));
+ P( LSD, SEND(KC_Z));
+ P( LFT, SEND(KC_W));
+ P( LK, SEND(KC_X));
+ P( LP, SEND(KC_D));
+ P( LW, SEND(KC_C));
+ P( LH, SEND(KC_F));
+ P( LR, SEND(KC_V));
+ P( ST1, SEND(KC_K));
+ P( ST2, SEND(KC_B));
+ P( ST3, SEND(KC_J));
+ P( ST4, SEND(KC_P));
+ P( RF, SEND(KC_U));
+ P( RR, SEND(KC_M));
+ P( RP, SEND(KC_R));
+ P( RB, SEND(KC_COMM));
+ P( RL, SEND(KC_L));
+ P( RG, SEND(KC_DOT));
+ P( RT, SEND(KC_SCLN));
+ P( RS, SEND(KC_SLSH));
+
+ // Symbols and Numbers
+ P( PWR | RE | RU, SEND(KC_ENT));
+ P( PWR | LA | LO, SEND(KC_SPC));
+ P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
+ P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
+ P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
+ P( PWR | RD | RZ, SEND(KC_ESC));
+ P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
+ P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
+ P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
+ P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
+ P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
+ P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
+ P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
+ P( PWR | LW, SEND(KC_LBRC));
+ P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
+ P( PWR | LR, SEND(KC_RBRC));
+ P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
+ P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
+ P( PWR | ST3, SEND(KC_QUOT));
+ P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
+ P( PWR | RF, SEND(KC_KP_PLUS));
+ P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
+ P( PWR | RP, SEND(KC_MINS));
+ P( PWR | RB, SEND(KC_EQL));
+ P( PWR | RL, SEND(KC_SLSH));
+ P( PWR | RG, SEND(KC_LSFT); SEND(KC_MINS));
+ P( PWR | RT, SEND(KC_PAST));
+ P( PWR | RS, SEND(KC_DOT));
+ P( PWR | RD, SEND(KC_TAB));
+ P( PWR | LA, SEND(KC_LSFT); SEND(KC_SCLN));
+ P( PWR | LO, SEND(KC_BSLS));
+ P( PWR | RE, SEND(KC_SCLN));
+ P( PWR | RU, SEND(KC_BSLS));
+ P( PWR | RZ, SEND(KC_LSFT));
+
+ return 0;
+}
+
+#define STENO_LAYER 0
+#define GAMING 1
+#define GAMING_2 2
+#define MOVEMENT 3
+
+// "Layers"
+// Steno layer should be first in your map.
+// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
+// If you need more space for chords, remove the two gaming layers.
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+// Main layer, everything goes through here
+[STENO_LAYER] = LAYOUT_georgi(
+STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7)
+,
+// Gaming layer with Numpad, Very limited
+[GAMING] = LAYOUT_georgi(
+KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
+KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO,
+KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER)),
+
+[GAMING_2] = LAYOUT_georgi(
+KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT,
+ KC_LALT, KC_SPC, KC_NO, KC_DEL, KC_ASTR, TO(STENO_LAYER)),
+
+[MOVEMENT] = LAYOUT_georgi(
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_PGUP, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_HOME,
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_END,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+};
+// Don't fuck with this, thanks.
+size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
diff --git a/keyboards/georgi/keymaps/norman/readme.md b/keyboards/georgi/keymaps/norman/readme.md
new file mode 100644
index 00000000000..f9da34b0245
--- /dev/null
+++ b/keyboards/georgi/keymaps/norman/readme.md
@@ -0,0 +1,11 @@
+# Georgi QWERTY/Steno firmware
+
+This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout.
+It is both a ergonomic and programmer friendly keymap.
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
+
+## Space issues
+If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save
+you about 4k for entries!
+Get a free 1k by deleting the Gaming layers from the keymap!
diff --git a/keyboards/georgi/keymaps/template/rules.mk b/keyboards/georgi/keymaps/norman/rules.mk
similarity index 61%
rename from keyboards/georgi/keymaps/template/rules.mk
rename to keyboards/georgi/keymaps/norman/rules.mk
index 1178fd80db1..bb97bef2815 100644
--- a/keyboards/georgi/keymaps/template/rules.mk
+++ b/keyboards/georgi/keymaps/norman/rules.mk
@@ -1,18 +1,20 @@
#----------------------------------------------------------------------------
-# make georgi:extrakey:dfu
+# make georgi:default:dfu
# Make sure you have dfu-programmer installed!
#----------------------------------------------------------------------------
-#Debug options
+NO_REPEAT = yes
VERBOSE = yes
-CONSOLE_ENABLE = yes
-DEBUG_MATRIX_SCAN_RATE = no
-DEBUG_MATRIX = no
KEYBOARD_SHARED_EP = yes
CUSTOM_MATRIX = yes
-MOUSEKEY_ENABLE = no
-SINGLE_LAYER = no
+MOUSEKEY_ENABLE = yes
+#Debug options
+CONSOLE_ENABLE = no
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = no
+NO_PRINT = yes
+ONLY_QWERTY = no
# A bunch of stuff that you shouldn't touch unless you
# know what you're doing.
@@ -22,6 +24,12 @@ SRC += matrix.c i2c_master.c
ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif
-ifeq ($(strip $(SINGLE_LAYER)), yes)
- OPT_DEFS += -DSINGLE_LAYER
+ifeq ($(strip $(NO_REPEAT)), yes)
+ OPT_DEFS += -DNO_REPEAT
+endif
+ifeq ($(strip $(NO_PRINT)), yes)
+ OPT_DEFS += -DNO_PRINT -DNO_DEBUG
+endif
+ifeq ($(strip $(ONLY_QWERTY)), yes)
+ OPT_DEFS += -DONLYQWERTY
endif
diff --git a/keyboards/georgi/keymaps/template/keymap.c b/keyboards/georgi/keymaps/template/keymap.c
deleted file mode 100644
index b17d7ed9f7e..00000000000
--- a/keyboards/georgi/keymaps/template/keymap.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Good on you for modifying your layout, this is the most nonQMK layout you will come across
- * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer
- *
- * Don't modify the steno layer directly, instead add chords using the keycodes and macros
- * from sten.h to the layout you want to modify.
- *
- * Observe the comment above processQWERTY!
- *
- * http://docs.gboards.ca
- */
-
-#include QMK_KEYBOARD_H
-#include "sten.h"
-#include "keymap_steno.h"
-#define IGNORE_MOD_TAP_INTERRUPT
-
-int getKeymapCount(void);
-
-// Proper Layers
-#define FUNCT (LSD | LK | LP | LH)
-#define MEDIA (LSD | LK | LW | LR)
-#define MOVE (ST1 | ST2)
-
-/* Keyboard Layout
- * ,---------------------------------. ,------------------------------.
- * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD |
- * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----|
- * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RG | RB | RS | RZ |
- * `---------------------------------' `------------------------------'
- * ,---------------, .---------------.
- * | NUM | LA | LO | | RE | RU | NUM |
- * `---------------' `---------------'
- */
-
-// YOU MUST ORDER THIS!
-// P Will return from processing on the first match it finds. Therefore
-// PJ Will run the requested action, remove the matched chord and continue
-//
-// First any chords that would conflict with PJs need to be checked, then PJs, lastly Ps.
-// For all chords should be ordered by length in their section!
-//
-// http://docs.gboards.ca
-bool processQwerty(void) {
- // Place P's that would be trashed by PJ's here
- P( RT | RS | RD | RZ | NUM, SEND_STRING(VERSION); SEND_STRING(__DATE__));
- P( NUM | LA | LO | RE | RU, SEND(KC_MPLY));
- P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC));
-
- // Thumb Chords
- P( LA | LO | RE | RU, SEND(KC_CAPS));
- P( LA | RU, SEND(KC_ESC));
- PJ( LO | RE, SEND(KC_LCTL));
- PJ( NUM | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
- PJ( NUM | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
-
- // Mods
- PJ( RT | RD | RS | RZ, SEND(KC_LGUI));
- PJ( RT | RD, SEND(KC_LCTL));
- PJ( RS | RZ, SEND(KC_LALT));
- PJ( LA | NUM, SEND(KC_LCTL));
- PJ( LA | LO, SEND(KC_LALT));
- PJ( LO, SEND(KC_LSFT));
-
- // Function Layer
- P( FUNCT | RF | RR, SEND(KC_F5));
- P( FUNCT | RP | RB, SEND(KC_F6));
- P( FUNCT | RL | RG, SEND(KC_F7));
- P( FUNCT | RT | RS, SEND(KC_F8));
- P( FUNCT | RF, SEND(KC_F1));
- P( FUNCT | RP, SEND(KC_F2));
- P( FUNCT | RL, SEND(KC_F3));
- P( FUNCT | RT, SEND(KC_F4));
- P( FUNCT | RR, SEND(KC_F9));
- P( FUNCT | RG, SEND(KC_F10));
- P( FUNCT | RB, SEND(KC_F11));
- P( FUNCT | RS, SEND(KC_F12));
-
- // Movement Layer
- P( MOVE | RF, SEND(KC_LEFT));
- P( MOVE | RP, SEND(KC_DOWN));
- P( MOVE | RL, SEND(KC_UP));
- P( MOVE | RT, SEND(KC_RIGHT));
- P( MOVE | ST3, SEND(KC_PGUP));
- P( MOVE | ST4, SEND(KC_PGDN));
-
- // Media Layer
- P( MEDIA | RF, SEND(KC_MPRV));
- P( MEDIA | RP, SEND(KC_MPLY));
- P( MEDIA | RL, SEND(KC_MPLY));
- P( MEDIA | RT, SEND(KC_MNXT));
- P( MEDIA | RD, SEND(KC_VOLU));
- P( MEDIA | RZ, SEND(KC_VOLD));
- P( MEDIA | RS, SEND(KC_MUTE));
-
- // Mouse Keys
- P( LP | LH, clickMouse(KC_MS_BTN1));
- P( LW | LR, clickMouse(KC_MS_BTN2));
-
- // Number Row
- P( NUM | LSU, SEND(KC_1));
- P( NUM | LFT, SEND(KC_2));
- P( NUM | LP, SEND(KC_3));
- P( NUM | LH, SEND(KC_4));
- P( NUM | ST1, SEND(KC_5));
- P( NUM | ST3, SEND(KC_6));
- P( NUM | RF, SEND(KC_7));
- P( NUM | RP, SEND(KC_8));
- P( NUM | RL, SEND(KC_9));
- P( NUM | RT, SEND(KC_0));
- P( NUM | LA, SEND(KC_5));
- P( NUM | RT, SEND(KC_0));
-
- // Specials
- P( LA | NUM, SEND(KC_ESC));
- P( RU | NUM, SEND(KC_TAB));
- P( RE | RU, SEND(KC_BSPC));
- P( RD | RZ, SEND(KC_ENT));
- P( RE, SEND(KC_ENT));
- P( RD, SEND(KC_BSPC));
- P( NUM, SEND(KC_BSPC));
- P( LA, SEND(KC_SPC));
- P( RU, SEND(KC_SPC));
- P( RZ, SEND(KC_ESC));
-
- // Letters
- P( LSU | LSD, SEND(KC_A));
- P( LFT | LK, SEND(KC_S));
- P( LP | LW, SEND(KC_D));
- P( LH | LR, SEND(KC_F));
- P( ST1 | ST2, SEND(KC_G));
- P( ST3 | ST4, SEND(KC_H));
- P( RF | RR, SEND(KC_J));
- P( RT | RS, SEND(KC_SCLN))
- P( RG | RL, SEND(KC_L));
- P( RP | RB, SEND(KC_K));
- P( LSU, SEND(KC_Q));
- P( LSD, SEND(KC_Z));
- P( LFT, SEND(KC_W));
- P( LK, SEND(KC_X));
- P( LP, SEND(KC_E));
- P( LW, SEND(KC_C));
- P( LH, SEND(KC_R));
- P( LR, SEND(KC_V));
- P( ST1, SEND(KC_T));
- P( ST2, SEND(KC_B));
- P( ST3, SEND(KC_Y));
- P( ST4, SEND(KC_N));
- P( RF, SEND(KC_U));
- P( RR, SEND(KC_M));
- P( RP, SEND(KC_I));
- P( RB, SEND(KC_COMM));
- P( RL, SEND(KC_O));
- P( RG, SEND(KC_DOT));
- P( RT, SEND(KC_P));
- P( RS, SEND(KC_SLSH));
-
- // Symbols and Numbers
- P( PWR | RE | RU, SEND(KC_ENT));
- P( PWR | LA | LO, SEND(KC_SPC));
- P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
- P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
- P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
- P( PWR | RD | RZ, SEND(KC_ESC));
- P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
- P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
- P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
- P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
- P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
- P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
- P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
- P( PWR | LW, SEND(KC_LBRC));
- P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
- P( PWR | LR, SEND(KC_RBRC));
- P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
- P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
- P( PWR | ST3, SEND(KC_QUOT));
- P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
- P( PWR | RF, SEND(KC_KP_PLUS));
- P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
- P( PWR | RP, SEND(KC_MINS));
- P( PWR | RB, SEND(KC_EQL));
- P( PWR | RL, SEND(KC_SLSH));
- P( PWR | RG, SEND(KC_COMM));
- P( PWR | RT, SEND(KC_PAST));
- P( PWR | RS, SEND(KC_DOT));
- P( PWR | RD, SEND(KC_TAB));
- P( PWR | LA, SEND(KC_SCLN));
- P( PWR | LO, SEND(KC_SLSH));
- P( PWR | RE, SEND(KC_SCLN));
- P( PWR | RU, SEND(KC_SLSH));
-
-
- // If we make here, send as a steno chord
- // If plover is running we can hook that host side
- return false;
-}
-
-#define STENO_LAYER 0
-
-// "Layers"
-// Steno layer should be first in your map.
-// When PWR | FN | RR | RG | RB | RS is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
-// If you have only a single layer, you must set SINGLELAYER = yes in your rules.mk, otherwise you may experince undefined behaviour
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-// Main layer, everything goes through here
-[STENO_LAYER] = LAYOUT_georgi(
-STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
-STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
- STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N1)
-};
-
-int getKeymapCount(void) {
- return sizeof(keymaps)/sizeof(keymaps[0]);
-}
diff --git a/keyboards/georgi/keymaps/template/readme.md b/keyboards/georgi/keymaps/template/readme.md
deleted file mode 100644
index 7c6fc351232..00000000000
--- a/keyboards/georgi/keymaps/template/readme.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Georgi QWERTY/Steno firmware
-
-This is a blank template configured with 5K of free space for your onboard dictionary!
-Read the docs over at [gBoards](http://docs.gboards.ca)
-
-Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
diff --git a/keyboards/georgi/readme.md b/keyboards/georgi/readme.md
index 03e2e3d83d5..d8699488364 100644
--- a/keyboards/georgi/readme.md
+++ b/keyboards/georgi/readme.md
@@ -21,8 +21,11 @@ To just test your build with the default keymap
Build options can be enabled/disabled in keyboards/georgi/keymaps/default/rules.mk . Copy the default directory and make any changes to your layout, if you think they're worth sharing submit a PR!
+## Documentation
+Is hosted over on [docs.gboards.ca](http://docs.gboards.ca/). Please take a look at the docs for customizing your firmware!
+
# Space
-The stock firmware uses nearly all of the flash avalible. For custom dictionary modifications, disable mousekeys in your keymaps rules.mk (4K of space) and remove the Gaming layers. I've done this already in the provided keymap 'template'.
+The stock firmware leaves 7K free for custom entries. For extra space disable mousekeys in your keymaps rules.mk (3K of space) and remove the Gaming layers (1k).
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/georgi/rules.mk b/keyboards/georgi/rules.mk
index 0f730f3b736..a87b448e349 100644
--- a/keyboards/georgi/rules.mk
+++ b/keyboards/georgi/rules.mk
@@ -4,7 +4,7 @@
# Do not edit this file! Make a copy of keymaps/default and modify that!
#----------------------------------------------------------------------------
# Source includes
-SRC += matrix.c i2c_master.c
+SRC += matrix.c i2c_master.c sten.c
# Hardware info
MCU = atmega32u4
@@ -15,8 +15,9 @@ F_USB = $(F_CPU)
EXTRAFLAGS += -flto
CUSTOM_MATRIX = yes
+MOUSEKEY_ENABLE = no
STENO_ENABLE = yes
EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
+CONSOLE_ENABLE = yes
COMMAND_ENABLE = no
NKRO_ENABLE = yes
diff --git a/keyboards/georgi/sten.c b/keyboards/georgi/sten.c
index 3b33b11d6ec..1a84c7893f1 100644
--- a/keyboards/georgi/sten.c
+++ b/keyboards/georgi/sten.c
@@ -1,2 +1,406 @@
-#include "sten.h"
+#include "sten.h"
+// Chord state
+uint32_t cChord = 0; // Current Chord
+int chordIndex = 0; // Keys in previousachord
+int32_t chordState[32]; // Full Chord history
+#define QWERBUF 24 // Size of chords to buffer for output
+
+bool repeatFlag = false; // Should we repeat?
+uint32_t pChord = 0; // Previous Chord
+int pChordIndex = 0; // Keys in previousachord
+uint32_t pChordState[32]; // Previous chord sate
+uint32_t stickyBits = 0; // Or'd with every incoming press
+
+// Mode state
+enum MODE { STENO = 0, QWERTY, COMMAND };
+enum MODE pMode;
+bool QWERSTENO = false;
+#ifdef ONLYQWERTY
+enum MODE cMode = QWERTY;
+#else
+enum MODE cMode = STENO;
+#endif
+
+// Command State
+#define MAX_CMD_BUF 20
+uint8_t CMDLEN = 0;
+uint8_t CMDBUF[MAX_CMD_BUF];
+
+// Key Repeat state
+bool inChord = false;
+bool repEngaged = false;
+uint16_t repTimer = 0;
+#define REP_INIT_DELAY 750
+#define REP_DELAY 25
+
+// Mousekeys state
+bool inMouse = false;
+int8_t mousePress;
+
+// All processing done at chordUp goes through here
+bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
+ // Check for mousekeys, this is release
+#ifdef MOUSEKEY_ENABLE
+ if (inMouse) {
+ inMouse = false;
+ mousekey_off(mousePress);
+ mousekey_send();
+ }
+#endif
+
+ // Toggle Serial/QWERTY steno
+ if (cChord == (PWR | FN | ST1 | ST2)) {
+#ifndef NO_DEBUG
+ uprintf("Fallback Toggle\n");
+#endif
+ QWERSTENO = !QWERSTENO;
+
+ goto out;
+ }
+
+ // handle command mode
+ if (cChord == (PWR | FN | RD | RZ)) {
+#ifndef NO_DEBUG
+ uprintf("COMMAND Toggle\n");
+#endif
+ if (cMode != COMMAND) { // Entering Command Mode
+ CMDLEN = 0;
+ pMode = cMode;
+ cMode = COMMAND;
+ } else { // Exiting Command Mode
+ cMode = pMode;
+
+ // Press all and release all
+ for (int i = 0; i < CMDLEN; i++) {
+ register_code(CMDBUF[i]);
+ }
+ clear_keyboard();
+ }
+
+ goto out;
+ }
+
+ // Handle Gaming Toggle,
+ if (cChord == (PWR | FN | ST4 | ST3) && keymapsCount > 1) {
+#ifndef NO_DEBUG
+ uprintf("Switching to QMK\n");
+#endif
+ layer_on(1);
+ goto out;
+ }
+
+ // Lone FN press, toggle QWERTY
+#ifndef ONLYQWERTY
+ if (cChord == FN) {
+ (cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO);
+ goto out;
+ }
+#endif
+
+ // Check for Plover momentary
+ if (cMode == QWERTY && (cChord & FN)) {
+ cChord ^= FN;
+ goto steno;
+ }
+
+ // Do QWERTY and Momentary QWERTY
+ if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) {
+ processChord(false);
+ goto out;
+ }
+
+ // Fallback NKRO Steno
+ if (cMode == STENO && QWERSTENO) {
+ processChord(true);
+ goto out;
+ }
+
+steno:
+ // Hey that's a steno chord!
+ inChord = false;
+ chordIndex = 0;
+ cChord = 0;
+ return true;
+
+out:
+ cChord = 0;
+ inChord = false;
+ chordIndex = 0;
+ clear_keyboard();
+ repEngaged = false;
+ for (int i = 0; i < 32; i++)
+ chordState[i] = 0xFFFF;
+
+ return false;
+}
+
+// Update Chord State
+bool process_steno_user(uint16_t keycode, keyrecord_t *record) {
+ // Everything happens in here when steno keys come in.
+ // Bail on keyup
+ if (!record->event.pressed) return true;
+
+ // Update key repeat timers
+ repTimer = timer_read();
+ inChord = true;
+
+ // Switch on the press adding to chord
+ bool pr = record->event.pressed;
+ switch (keycode) {
+ // Mods and stuff
+ case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break;
+ case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break;
+ case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break;
+ case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break;
+ case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break;
+ case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break;
+ case STN_N1...STN_N6: pr ? (cChord |= (LNO)): (cChord &= ~(LNO)); break;
+ case STN_N7...STN_NC: pr ? (cChord |= (RNO)): (cChord &= ~(RNO)); break;
+
+ // All the letter keys
+ case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break;
+ case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break;
+ case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break;
+ case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break;
+ case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break;
+ case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break;
+ case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break;
+ case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break;
+ case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break;
+ case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break;
+ case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break;
+ case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break;
+ case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break;
+ case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break;
+ case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break;
+ case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break;
+ case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break;
+ case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break;
+ case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break;
+ case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break;
+ case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break;
+ case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break;
+ }
+
+ // Store previous state for fastQWER
+ if (pr) {
+ chordState[chordIndex] = cChord;
+ chordIndex++;
+ }
+
+ return true;
+}
+void matrix_scan_user(void) {
+ // We abuse this for early sending of key
+ // Key repeat only on QWER/SYMB layers
+ if (cMode != QWERTY || !inChord) return;
+
+ // Check timers
+#ifndef NO_REPEAT
+ if (repEngaged && timer_elapsed(repTimer) > REP_DELAY) {
+ // Process Key for report
+ processChord(false);
+
+ // Send report to host
+ send_keyboard_report();
+ clear_keyboard();
+ repTimer = timer_read();
+ }
+
+ if (!repEngaged && timer_elapsed(repTimer) > REP_INIT_DELAY) {
+ repEngaged = true;
+ }
+#endif
+};
+
+// For Plover NKRO
+uint32_t processFakeSteno(bool lookup) {
+ P( LSU, SEND(KC_Q););
+ P( LSD, SEND(KC_A););
+ P( LFT, SEND(KC_W););
+ P( LP, SEND(KC_E););
+ P( LH, SEND(KC_R););
+ P( LK, SEND(KC_S););
+ P( LW, SEND(KC_D););
+ P( LR, SEND(KC_F););
+ P( ST1, SEND(KC_T););
+ P( ST2, SEND(KC_G););
+ P( LA, SEND(KC_C););
+ P( LO, SEND(KC_V););
+ P( RE, SEND(KC_N););
+ P( RU, SEND(KC_M););
+ P( ST3, SEND(KC_Y););
+ P( ST4, SEND(KC_H););
+ P( RF, SEND(KC_U););
+ P( RP, SEND(KC_I););
+ P( RL, SEND(KC_O););
+ P( RT, SEND(KC_P););
+ P( RD, SEND(KC_LBRC););
+ P( RR, SEND(KC_J););
+ P( RB, SEND(KC_K););
+ P( RG, SEND(KC_L););
+ P( RS, SEND(KC_SCLN););
+ P( RZ, SEND(KC_COMM););
+ P( LNO, SEND(KC_1););
+ P( RNO, SEND(KC_1););
+
+ return 0;
+}
+
+// Traverse the chord history to a given point
+// Returns the mask to use
+void processChord(bool useFakeSteno) {
+ // Save the clean chord state
+ uint32_t savedChord = cChord;
+
+ // Apply Stick Bits if needed
+ if (stickyBits != 0) {
+ cChord |= stickyBits;
+ for (int i = 0; i <= chordIndex; i++)
+ chordState[i] |= stickyBits;
+ }
+
+ // Strip FN
+ if (cChord & FN) cChord ^= FN;
+
+ // First we test if a whole chord was passsed
+ // If so we just run it handling repeat logic
+ if (useFakeSteno && processFakeSteno(true) == cChord) {
+ processFakeSteno(false);
+ return;
+ } else if (processQwerty(true) == cChord) {
+ processQwerty(false);
+ // Repeat logic
+ if (repeatFlag) {
+ restoreState();
+ repeatFlag = false;
+ processChord(false);
+ } else {
+ saveState(cChord);
+ }
+ return;
+ }
+
+ // Iterate through chord picking out the individual
+ // and longest chords
+ uint32_t bufChords[QWERBUF];
+ int bufLen = 0;
+ uint32_t mask = 0;
+
+ // We iterate over it multiple times to catch the longest
+ // chord. Then that gets addded to the mask and re run.
+ while (savedChord != mask) {
+ uint32_t test = 0;
+ uint32_t longestChord = 0;
+
+ for (int i = 0; i <= chordIndex; i++) {
+ cChord = chordState[i] & ~mask;
+ if (cChord == 0)
+ continue;
+
+ // Assume mid parse Sym is new chord
+ if (i != 0 && test != 0 && (cChord ^ test) == PWR) {
+ longestChord = test;
+ break;
+ }
+
+ // Lock SYM layer in once detected
+ if (mask & PWR)
+ cChord |= PWR;
+
+
+ // Testing for keycodes
+ if (useFakeSteno) {
+ test = processFakeSteno(true);
+ } else {
+ test = processQwerty(true);
+ }
+
+ if (test != 0) {
+ longestChord = test;
+ }
+ }
+
+ mask |= longestChord;
+ bufChords[bufLen] = longestChord;
+ bufLen++;
+
+ // That's a loop of sorts, halt processing
+ if (bufLen >= QWERBUF) {
+ return;
+ }
+ }
+
+ // Now that the buffer is populated, we run it
+ for (int i = 0; i < bufLen ; i++) {
+ cChord = bufChords[i];
+ if (useFakeSteno) {
+ processFakeSteno(false);
+ } else {
+ processQwerty(false);
+ }
+ }
+
+ // Save state in case of repeat
+ if (!repeatFlag) {
+ saveState(savedChord);
+ }
+
+ // Restore cChord for held repeat
+ cChord = savedChord;
+
+ return;
+}
+void saveState(uint32_t cleanChord) {
+ pChord = cleanChord;
+ pChordIndex = chordIndex;
+ for (int i = 0; i < 32; i++)
+ pChordState[i] = chordState[i];
+}
+void restoreState() {
+ cChord = pChord;
+ chordIndex = pChordIndex;
+ for (int i = 0; i < 32; i++)
+ chordState[i] = pChordState[i];
+}
+
+// Macros for calling from keymap.c
+void SEND(uint8_t kc) {
+ // Send Keycode, Does not work for Quantum Codes
+ if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) {
+#ifndef NO_DEBUG
+ uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF);
+#endif
+ CMDBUF[CMDLEN] = kc;
+ CMDLEN++;
+ }
+
+ if (cMode != COMMAND) register_code(kc);
+ return;
+}
+void REPEAT(void) {
+ if (cMode != QWERTY)
+ return;
+
+ repeatFlag = true;
+ return;
+}
+void SET_STICKY(uint32_t stick) {
+ stickyBits = stick;
+ return;
+}
+void SWITCH_LAYER(int layer) {
+ if (keymapsCount >= layer)
+ layer_on(layer);
+}
+void CLICK_MOUSE(uint8_t kc) {
+#ifdef MOUSEKEY_ENABLE
+ mousekey_on(kc);
+ mousekey_send();
+
+ // Store state for later use
+ inMouse = true;
+ mousePress = kc;
+#endif
+}
diff --git a/keyboards/georgi/sten.h b/keyboards/georgi/sten.h
index fee05deca3a..5a9771d9a02 100644
--- a/keyboards/georgi/sten.h
+++ b/keyboards/georgi/sten.h
@@ -1,28 +1,43 @@
// 2019, g Heavy Industries
+// Blessed mother of Christ, please keep this readable
+// and protect us from segfaults. For thine is the clock,
+// the slave and the master. Until we return from main.
+//
+// Amen.
#include QMK_KEYBOARD_H
#include "mousekey.h"
#include "keymap.h"
#include "keymap_steno.h"
+#include "wait.h"
-// Bitfield representing the current chord
-uint32_t cChord = 0;
+extern size_t keymapsCount; // Total keymaps
+extern uint32_t cChord; // Current Chord
-// See if a given chord is pressed.
-// P will return
-// PJ will continue processing, removing the found chord
-#define P(chord, act) if (cChord == (chord)) { act; return true; }
-#define PJ(chord, act) if ((cChord & (chord)) == (chord)) { cChord ^= chord; act; }
+// Function defs
+void processChord(bool useFakeSteno);
+uint32_t processQwerty(bool lookup);
+uint32_t processFakeSteno(bool lookup);
+void saveState(uint32_t cChord);
+void restoreState(void);
+
+// Macros for use in keymap.c
+void SEND(uint8_t kc);
+void REPEAT(void);
+void SET_STICKY(uint32_t);
+void SWITCH_LAYER(int);
+void CLICK_MOUSE(uint8_t);
+
+// Keymap helper
+#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
-// All Steno Codes
// Shift to internal representation
+// i.e) S(teno)R(ight)F
#define STN(n) (1L< 1) {
- uprintf("Switching to QMK\n");
- layer_on(1);
- goto out;
- }
-
- // Lone FN press, toggle QWERTY
- if (cChord == FN) {
- (cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO);
- goto out;
- }
-
- // Check for Plover momentary
- if (cMode == QWERTY && (cChord & FN)) {
- cChord ^= FN;
- goto steno;
- }
-
- // Do QWERTY and Momentary QWERTY
- if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) {
- if (cChord & FN) cChord ^= FN;
- processQwerty();
- goto out;
- }
-
- // Fallback NKRO Steno
- if (cMode == STENO && QWERSTENO) {
- processFakeSteno();
- goto out;
- }
-
-steno:
- // Hey that's a steno chord!
- inChord = false;
- cChord = 0;
- return true;
-
-out:
- inChord = false;
- clear_keyboard();
- cChord = 0;
- return false;
-}
-
-// Update Chord State
-bool process_steno_user(uint16_t keycode, keyrecord_t *record) {
- // Everything happens in here when steno keys come in.
- // Bail on keyup
- if (!record->event.pressed) return true;
-
- // Update key repeat timers
- repTimer = timer_read();
- inChord = true;
-
- // Switch on the press adding to chord
- bool pr = record->event.pressed;
- switch (keycode) {
- // Mods and stuff
- case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break;
- case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break;
- case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break;
- case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break;
- case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break;
- case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break;
- case STN_N1...STN_N6:
- case STN_N7...STN_NC: pr ? (cChord |= (NUM)): (cChord &= ~(NUM)); break;
-
- // All the letter keys
- case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break;
- case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break;
- case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break;
- case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break;
- case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break;
- case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break;
- case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break;
- case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break;
- case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break;
- case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break;
- case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break;
- case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break;
- case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break;
- case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break;
- case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break;
- case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break;
- case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break;
- case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break;
- case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break;
- case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break;
- case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break;
- case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break;
- }
-
- // Check for key repeat in QWERTY mode
- return true;
-}
-void matrix_scan_user(void) {
- // We abuse this for early sending of key
- // Key repeat only on QWER/SYMB layers
- if (cMode != QWERTY) return;
-
- // Check timers
- if (timer_elapsed(repTimer) > REP_DELAY) {
- // Process Key for report
- processQwerty();
-
- // Send report to host
- send_keyboard_report();
- repTimer = timer_read();
- }
-};
-
-// Helpers
-bool processFakeSteno(void) {
- PJ( LSU, SEND(KC_Q););
- PJ( LSD, SEND(KC_A););
- PJ( LFT, SEND(KC_W););
- PJ( LP, SEND(KC_E););
- PJ( LH, SEND(KC_R););
- PJ( LK, SEND(KC_S););
- PJ( LW, SEND(KC_D););
- PJ( LR, SEND(KC_F););
- PJ( ST1, SEND(KC_T););
- PJ( ST2, SEND(KC_G););
- PJ( LA, SEND(KC_C););
- PJ( LO, SEND(KC_V););
- PJ( RE, SEND(KC_N););
- PJ( RU, SEND(KC_M););
- PJ( ST3, SEND(KC_Y););
- PJ( ST4, SEND(KC_H););
- PJ( RF, SEND(KC_U););
- PJ( RP, SEND(KC_I););
- PJ( RL, SEND(KC_O););
- PJ( RT, SEND(KC_P););
- PJ( RD, SEND(KC_LBRC););
- PJ( RR, SEND(KC_J););
- PJ( RB, SEND(KC_K););
- PJ( RG, SEND(KC_L););
- PJ( RS, SEND(KC_SCLN););
- PJ( RZ, SEND(KC_COMM););
- PJ( NUM, SEND(KC_1););
-
- return false;
-}
-void clickMouse(uint8_t kc) {
-#ifdef MOUSEKEY_ENABLE
- mousekey_on(kc);
- mousekey_send();
-
- // Store state for later use
- inMouse = true;
- mousePress = kc;
-#endif
-}
-void SEND(uint8_t kc) {
- // Send Keycode, Does not work for Quantum Codes
- if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) {
- uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF);
- CMDBUF[CMDLEN] = kc;
- CMDLEN++;
- }
-
- if (cMode != COMMAND) register_code(kc);
- return;
-}
diff --git a/keyboards/gergo/info.json b/keyboards/gergo/info.json
index 71dcca40fcd..cacbda42390 100644
--- a/keyboards/gergo/info.json
+++ b/keyboards/gergo/info.json
@@ -1,6 +1,6 @@
{
"maintainer": "germ",
- "height": 4.75,
+ "height": 5.75,
"width": 19.5,
"keyboard_name": "Gergo",
"url": "http://gboards.ca",
diff --git a/keyboards/gergo/keymaps/default/rules.mk b/keyboards/gergo/keymaps/default/rules.mk
index 2f825a76639..507cc97b7b6 100644
--- a/keyboards/gergo/keymaps/default/rules.mk
+++ b/keyboards/gergo/keymaps/default/rules.mk
@@ -12,7 +12,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
VERBOSE = yes
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_BALLER = no
-DEBUG_MATRIX = no
+DEBUG_MATRIX = yes
# A bunch of stuff that you shouldn't touch unless you
# know what you're doing.
diff --git a/keyboards/gergo/keymaps/germ/keymap.c b/keyboards/gergo/keymaps/germ/keymap.c
new file mode 100644
index 00000000000..fabd945fef6
--- /dev/null
+++ b/keyboards/gergo/keymaps/germ/keymap.c
@@ -0,0 +1,151 @@
+/* Good on you for modifying your layout! if you don't have
+ * time to read the QMK docs, a list of keycodes can be found at
+ *
+ * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
+ *
+ * There's also a template for adding new layers at the bottom of this file!
+ */
+
+#include QMK_KEYBOARD_H
+
+#define IGNORE_MOD_TAP_INTERRUPT
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define NUMB 2 // numbers/motion
+
+// Blank template at the bottom
+
+enum customKeycodes {
+ URL = 1
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | L1/ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * |Ctrl/BS | A | S | D | F | G | RMB | | | H | J | K | L | ; : | ' " |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | LShift | Z | X | C | V | B | LMB | | | N | M | , < | . > | / ? | - _ |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .----------. .-------. .------. .-----.
+ * | Super/Del| |Ent/ALT| | Tab | |BKSP |
+ * '----------' '-------' `------. '-----'
+ * ,-------. ,-------.
+ * | MMB | | PgDn |
+ * ,------|-------| |-------|------.
+ * | SYMB | NUMB | | SYMB | NUMB |
+ * | Space| Escape| | Mod |Space |
+ * | | | | | |
+ * `--------------' `--------------'
+ */
+[BASE] = LAYOUT_GERGO(
+LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
+MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
+
+ MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), KC_TAB, KC_BSPC,
+
+ KC_BTN3, KC_PGDN,
+ LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC)),
+/* Keymap 1: Symbols layer
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | | ! | @ | { | } | | | | | | | | | \ | |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * | | # | $ | ( | ) | ` | | | | + | - | / | * | % | ' " |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | | % | ^ | [ | ] | ~ | | | | & | = | , | . | / ? | - _ |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .------. .------. .------. .-----.
+ * | | | | | | | DEL |
+ * '------' '------' `------. '-----'
+ * ,-------. ,-------.
+ * | | | PgUp |
+ * ,------|-------| |-------|------.
+ * | | | | | |
+ * | ; | = | | = | ; |
+ * | | | | | |
+ * `--------------' `--------------'
+ */
+[SYMB] = LAYOUT_GERGO(
+KC_TRNS, KC_EXLM, KC_AT, KC_LCBR,KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS,
+KC_TRNS, KC_HASH, KC_DLR, KC_LPRN,KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
+KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
+
+ KC_TRNS, KC_TRNS, KC_PGUP, KC_DEL,
+ KC_TRNS, KC_TRNS,
+ KC_SCLN, KC_EQL, KC_EQL, KC_SCLN),
+/* Keymap 2: Pad/Function layer
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | | LEFT | DOWN | UP | RIGHT|VolDn | VolUp |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT|Ply/Pa| Skip |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .------. .------. .------. .-----.
+ * | | | | | | | |
+ * '------' '------' `------. '-----'
+ * ,-------. ,-------.
+ * | | | PgUp |
+ * ,------|-------| |-------|------.
+ * | | | | | |
+ * | | | | | |
+ * | | | | | |
+ * `--------------' `--------------'
+ */
+[NUMB] = LAYOUT_GERGO(
+KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU,
+KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT,
+
+ KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+};
+
+/* Keymap template
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * | | | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | | | | | | | | | | | | | | | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .------. .------. .------. .-----.
+ * | | | | | | | |
+ * '------' '------' `------. '-----'
+ * ,-------. ,-------.
+ * | | | |
+ * ,------|-------| |-------|------.
+ * | | | | | |
+ * | | | | | |
+ * | | | | | |
+ * `--------------' `--------------'
+[SYMB] = LAYOUT_GERGO(
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+ */
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+ //uint8_t layer = biton32(layer_state);
+ biton32(layer_state);
+};
+
+
diff --git a/keyboards/gergo/keymaps/germ/readme.md b/keyboards/gergo/keymaps/germ/readme.md
new file mode 100644
index 00000000000..471a20fbdff
--- /dev/null
+++ b/keyboards/gergo/keymaps/germ/readme.md
@@ -0,0 +1,10 @@
+# [Gergo! By g Heavy Industries](http://gboards.ca)
+
+
+
+This is the default keymap for Gergo, it's based heavily off of the naps62 ErgoDox layout and is aimed at a programmer friendly keymap.
+
+## Settings
+To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
diff --git a/keyboards/gergo/keymaps/germ/rules.mk b/keyboards/gergo/keymaps/germ/rules.mk
new file mode 100644
index 00000000000..2f825a76639
--- /dev/null
+++ b/keyboards/gergo/keymaps/germ/rules.mk
@@ -0,0 +1,36 @@
+#----------------------------------------------------------------------------
+# make gergo:germ:dfu
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+# Firmware options
+BALLER = yes # Enable to ball out
+BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
+SCROLLSTEP = 1 # Lines to scroll with ball
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
+
+#Debug options
+VERBOSE = yes
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_BALLER = no
+DEBUG_MATRIX = no
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+SRC += matrix.c i2c_master.c
+ifneq ($(strip $(BALLSTEP)),)
+ OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
+endif
+ifneq ($(strip $(SCROLLSTEP)),)
+ OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
+endif
+ifeq ($(strip $(BALLER)), yes)
+ OPT_DEFS += -DBALLER
+endif
+ifeq ($(strip $(DEBUG_BALLER)), yes)
+ OPT_DEFS += -DDEBUG_BALLER
+endif
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h
index d68860d2028..da230f7e8d5 100644
--- a/keyboards/gray_studio/hb85/config.h
+++ b/keyboards/gray_studio/hb85/config.h
@@ -19,8 +19,6 @@ along with this program. If not, see .
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422F
-// TODO: share these strings with usbconfig.h
-// Edit usbconfig.h to change these.
#define MANUFACTURER Gray Studio
#define PRODUCT HB85
@@ -34,6 +32,3 @@ along with this program. If not, see .
#define RGBLED_NUM 5
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c
index 620a1817aa4..3e420235878 100644
--- a/keyboards/gray_studio/hb85/hb85.c
+++ b/keyboards/gray_studio/hb85/hb85.c
@@ -1,5 +1,5 @@
/*
-Copyright 2017 Luiz Ribeiro ,
+Copyright 2017 Luiz Ribeiro ,
2019 fcoury
This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,7 @@ along with this program. If not, see .
#include "rgblight.h"
-#include "i2c.h"
+#include "i2c_master.h"
#include "quantum.h"
#ifdef RGBLIGHT_ENABLE
@@ -36,7 +36,7 @@ void rgblight_set(void) {
}
i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif
diff --git a/keyboards/gray_studio/hb85/i2c.c b/keyboards/gray_studio/hb85/i2c.c
deleted file mode 100644
index a4f95213524..00000000000
--- a/keyboards/gray_studio/hb85/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-// Please do not modify this file
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md
index 90b4e958c59..c0c2fdf3710 100644
--- a/keyboards/gray_studio/hb85/readme.md
+++ b/keyboards/gray_studio/hb85/readme.md
@@ -16,7 +16,7 @@ Flashing
ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-**Reset Key:** To put the HB85 into reset, hold F3 (`K00`) while plugging in.
+**Reset Key:** Hold down the key located at `K00`, commonly programmed as F3 while plugging in the keyboard.
Windows:
1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
@@ -36,13 +36,13 @@ macOS:
```
3. Install the following packages:
```
- brew install python
+ brew install python3
pip3 install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work.
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk
index 682b9cbac56..c3e17e4932d 100644
--- a/keyboards/gray_studio/hb85/rules.mk
+++ b/keyboards/gray_studio/hb85/rules.mk
@@ -31,7 +31,7 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = lite
+BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
@@ -42,7 +42,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-SRC += i2c.c
+SRC += i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/gray_studio/hb85/usbconfig.h b/keyboards/gray_studio/hb85/usbconfig.h
index 3d5aaa7708d..c52c90ce8a5 100644
--- a/keyboards/gray_studio/hb85/usbconfig.h
+++ b/keyboards/gray_studio/hb85/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/hadron/ver3/chconf.h b/keyboards/hadron/ver3/chconf.h
index 1d9f12ff1f8..ce44925f3c7 100644
--- a/keyboards/hadron/ver3/chconf.h
+++ b/keyboards/hadron/ver3/chconf.h
@@ -48,7 +48,7 @@
* @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 100000
+#define CH_CFG_ST_FREQUENCY 1000
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +58,7 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
-#define CH_CFG_ST_TIMEDELTA 2
+#define CH_CFG_ST_TIMEDELTA 0
/** @} */
diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h
index 18049218251..82081ba4370 100644
--- a/keyboards/hadron/ver3/config.h
+++ b/keyboards/hadron/ver3/config.h
@@ -27,6 +27,28 @@
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
+/*
+ * 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)
+ *
+*/
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+
+#define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 }
+#define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 }
+#define UNUSED_PINS
+
+#define NUMBER_OF_ENCODERS 1
+#define ENCODERS_PAD_A { B13 }
+#define ENCODERS_PAD_B { B14 }
+
+
//Audio
#undef AUDIO_VOICES
#undef C6_AUDIO
@@ -55,16 +77,6 @@
#define micro_oled_rotate_180
#endif
-/*
- * 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)
- *
-*/
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 6
@@ -185,13 +197,13 @@
#define ZC_DET_TIME 0
#define AUTO_CAL_TIME 3
-//#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_ANIMATIONS
-//#define RGBLED_NUM 10
-//#define RGB_DI_PIN B5
-//#define DRIVER_LED_TOTAL RGBLED_NUM
+#define RGBLED_NUM 10
+#define RGB_DI_PIN B5
+#define DRIVER_LED_TOTAL RGBLED_NUM
-//#define RGB_MATRIX_KEYPRESSES
+// #define RGB_MATRIX_KEYPRESSES
#define SOLENOID_PIN A14
diff --git a/keyboards/hadron/ver3/halconf.h b/keyboards/hadron/ver3/halconf.h
index c3e0cbb728c..a14ace02b4b 100644
--- a/keyboards/hadron/ver3/halconf.h
+++ b/keyboards/hadron/ver3/halconf.h
@@ -111,7 +111,7 @@
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM TRUE
#endif
/**
diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c
index ac1db2c2ac9..9afddba26a9 100644
--- a/keyboards/hadron/ver3/keymaps/default/keymap.c
+++ b/keyboards/hadron/ver3/keymaps/default/keymap.c
@@ -175,19 +175,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Adjust (Lower + Raise)
* ,------+------+------+------+------+------------------------------------------------.
- * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
+ * | Reset|HPT TG|HPT FB|HPT M+|HPT M-|HPT RS| | | | | |EEP RS|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
- * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
+ * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
- * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG |
+ * | |Voice-|Voice+|Mus on|Musoff| | | | | | |BL - | BL + |BL ST |BL TG |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
+ * | | | | | | | | | | | |CK RS |CK - |CK + |CK TG |
* `--------------------------------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT(
- RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, _______, \
+ RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, EEP_RST, \
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c
index 140d148b7ee..51062acc227 100644
--- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c
+++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c
@@ -153,19 +153,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Adjust (Lower + Raise)
* ,------+------+------+------+------+------------------------------------------------.
- * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
+ * | Reset|HPT TG|HPT FB|HPT M+|HPT M-|HPT RS| | | | | |EEP RS|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
- * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
+ * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
- * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG |
+ * | |Voice-|Voice+|Mus on|Musoff| | | | | | |BL - | BL + |BL ST |BL TG |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
+ * | | | | | | | | | | | |CK RS |CK - |CK + |CK TG |
* `--------------------------------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_wrapper(
- _______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, _______, \
+ _______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, EEP_RST, \
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
diff --git a/keyboards/hadron/ver3/keymaps/readme.md b/keyboards/hadron/ver3/keymaps/readme.md
index 54fb5f6d9e0..66bf06b7111 100644
--- a/keyboards/hadron/ver3/keymaps/readme.md
+++ b/keyboards/hadron/ver3/keymaps/readme.md
@@ -17,7 +17,8 @@ When adding your keymap to this list, keep it organised alphabetically (select l
* **folder_name** description
-# List of Planck keymaps
+# List of Hadron keymaps
-* **default** default Planck layout
-* **cbbrowne** cbbrowne's Planck layout
\ No newline at end of file
+* **default** default Hadron layout
+* **ishtob** ishtob's Hadron layout
+* **sebaslayout** sebaslayout's Hadron layout
\ No newline at end of file
diff --git a/keyboards/hadron/ver3/matrix.c b/keyboards/hadron/ver3/matrix.c
deleted file mode 100644
index 329d1328aba..00000000000
--- a/keyboards/hadron/ver3/matrix.c
+++ /dev/null
@@ -1,195 +0,0 @@
-#include
-#include "hal.h"
-#include "timer.h"
-#include "wait.h"
-#include "printf.h"
-#include "backlight.h"
-#include "matrix.h"
-#include "action.h"
-#include "keycode.h"
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_COLS];
-static bool debouncing = false;
-static uint16_t debouncing_time = 0;
-
-static uint8_t encoder_state = 0;
-static int8_t encoder_value = 0;
-static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
-
-__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;
-
- // encoder setup
- palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP);
- palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP);
-
- encoder_state = (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1);
-
- // actual matrix setup
- palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOA, 1, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL);
-
- palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN);
- palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN);
- palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
- palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN);
- palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN);
-
-
- memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
- memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
-
-
- matrix_init_quantum();
-}
-
-__attribute__ ((weak))
-void encoder_update(bool clockwise) { }
-
-#ifndef ENCODER_RESOLUTION
- #define ENCODER_RESOLUTION 4
-#endif
-
-uint8_t matrix_scan(void) {
- // encoder on B13 and B14
- encoder_state <<= 2;
- encoder_state |= (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1);
- encoder_value += encoder_LUT[encoder_state & 0xF];
- if (encoder_value >= ENCODER_RESOLUTION) {
- encoder_update(0);
- }
- if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
- encoder_update(1);
- }
- encoder_value %= ENCODER_RESOLUTION;
-
- // actual matrix
- for (int col = 0; col < MATRIX_COLS; col++) {
- matrix_row_t data = 0;
-
- // strobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, }
- switch (col) {
- case 0: palSetPad(GPIOB, 8); break;
- case 1: palSetPad(GPIOB, 2); break;
- case 2: palSetPad(GPIOB, 10); break;
- case 3: palSetPad(GPIOA, 0); break;
- case 4: palSetPad(GPIOA, 1); break;
- case 5: palSetPad(GPIOA, 2); break;
- case 6: palSetPad(GPIOB, 0); break;
- case 7: palSetPad(GPIOA, 3); break;
- case 8: palSetPad(GPIOB, 1); break;
- case 9: palSetPad(GPIOA, 6); break;
- case 10: palSetPad(GPIOA, 7); break;
- case 11: palSetPad(GPIOB, 12); break;
- case 12: palSetPad(GPIOC, 13); break;
- case 13: palSetPad(GPIOB, 11); break;
- case 14: palSetPad(GPIOB, 9); break;
- }
-
- // need wait to settle pin state
- wait_us(20);
-
- // read row data { PC15, PC14, PA10, PA9, PA8 }
- data = (
- (palReadPad(GPIOC, 15) << 0 ) |
- (palReadPad(GPIOC, 14) << 1 ) |
- (palReadPad(GPIOA, 10) << 2 ) |
- (palReadPad(GPIOA, 9) << 3 ) |
- (palReadPad(GPIOA, 8) << 4 )
- );
-
- // unstrobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, }
- switch (col) {
- case 0: palClearPad(GPIOB, 8); break;
- case 1: palClearPad(GPIOB, 2); break;
- case 2: palClearPad(GPIOB, 10); break;
- case 3: palClearPad(GPIOA, 0); break;
- case 4: palClearPad(GPIOA, 1); break;
- case 5: palClearPad(GPIOA, 2); break;
- case 6: palClearPad(GPIOB, 0); break;
- case 7: palClearPad(GPIOA, 3); break;
- case 8: palClearPad(GPIOB, 1); break;
- case 9: palClearPad(GPIOA, 6); break;
- case 10: palClearPad(GPIOA, 7); break;
- case 11: palClearPad(GPIOB, 12); break;
- case 12: palClearPad(GPIOC, 13); break;
- case 13: palClearPad(GPIOB, 11); break;
- case 14: palClearPad(GPIOB, 9); break;
- }
-
- if (matrix_debouncing[col] != data) {
- matrix_debouncing[col] = data;
- debouncing = true;
- debouncing_time = timer_read();
- }
- }
-
- if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
- for (int row = 0; row < MATRIX_ROWS; row++) {
- matrix[row] = 0;
- for (int col = 0; col < MATRIX_COLS; col++) {
- matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col);
- }
- }
- debouncing = false;
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-bool matrix_is_on(uint8_t row, uint8_t col) {
- return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
-MCU_FAMILY = STM32
-MCU_SERIES = STM32F3xx
-
-# Linker script to use
-# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/
-# or /ld/
-MCU_LDSCRIPT = STM32F303xC
-
-# Startup code to use
-# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/
-MCU_STARTUP = stm32f3xx
-
-# Board: it should exist either in /os/hal/boards/
-# or /boards
-BOARD = GENERIC_STM32_F303XC
+# projecct specific files
# 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
+MCU = STM32F303
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = full # 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 = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
+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
+CUSTOM_MATRIX = no # Custom matrix file
AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no
+RGB_MATRIX_ENABLE = no #WS2812 once arm_rgb is implemented
HAPTIC_ENABLE += DRV2605L
QWIIC_ENABLE += MICRO_OLED
+ENCODER_ENABLER = yes
# SERIAL_LINK_ENABLE = yes
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c
index 37169fe2f38..e99ed11a779 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -16,9 +16,36 @@
#include "ver3.h"
#include "qwiic.h"
#include "action_layer.h"
-#include "matrix.h"
#include "haptic.h"
+#ifdef RGB_MATRIX_ENABLE
+#include "rgblight.h"
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ /*{row | col << 4}
+ | {x=0..224, y=0..64}
+ | | modifier
+ | | | */
+ {{1|(13<<4)}, {195, 3}, 0},
+ {{4|(13<<4)}, {195, 16}, 0},
+ {{4|(10<<4)}, {150, 16}, 0},
+ {{4|(7<<4)}, {105, 16}, 0},
+ {{4|(4<<4)}, {60, 16}, 0},
+ {{4|(1<<4)}, {15, 16}, 0},
+ {{1|(1<<4)}, {15, 3}, 0},
+ {{1|(4<<4)}, {60, 3}, 0},
+ {{1|(7<<4)}, {105, 3}, 0},
+ {{1|(10<<4)}, {150, 3}, 0}
+};
+
+#endif
+
+uint8_t *o_fb;
+
+uint16_t counterst = 0;
+
+
+
#ifdef QWIIC_MICRO_OLED_ENABLE
/* screen off after this many milliseconds */
@@ -41,7 +68,7 @@ void draw_ui(void) {
send_command(DISPLAYON);
/* Layer indicator is 41 x 10 pixels */
-#define LAYER_INDICATOR_X 0
+#define LAYER_INDICATOR_X 5
#define LAYER_INDICATOR_Y 0
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
@@ -49,7 +76,7 @@ void draw_ui(void) {
draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0);
/* Matrix display is 19 x 9 pixels */
-#define MATRIX_DISPLAY_X 0
+#define MATRIX_DISPLAY_X 5
#define MATRIX_DISPLAY_Y 18
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
@@ -184,5 +211,10 @@ if (queue_for_send) {
send_command(DISPLAYOFF); /* 0xAE */
}
#endif
+ if (counterst == 0) {
+ //testPatternFB(o_fb);
+ }
+ counterst = (counterst + 1) % 1024;
+ //rgblight_task();
matrix_scan_user();
}
diff --git a/keyboards/hadron/ver3/ver3.h b/keyboards/hadron/ver3/ver3.h
index 516f7b9a1b9..95926469bf8 100644
--- a/keyboards/hadron/ver3/ver3.h
+++ b/keyboards/hadron/ver3/ver3.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 Jack Humbert
+/* Copyright 2018 ishtob
*
* 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,9 +13,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef VER3_H
-#define VER3_H
+#pragma once
-#include "hadron.h"
-
-#endif
\ No newline at end of file
+#include "hadron.h"
\ No newline at end of file
diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h
index b01eec7aa08..eca66909052 100644
--- a/keyboards/handwired/frenchdev/config.h
+++ b/keyboards/handwired/frenchdev/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef FRENCHDEV_V1_CONFIG_H
-#define FRENCHDEV_V1_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -81,5 +80,3 @@ along with this program. If not, see .
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
//#define DEBUG_MATRIX_SCAN_RATE
-
-#endif //FRENCHDEV_V1_CONFIG_H
diff --git a/keyboards/handwired/frenchdev/frenchdev.c b/keyboards/handwired/frenchdev/frenchdev.c
index 6d5883a3a82..6eed4de5ff0 100644
--- a/keyboards/handwired/frenchdev/frenchdev.c
+++ b/keyboards/handwired/frenchdev/frenchdev.c
@@ -1,5 +1,26 @@
#include "frenchdev.h"
-#include "i2cmaster.h"
+
+extern inline void frenchdev_board_led_on(void);
+extern inline void frenchdev_led_1_on(void);
+extern inline void frenchdev_led_2_on(void);
+extern inline void frenchdev_led_3_on(void);
+extern inline void frenchdev_led_on(uint8_t led);
+
+extern inline void frenchdev_board_led_off(void);
+extern inline void frenchdev_led_1_off(void);
+extern inline void frenchdev_led_2_off(void);
+extern inline void frenchdev_led_3_off(void);
+extern inline void frenchdev_led_off(uint8_t led);
+
+extern inline void frenchdev_led_all_on(void);
+extern inline void frenchdev_led_all_off(void);
+
+extern inline void frenchdev_led_1_set(uint8_t n);
+extern inline void frenchdev_led_2_set(uint8_t n);
+extern inline void frenchdev_led_3_set(uint8_t n);
+extern inline void frenchdev_led_set(uint8_t led, uint8_t n);
+
+extern inline void frenchdev_led_all_set(uint8_t n);
bool i2c_initialized = 0;
uint8_t mcp23018_status = 0x20;
@@ -31,15 +52,15 @@ void frenchdev_blink_all_leds(void)
frenchdev_led_all_off();
frenchdev_led_all_set(LED_BRIGHTNESS_HI);
frenchdev_led_1_on();
- _delay_ms(50);
+ wait_ms(50);
frenchdev_led_2_on();
- _delay_ms(50);
+ wait_ms(50);
frenchdev_led_3_on();
- _delay_ms(50);
+ wait_ms(50);
frenchdev_led_1_off();
- _delay_ms(50);
+ wait_ms(50);
frenchdev_led_2_off();
- _delay_ms(50);
+ wait_ms(50);
frenchdev_led_3_off();
frenchdev_led_all_off();
}
@@ -54,28 +75,28 @@ uint8_t init_mcp23018(void) {
// cli();
if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0)
- i2c_initialized++;
- _delay_ms(1000);
+ i2c_initialized = true;;
+ wait_ms(1000);
}
// set pin direction
// - unused : input : 1
// - input : input : 1
// - driving : output : 0
- mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(IODIRA, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
i2c_stop();
// set pull-up
// - unused : on : 1
// - input : on : 1
// - driving : off : 0
- mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPPUA, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
out:
i2c_stop();
@@ -84,4 +105,3 @@ out:
return mcp23018_status;
}
-
diff --git a/keyboards/handwired/frenchdev/frenchdev.h b/keyboards/handwired/frenchdev/frenchdev.h
index 82dbe18b89f..1df39908879 100644
--- a/keyboards/handwired/frenchdev/frenchdev.h
+++ b/keyboards/handwired/frenchdev/frenchdev.h
@@ -1,10 +1,9 @@
-#ifndef FRENCHDEV_V1_H
-#define FRENCHDEV_V1_H
+#pragma once
#include "quantum.h"
#include
#include
-#include "i2cmaster.h"
+#include "i2c_master.h"
#include
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
@@ -24,6 +23,7 @@
#define OLATB 0x15
extern uint8_t mcp23018_status;
+#define I2C_TIMEOUT 100
void init_frenchdev(void);
void frenchdev_blink_all_leds(void);
@@ -111,5 +111,3 @@ inline void frenchdev_led_all_set(uint8_t n)
{ k51, k41, k31, k21, k11, k01 }, \
{ k50, k40, k30, k20, k10, KC_NO } \
}
-
-#endif
diff --git a/keyboards/handwired/frenchdev/i2cmaster.h b/keyboards/handwired/frenchdev/i2cmaster.h
deleted file mode 100644
index 3917b9e6c00..00000000000
--- a/keyboards/handwired/frenchdev/i2cmaster.h
+++ /dev/null
@@ -1,178 +0,0 @@
-#ifndef _I2CMASTER_H
-#define _I2CMASTER_H 1
-/*************************************************************************
-* Title: C include file for the I2C master interface
-* (i2cmaster.S or twimaster.c)
-* Author: Peter Fleury http://jump.to/fleury
-* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $
-* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
-* Target: any AVR device
-* Usage: see Doxygen manual
-**************************************************************************/
-
-#ifdef DOXYGEN
-/**
- @defgroup pfleury_ic2master I2C Master library
- @code #include @endcode
-
- @brief I2C (TWI) Master Software Library
-
- Basic routines for communicating with I2C slave devices. This single master
- implementation is limited to one bus master on the I2C bus.
-
- This I2c library is implemented as a compact assembler software implementation of the I2C protocol
- which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c).
- Since the API for these two implementations is exactly the same, an application can be linked either against the
- software I2C implementation or the hardware I2C implementation.
-
- Use 4.7k pull-up resistor on the SDA and SCL pin.
-
- Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module
- i2cmaster.S to your target when using the software I2C implementation !
-
- Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion.
-
- @note
- The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted
- to GNU assembler and AVR-GCC C call interface.
- Replaced the incorrect quarter period delays found in AVR300 with
- half period delays.
-
- @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury
-
- @par API Usage Example
- The following code shows typical usage of this library, see example test_i2cmaster.c
-
- @code
-
- #include
-
-
- #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet
-
- int main(void)
- {
- unsigned char ret;
-
- i2c_init(); // initialize I2C library
-
- // write 0x75 to EEPROM address 5 (Byte Write)
- i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
- i2c_write(0x05); // write address = 5
- i2c_write(0x75); // write value 0x75 to EEPROM
- i2c_stop(); // set stop conditon = release bus
-
-
- // read previously written value back from EEPROM address 5
- i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
-
- i2c_write(0x05); // write address = 5
- i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode
-
- ret = i2c_readNak(); // read one byte from EEPROM
- i2c_stop();
-
- for(;;);
- }
- @endcode
-
-*/
-#endif /* DOXYGEN */
-
-/**@{*/
-
-#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
-#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
-#endif
-
-#include
-
-/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
-#define I2C_READ 1
-
-/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
-#define I2C_WRITE 0
-
-
-/**
- @brief initialize the I2C master interace. Need to be called only once
- @param void
- @return none
- */
-extern void i2c_init(void);
-
-
-/**
- @brief Terminates the data transfer and releases the I2C bus
- @param void
- @return none
- */
-extern void i2c_stop(void);
-
-
-/**
- @brief Issues a start condition and sends address and transfer direction
-
- @param addr address and transfer direction of I2C device
- @retval 0 device accessible
- @retval 1 failed to access device
- */
-extern unsigned char i2c_start(unsigned char addr);
-
-
-/**
- @brief Issues a repeated start condition and sends address and transfer direction
-
- @param addr address and transfer direction of I2C device
- @retval 0 device accessible
- @retval 1 failed to access device
- */
-extern unsigned char i2c_rep_start(unsigned char addr);
-
-
-/**
- @brief Issues a start condition and sends address and transfer direction
-
- If device is busy, use ack polling to wait until device ready
- @param addr address and transfer direction of I2C device
- @return none
- */
-extern void i2c_start_wait(unsigned char addr);
-
-
-/**
- @brief Send one byte to I2C device
- @param data byte to be transfered
- @retval 0 write successful
- @retval 1 write failed
- */
-extern unsigned char i2c_write(unsigned char data);
-
-
-/**
- @brief read one byte from the I2C device, request more data from device
- @return byte read from I2C device
- */
-extern unsigned char i2c_readAck(void);
-
-/**
- @brief read one byte from the I2C device, read is followed by a stop condition
- @return byte read from I2C device
- */
-extern unsigned char i2c_readNak(void);
-
-/**
- @brief read one byte from the I2C device
-
- Implemented as a macro, which calls either i2c_readAck or i2c_readNak
-
- @param ack 1 send ack, request more data from device
- 0 send nak, read is followed by a stop condition
- @return byte read from I2C device
- */
-extern unsigned char i2c_read(unsigned char ack);
-#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
-
-
-/**@}*/
-#endif
diff --git a/keyboards/handwired/frenchdev/info.json b/keyboards/handwired/frenchdev/info.json
index 0f3c0a94fd3..28f09a3aa11 100644
--- a/keyboards/handwired/frenchdev/info.json
+++ b/keyboards/handwired/frenchdev/info.json
@@ -4,7 +4,7 @@
"maintainer": "qmk",
"bootloader": "",
"width": 20,
- "height": 8,
+ "height": 9.5,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
index 506383a1bba..7b82f36e360 100644
--- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c
+++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "mousekey.h"
#include "keymap_bepo.h"
@@ -14,7 +13,7 @@
#define KEY_DELAY 130
enum macros {
- M_LP, // left pedal
+ M_LP = SAFE_RANGE, // left pedal
M_RP, // right pedal
M_SF, // shift
M_SFS, // shift and space
@@ -63,19 +62,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------| / |------| , | space|------|------|------ .. ------|------|------| L1/sp| LEFT |------| UP |------+------| *
* | CTRL | win |------/ \-------------| L1 | alt | .. | CAPS | L1 |-------------/ \------| : | CTRL | *
* `-------------/ \-------------/ .. \-------------/ \-------------/ *
- *M(M_LP)
*/
[_BASE] = LAYOUT(
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_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_DTRM, BP_DCRC, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \
KC_TAB, BP_B, BP_ECUT, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \
BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_APOS, \
- M(M_SF), BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRACKET, M(M_SFS), BP_CBSP, M(L2INS), M(L2LOC), BP_CDEL, M(M_SFS),BP_M, BP_G, KC_UP, BP_H, BP_Q, M(M_SF), \
- KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M(M_L1E), KC_LALT, KC_CAPS, M(M_L1E),KC_SPACE,KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \
+ M_SF, BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRC, M_SFS, BP_CBSP, L2INS, L2LOC, BP_CDEL, M_SFS, BP_M, BP_G, KC_UP, BP_H, BP_Q, M_SF, \
+ KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M_L1E, KC_LALT, KC_CAPS, M_L1E, KC_SPACE, KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \
//left pedals
- M(M_LP), M(M_RP), KC_TRNS, \
+ M_LP, M_RP, KC_TRNS, \
//right pedals
- M(M_LP), M(M_RP), KC_TRNS \
+ M_LP, M_RP, KC_TRNS \
),
/* Larer 1 for symbols.
@@ -102,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, BP_DCUR, BP_PARG, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_DCAR, BP_LEQL, BP_GEQL, BP_PSMS, BP_OBEL, BP_TIMS, KC_TRNS, \
KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_DIFF, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PMIL, KC_TRNS, \
KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QEST, BP_CCED, BP_LESS, BP_GRTR, BP_AMPR, BP_UNDS, KC_TRNS, \
- KC_TRNS, M(M_UN), M(M_CUT),M(M_CP), M(M_PS), M(M_SE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \
+ KC_TRNS, M_UN, M_CUT, M_CP, M_PS, M_SE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \
KC_TRNS, KC_TRNS, BP_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, \
//left pedals
KC_TRNS, KC_BTN1, KC_TRNS, \
@@ -134,12 +132,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MPRV, KC_MNXT, KC_MPLY, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_PMNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_BTN4, KC_BTN5, KC_BTN4, KC_BTN5, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_BTN2, KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, KC_TRNS, \
- KC_TRNS, M(M_UN), M(M_CUT),M(M_CP), M(M_PS), KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, KC_TRNS, \
+ KC_TRNS, M_UN, M_CUT, M_CP, M_PS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_PDOT, BP_DOT, BP_COMM, KC_TRNS, \
//left pedals
- KC_BTN3, M(M_RP), KC_TRNS, \
+ KC_BTN3, M_RP, KC_TRNS, \
//right pedals
- KC_BTN3, M(M_RP), KC_TRNS \
+ KC_BTN3, M_RP, KC_TRNS \
),
/* TRNS - skeleton for laters
@@ -169,9 +167,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
//left pedals
- KC_BTN3, M(M_RP), KC_TRNS, \
+ KC_BTN3, M_RP, KC_TRNS, \
//right pedals
- KC_BTN3, M(M_RP), KC_TRNS \
+ KC_BTN3, M_RP, KC_TRNS \
),
};
@@ -191,28 +189,52 @@ void release_shift(void) {
void press_space(void) {
if(shift_count > 0) unregister_code (KC_LSHIFT);
- register_code (KC_SPACE);
- unregister_code (KC_SPACE);
+ tap_code(KC_SPACE);
if(shift_count > 0) register_code (KC_LSHIFT);
}
void press_enter(void) {
if(shift_count > 0) unregister_code (KC_LSHIFT);
- register_code (KC_ENT);
- unregister_code (KC_ENT);
+ tap_code (KC_ENT);
if(shift_count > 0) register_code (KC_LSHIFT);
}
void press_underscore(void) {
if(shift_count > 0) unregister_code (KC_LSHIFT);
- register_code ((unsigned char) BP_UNDS);
- unregister_code ((unsigned char) BP_UNDS);
+ tap_code ((unsigned char) BP_UNDS);
if(shift_count > 0) register_code (KC_LSHIFT);
}
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch(id) {
+void matrix_init_user(void) {
+}
+
+// Bleah globals need to be initialized.
+uint8_t old_layer=_BASE;
+
+void matrix_scan_user(void) {
+ uint8_t layer = biton32(layer_state);
+
+ frenchdev_led_1_off();
+ frenchdev_led_2_off();
+ switch (layer) {
+ case _BASE:
+ frenchdev_led_2_on();
+ break;
+ case _SYMBOLS:
+ frenchdev_led_1_on();
+ break;
+ case _MEDIA:
+ frenchdev_led_1_on();
+ frenchdev_led_2_on();
+ default:
+ // none
+ break;
+ }
+}
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
case M_LP: //left pedal
if (record->event.pressed) {
layer_on(1);
@@ -220,25 +242,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
key_timer_left_pedal = timer_read(); // if the key is being pressed, we start the timer.
} else {
if (timer_elapsed(key_timer_left_pedal) < KEY_DELAY) {
- mousekey_on (KC_BTN2);
- mousekey_send();
- mousekey_off (KC_BTN2);
- mousekey_send();
+ tap_code (KC_BTN2);
}
unregister_code (KC_SLCK);
layer_off(1);
}
- break;
+ break;
case M_RP: //right pedal
if (record->event.pressed) {
layer_on(2);
key_timer_right_pedal = timer_read(); // if the key is being pressed, we start the timer.
} else {
if (timer_elapsed(key_timer_right_pedal) < PEDAL_DELAY) {
- mousekey_on (KC_BTN1);
- mousekey_send();
- mousekey_off (KC_BTN1);
- mousekey_send();
+ tap_code (KC_BTN1);
}
layer_off(2);
}
@@ -289,13 +305,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
key_timer_2 = timer_read(); // if the key is being pressed, we start the timer.
} else {
if (timer_elapsed(key_timer_2) < KEY_DELAY) {
- register_code (KC_INS);
- unregister_code (KC_INS);
+ tap_code (KC_INS);
}
l2_locked = 0;
layer_off(2);
}
- break;
+ break;
case L2LOC: //lock L2
if (record->event.pressed) {
key_timer_2 = timer_read(); // if the key is being pressed, we start the timer.
@@ -309,80 +324,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
layer_off(2);
}
}
- break;
+ break;
case M_UN: // undo
if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(BP_Z);
- unregister_code(BP_Z);
- unregister_code(KC_LCTL);
+ tap_code16(C(BP_Z));
}
- break;
+ break;
case M_CUT: // cut
if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(BP_X);
- unregister_code(BP_X);
- unregister_code(KC_LCTL);
+ tap_code16(C(BP_X));
}
- break;
+ break;
case M_CP: // copy
if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(BP_C);
- unregister_code(BP_C);
- unregister_code(KC_LCTL);
+ tap_code16(C(BP_C));
}
- break;
+ break;
case M_PS: // paste
if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(BP_V);
- unregister_code(BP_V);
- unregister_code(KC_LCTL);
+ tap_code16(C(BP_V));
}
- break;
+ break;
case M_SE: // search
if (record->event.pressed) {
- register_code(KC_LCTL);
- register_code(BP_F);
- unregister_code(BP_F);
- unregister_code(KC_LCTL);
+ tap_code16(C(BP_F));
}
- break;
+ break;
}
- return MACRO_NONE;
-};
-
-void matrix_init_user(void) {
-}
-
-// Bleah globals need to be initialized.
-uint8_t old_layer=_BASE;
-
-void matrix_scan_user(void) {
- uint8_t layer = biton32(layer_state);
-
- frenchdev_led_1_off();
- frenchdev_led_2_off();
- switch (layer) {
- case _BASE:
- frenchdev_led_2_on();
- break;
- case _SYMBOLS:
- frenchdev_led_1_on();
- break;
- case _MEDIA:
- frenchdev_led_1_on();
- frenchdev_led_2_on();
- default:
- // none
- break;
- }
-}
-
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c
index 7fe3d0bbf24..4263555e951 100644
--- a/keyboards/handwired/frenchdev/matrix.c
+++ b/keyboards/handwired/frenchdev/matrix.c
@@ -40,7 +40,6 @@ along with this program. If not, see .
#include "util.h"
#include "matrix.h"
#include "frenchdev.h"
-#include "i2cmaster.h"
#ifdef DEBUG_MATRIX_SCAN_RATE
#include "timer.h"
#endif
@@ -280,11 +279,12 @@ static matrix_row_t read_cols(uint8_t row)
return 0;
} else {
uint8_t data = 0;
- mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out;
- mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out;
- data = i2c_readNak();
- data = ~data;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ data = i2c_read_nack(I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
+ data = ~((uint8_t)mcp23018_status);
+ mcp23018_status = I2C_STATUS_SUCCESS;
out:
i2c_stop();
return data;
@@ -318,11 +318,9 @@ static void unselect_rows(void)
// do nothing
} else {
// set all rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write( 0xFF
- & ~(0<<8)
- ); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write( 0xFF & ~(0<<8), I2C_TIMEOUT); if (mcp23018_status) goto out;
out:
i2c_stop();
}
@@ -346,11 +344,9 @@ static void select_row(uint8_t row)
} else {
// set active row low : 0
// set other rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write( 0xFF & ~(1< http://jump.to/fleury
-* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $
-* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
-* Target: any AVR device with hardware TWI
-* Usage: API compatible with I2C Software Library i2cmaster.h
-**************************************************************************/
-#include
-#include
-
-#include
-
-
-/* define CPU frequency in Mhz here if not defined in Makefile */
-#ifndef F_CPU
-#define F_CPU 16000000UL
-#endif
-
-/* I2C clock in Hz */
-#define SCL_CLOCK 400000L
-
-
-/*************************************************************************
- Initialization of the I2C bus interface. Need to be called only once
-*************************************************************************/
-void i2c_init(void)
-{
- /* initialize TWI clock
- * minimal values in Bit Rate Register (TWBR) and minimal Prescaler
- * bits in the TWI Status Register should give us maximal possible
- * I2C bus speed - about 444 kHz
- *
- * for more details, see 20.5.2 in ATmega16/32 secification
- */
-
- TWSR = 0; /* no prescaler */
- TWBR = 10; /* must be >= 10 for stable operation */
-
-}/* i2c_init */
-
-
-/*************************************************************************
- Issues a start condition and sends address and transfer direction.
- return 0 = device accessible, 1= failed to access device
-*************************************************************************/
-unsigned char i2c_start(unsigned char address)
-{
- uint8_t twst;
-
- // send START condition
- TWCR = (1<
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0690
+#define DEVICE_VER 0x0001
+#define MANUFACTURER MMO_Corp
+#define PRODUCT hacked_motospeed
+#define DESCRIPTION Motospeed Numpads wired to Teensy++2.0
+
+/* key matrix size */
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 12
+
+/*
+ * 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)
+ *
+*/
+
+// WR XR YR ZR VR ZL YL XL WL VL
+#define MATRIX_ROW_PINS { B3, B5, F1, B4, B6, D5, D4, D6, D7, C4}
+
+// ER DR CR BR AR FR FL AL BL CL DL EL
+#define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+//#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * 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
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.c b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c
new file mode 100644
index 00000000000..21643895d75
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 Vladislav Opara
+ *
+ * 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 .
+ */
+#include "hacked_motospeed.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);
+}
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.h b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h
new file mode 100644
index 00000000000..1063fd2e623
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h
@@ -0,0 +1,46 @@
+/* Copyright 2019 Vladislav Opara
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ EWR, DWR, CWR, BWR, AWR, FXR, FYL, AZL, BZL, CZL, DZL, \
+ DXR, CXR, BXR, AXR, FZR, DVL, AYL, BYL, CYL, DYL, EZL, \
+ EZR, DYR, CYR, BYR, AYR, DVR, FZL, AXL, BXL, CXL, DXL, \
+ DZR, CZR, BZR, AZR, FYR, FXL, AWL, BWL, CWL, DWL, EWL \
+) \
+{ \
+ { EWR, DWR, CWR, BWR, AWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, DXR, CXR, BXR, AXR, FXR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, DYR, CYR, BYR, AYR, FYR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { EZR, DZR, CZR, AZR, BZR, FZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, DVR, 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, FZL, BZL, AZL, CZL, DZL, EZL }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FYL, AYL, BYL, CYL, DYL, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FXL, AXL, BXL, CXL, DXL, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, AWL, BWL, CWL, DWL, EWL }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, DVL, KC_NO } \
+}
diff --git a/keyboards/handwired/hacked_motospeed/info.json b/keyboards/handwired/hacked_motospeed/info.json
new file mode 100644
index 00000000000..7ca92785ebd
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Hacked Motospeed",
+ "url": "",
+ "maintainer": "Deckweiss",
+ "width": 13,
+ "height": 4,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"ESC", "x":0, "y":0, "h":2}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Z", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0, "w":2}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":"(", "x":11, "y":1}, {"label":")", "x":12, "y":1}, {"label":"=", "x":0, "y":2}, {"label":"Y", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":",", "x":9, "y":2}, {"label":".", "x":10, "y":2}, {"label":"?", "x":11, "y":2}, {"label":"Fn", "x":0, "y":3, "w":2}, {"label":"Num", "x":2, "y":3}, {"label":"Bksp", "x":3, "y":3}, {"label":"Enter", "x":4, "y":3}, {"label":"Spc", "x":5, "y":3}, {"label":"LShift", "x":7, "y":3}, {"label":"LCtrl", "x":8, "y":3}, {"label":"LAlt", "x":9, "y":3}, {"label":"RAlt", "x":10, "y":3}, {"label":"Meta", "x":11, "y":3}, {"label":"Fn", "x":12, "y":2, "h":2}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/config.h b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h
new file mode 100644
index 00000000000..72de214ba72
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 Vladislav Opara
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c
new file mode 100644
index 00000000000..bdec8f24615
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c
@@ -0,0 +1,65 @@
+/* Copyright 2019 Vladislav Opara
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ KC_ESC, 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, KC_LPRN, KC_RPRN, \
+ KC_PEQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUES, \
+ XXXXXXX, XXXXXXX, KC_BSPC, KC_ENT, KC_SPC, KC_LSFT, KC_LCTRL, KC_LALT, KC_ALGR, KC_LWIN, XXXXXXX \
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md
new file mode 100644
index 00000000000..4c740bd9a55
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for hacked_motospeed
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/readme.md b/keyboards/handwired/hacked_motospeed/readme.md
new file mode 100644
index 00000000000..ac2d4afc28a
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/readme.md
@@ -0,0 +1,23 @@
+# hacked_motospeed
+
+This is a
+ - tiny (44key),
+ - budget (~50€ total expense),
+ - portable (HID bluetooth & 5aH battery)
+ - easy to diy (little wiring & soldering needed),
+
+mechanical keyboard.
+It is made by wiring two Motospeed K22 numpads to a Teensy++ 2.0, while reusing as much of the original PCB as possible.
+The numpads come with Outemu red linear switches.
+(A detailed guide will be posted and linked later)
+
+
+Keyboard Maintainer: [Deckweiss](https://github.com/Deckweiss)
+Hardware Supported: Motospeed K22 numpads wired to Teensy++ 2.0 according to my guide (upcoming).
+Hardware Availability: Ebay, AliExpress
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/hacked_motospeed:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk
new file mode 100644
index 00000000000..1dc955718fb
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+MCU = at90usb1286
+#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
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = halfkay
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=1024
+
+
+# Build Options
+# change yes to no to disable
+#
+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 = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
\ No newline at end of file
diff --git a/keyboards/handwired/not_so_minidox/info.json b/keyboards/handwired/not_so_minidox/info.json
index 0222095024b..9c286eb1f9b 100644
--- a/keyboards/handwired/not_so_minidox/info.json
+++ b/keyboards/handwired/not_so_minidox/info.json
@@ -2,7 +2,7 @@
"keyboard_name": "Not So MiniDox",
"url": "",
"maintainer": "qmk",
- "width": 12,
+ "width": 14,
"height": 5.75,
"layouts": {
"LAYOUT": {
diff --git a/keyboards/handwired/ortho5x13/info.json b/keyboards/handwired/ortho5x13/info.json
index 15a65081a16..886bfe02893 100644
--- a/keyboards/handwired/ortho5x13/info.json
+++ b/keyboards/handwired/ortho5x13/info.json
@@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 13,
- "height": 6,
+ "height": 5,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/handwired/prime_exl/info.json b/keyboards/handwired/prime_exl/info.json
index edab7886079..65b08d61517 100644
--- a/keyboards/handwired/prime_exl/info.json
+++ b/keyboards/handwired/prime_exl/info.json
@@ -2,8 +2,8 @@
"keyboard_name": "Prime_EXL",
"url": "https://www.primekb.com",
"maintainer": "holtenc",
- "width": 18,
- "height": 5,
+ "width": 20.75,
+ "height": 6,
"layouts": {
"LAYOUT": {
"layout": [{"x":0,"y":0,"w":1,"h":1}, {"x":1,"y":0,"w":1,"h":1}, {"x":2,"y":0,"w":1,"h":1}, {"x":3,"y":0,"w":1,"h":1}, {"x":4,"y":0,"w":1,"h":1}, {"x":5,"y":0,"w":1,"h":1}, {"x":6.5,"y":0,"w":1,"h":1}, {"x":7.5,"y":0,"w":1,"h":1}, {"x":8.5,"y":0,"w":1,"h":1}, {"x":9.5,"y":0,"w":1,"h":1}, {"x":10.5,"y":0,"w":1,"h":1}, {"x":11.5,"y":0,"w":1,"h":1}, {"x":13.75,"y":0,"w":1,"h":1}, {"x":14.75,"y":0,"w":1,"h":1}, {"x":15.75,"y":0,"w":1,"h":1}, {"x":16.75,"y":0,"w":1,"h":1}, {"x":17.75,"y":0,"w":1,"h":1}, {"x":18.75,"y":0,"w":2,"h":1}, {"x":0,"y":1,"w":1,"h":1}, {"x":1,"y":1,"w":1,"h":1}, {"x":2,"y":1,"w":1,"h":1}, {"x":3,"y":1,"w":1,"h":1}, {"x":4,"y":1,"w":1,"h":1}, {"x":5,"y":1,"w":1,"h":1}, {"x":6.5,"y":1,"w":1.26,"h":1}, {"x":7.75,"y":1,"w":1,"h":1}, {"x":8.75,"y":1,"w":1,"h":1}, {"x":9.75,"y":1,"w":1,"h":1}, {"x":10.75,"y":1,"w":1,"h":1}, {"x":11.75,"y":1,"w":1,"h":1}, {"x":14,"y":1,"w":1,"h":1}, {"x":15,"y":1,"w":1,"h":1}, {"x":16,"y":1,"w":1,"h":1}, {"x":17,"y":1,"w":1,"h":1}, {"x":18,"y":1,"w":1,"h":1}, {"x":19,"y":1,"w":1.75,"h":1}, {"x":0,"y":2,"w":1,"h":1}, {"x":1,"y":2,"w":1,"h":1}, {"x":2,"y":2,"w":1,"h":1}, {"x":3,"y":2,"w":1,"h":1}, {"x":4,"y":2,"w":1,"h":1}, {"x":5,"y":2,"w":1,"h":1}, {"x":6.5,"y":2,"w":1.75,"h":1}, {"x":8.25,"y":2,"w":1,"h":1}, {"x":9.25,"y":2,"w":1,"h":1}, {"x":10.25,"y":2,"w":1,"h":1}, {"x":11.25,"y":2,"w":1,"h":1}, {"x":12.25,"y":2,"w":1,"h":1}, {"x":13.5,"y":2,"w":1,"h":1}, {"x":14.5,"y":2,"w":1,"h":1}, {"x":15.5,"y":2,"w":1,"h":1}, {"x":16.5,"y":2,"w":1,"h":1}, {"x":17.5,"y":2,"w":1,"h":1}, {"x":18.5,"y":2,"w":1,"h":1}, {"x":19.5,"y":2,"w":1.25,"h":1}, {"x":0,"y":3,"w":1,"h":1}, {"x":1,"y":3,"w":1,"h":1}, {"x":2,"y":3,"w":1,"h":1}, {"x":3,"y":3,"w":1,"h":1}, {"x":4,"y":3,"w":1,"h":1}, {"x":5,"y":3,"w":1,"h":1}, {"x":6.5,"y":3,"w":1.25,"h":1}, {"x":7.75,"y":3,"w":1.25,"h":1}, {"x":9,"y":3,"w":1,"h":1}, {"x":10,"y":3,"w":1,"h":1}, {"x":11,"y":3,"w":2,"h":1}, {"x":13.5,"y":3,"w":2,"h":1}, {"x":15.5,"y":3,"w":1,"h":1}, {"x":16.5,"y":3,"w":1,"h":1}, {"x":17.5,"y":3,"w":1.5,"h":1}, {"x":19,"y":3,"w":1.5,"h":1}, {"x":0,"y":4,"w":1,"h":1}, {"x":1,"y":4,"w":1,"h":1}, {"x":2,"y":4,"w":1,"h":1}, {"x":3,"y":4,"w":1,"h":1}, {"x":4,"y":4,"w":1,"h":1}, {"x":5,"y":4,"w":1,"h":1}]
diff --git a/keyboards/handwired/promethium/info.json b/keyboards/handwired/promethium/info.json
index 2742ffa641b..7b2d43d6142 100644
--- a/keyboards/handwired/promethium/info.json
+++ b/keyboards/handwired/promethium/info.json
@@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 16,
- "height": 5,
+ "height": 4.5,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h
new file mode 100644
index 00000000000..b50886cdc80
--- /dev/null
+++ b/keyboards/handwired/tennie/config.h
@@ -0,0 +1,240 @@
+/*
+Copyright 2018 Jack Hildebrandt
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x1EEE
+#define PRODUCT_ID 0x1313
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Jsck
+#define PRODUCT Tennie
+#define DESCRIPTION Ten key macropad
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { C6, D4, D0}
+#define MATRIX_COL_PINS { D7, E6, B4, B5 }
+#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7 D1}
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+#define RGBW
+#define RGB_DI_PIN D1
+#ifdef RGB_DI_PIN
+ #define RGBLED_NUM 1
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 8
+ #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+ #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+#endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * 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
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/handwired/tennie/info.json b/keyboards/handwired/tennie/info.json
new file mode 100644
index 00000000000..c0369979291
--- /dev/null
+++ b/keyboards/handwired/tennie/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Tennie",
+ "url": "https://github.com/StoutIEEE/macropad-workshop",
+ "maintainer": "UW Stout IEEE, Jack Hildebrandt (onemorebyte)",
+ "width": 4,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}]
+ }
+ }
+}
diff --git a/keyboards/handwired/tennie/keymaps/default/config.h b/keyboards/handwired/tennie/keymaps/default/config.h
new file mode 100644
index 00000000000..4496c591006
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/handwired/tennie/keymaps/default/keymap.c b/keyboards/handwired/tennie/keymaps/default/keymap.c
new file mode 100644
index 00000000000..3736841cbb9
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/default/keymap.c
@@ -0,0 +1,95 @@
+/* Copyright 2018 Jack H.
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+#define TAPPING_TOGGLE 2
+
+
+// Layer names
+#define base 0
+#define shrek 1
+#define ogre 2
+#define tcp 3
+
+// Layer Switches
+#define KC_SHRK TT(shrek)
+#define KC_OGRE TT(ogre)
+#define KC_TCP TT(tcp)
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [base] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_DEL, KC_SPC, KC_ENT,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_LEFT, KC_DOWN, KC_UP , KC_RGHT,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_SHRK, KC_OGRE, KC_TCP
+
+ // └────────┴────────┴────────┘
+ ),
+ [shrek] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_MPRV, KC_MPLY, KC_MNXT,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+ // └────────┴────────┴────────┘
+ ),
+ [ogre] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ RGB_MOD, RGB_TOG, RGB_RMOD,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_F13, KC_F14, KC_F15, KC_F16,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+ // └────────┴────────┴────────┘
+ ),
+ [tcp] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_WBAK, KC_WREF, KC_WFWD,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+ // └────────┴────────┴────────┘
+ ),
+};
diff --git a/keyboards/handwired/tennie/keymaps/default/readme.md b/keyboards/handwired/tennie/keymaps/default/readme.md
new file mode 100644
index 00000000000..1fbaa7f4635
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/default/readme.md
@@ -0,0 +1,68 @@
+# Default keymap
+
+This keymap is to serve as an example of how you could make a multi-layer keymap.
+
+#### keymap
+
+```
+[base] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ DEL , SPC , ENT ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ LEFT , DOWN , UP , RGHT ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ SHRK , OGRE , TCP
+
+// └────────┴────────┴────────┘
+),
+[shrek] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ MPRV , MPLY , MNXT ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ BRID , VOLD , VOLU , BRIU ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+// └────────┴────────┴────────┘
+),
+[ogre] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ RGB_MOD, RGB_TOG, RGB_RMOD
+
+// ├────────┼────────┼────────┼────────┼
+
+ F13 , F14 , F15 , F16 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+// └────────┴────────┴────────┘
+),
+[tcp] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ WBAK , WREF , WFWD ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ XXXXXXX , PGDN , PGUP , XXXXXXX ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+// └────────┴────────┴────────┘
+),
+```
diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h
new file mode 100644
index 00000000000..a3c309bb290
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c
new file mode 100644
index 00000000000..7cf29b11889
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+// Layer names
+#define base 0
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [base] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_1 , KC_2 , KC_3 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_4 , KC_5 , KC_6 , KC_7 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_8 , KC_9 , KC_0
+
+ // └────────┴────────┴────────┘
+ ),
+};
diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md
new file mode 100644
index 00000000000..0b3f3075016
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md
@@ -0,0 +1,18 @@
+# Simple numberpad keymap
+
+This keymap is to test the soldering work of workshop participants. It can also be used as a simple base for a macropad keymap.
+```
+// ┌────────┬────────┬────────┐
+
+ 1 , 2 , 3 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ 4 , 5 , 6 , 7 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ 8 , 9 , 0
+
+// └────────┴────────┴────────┘
+```
diff --git a/keyboards/handwired/tennie/keymaps/soundboard/config.h b/keyboards/handwired/tennie/keymaps/soundboard/config.h
new file mode 100644
index 00000000000..5a1cba7b404
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/soundboard/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 Jacob Hillebrand
+ *
+ * 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/handwired/tennie/keymaps/soundboard/keymap.c b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c
new file mode 100644
index 00000000000..3bceb1feac9
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jacob Hillebrand
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+// Layer names
+#define base 0
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [base] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_F13 , KC_F14 , KC_F15 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_F16 , KC_F17 , KC_F18 , KC_F19 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_F20, KC_F21 , KC_F22
+
+ // └────────┴────────┴────────┘
+ ),
+};
diff --git a/keyboards/handwired/tennie/keymaps/soundboard/readme.md b/keyboards/handwired/tennie/keymaps/soundboard/readme.md
new file mode 100644
index 00000000000..d05b7117c16
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/soundboard/readme.md
@@ -0,0 +1,19 @@
+# Soundboard keymap
+
+This keymap binds all keys to function keys 13-22 for something like a
+soundboard (ie:[Resanance](https://www.reddit.com/r/discordapp/comments/44ldc1/soundboard_for_discord/))
+```
+// ┌────────┬────────┬────────┐
+
+ F13 , F14 , F15 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ F16 , F17 , F18 , F19 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ F20 , F21 , F22
+
+// └────────┴────────┴────────┘
+```
diff --git a/keyboards/handwired/tennie/readme.md b/keyboards/handwired/tennie/readme.md
new file mode 100644
index 00000000000..bbdbc2b6011
--- /dev/null
+++ b/keyboards/handwired/tennie/readme.md
@@ -0,0 +1,15 @@
+# Tennie
+
+
+
+A ten key macropad for a club workshop! More information, and build instructions can be found [here](https://github.com/StoutIEEE/macropad-workshop)
+
+Keyboard Maintainer: [Jack Hildebrandt](https://github.com/onemorebyte), [UW Stout IEEE](https://github.com/StoutIEEE)
+
+Hardware Supported: ProMicro
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/tennie:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk
new file mode 100644
index 00000000000..0119dc6fb2f
--- /dev/null
+++ b/keyboards/handwired/tennie/rules.mk
@@ -0,0 +1,80 @@
+# 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
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = caterina
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/handwired/tennie/tennie.c b/keyboards/handwired/tennie/tennie.c
new file mode 100644
index 00000000000..e1ceaf153d7
--- /dev/null
+++ b/keyboards/handwired/tennie/tennie.c
@@ -0,0 +1,45 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * 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 .
+ */
+#include "tennie.h"
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+void matrix_post_init(void) {
+ rgblight_enable_noeeprom();
+ keyboard_post_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);
+//}
diff --git a/keyboards/handwired/tennie/tennie.h b/keyboards/handwired/tennie/tennie.h
new file mode 100644
index 00000000000..8ab0d04c528
--- /dev/null
+++ b/keyboards/handwired/tennie/tennie.h
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ K00, K01, K02, \
+ K10, K11, K12, K13, \
+ K20, K21, K22 \
+) \
+{ \
+ { K00, K01, K02, KC_NO }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, KC_NO }, \
+}
diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/handwired/tradestation/info.json
index e59c217cb70..233eb6282ec 100644
--- a/keyboards/handwired/tradestation/info.json
+++ b/keyboards/handwired/tradestation/info.json
@@ -3,7 +3,7 @@
"url": "",
"maintainer": "Flehrad",
"width": 4.375,
- "height": 4.375,
+ "height": 4.5,
"layouts": {
"LAYOUT_tradestation": {
"layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25, "w":2},{"x":2.25, "y":2.25, "w":2},{"x":0, "y":3.5, "w":2},{"x":2.25, "y":3.5, "w":2}]
diff --git a/keyboards/handwired/woodpad/keymaps/drashna/README.md b/keyboards/handwired/woodpad/keymaps/drashna/README.md
deleted file mode 100644
index f24d2c48f6c..00000000000
--- a/keyboards/handwired/woodpad/keymaps/drashna/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-Overview
-========
-
-This is my personal Numpad (Woodpad) configuration, and my daily driver.
-
-Most of the code resides in my userspace, rather than here, as I have multiple keyboards.
-
-How to build
-------------
-make handwired/woodpad:drashna:avrdude
-
-Layers
-------
-* NUMLOCK: Num pad, locked to NUM LOCK enabled.
-* NAV: Navigation codes without needing to enable numlock.
-* DIABLO: This contains a Diablo 3 layout, that requires much less reaching or shifting. If Tap Dance is enabled, then it has a "spam" feature. See Userspace for details.
-* MACROS: This layer contains a bunch of macros for spamming chat, with a toggle on what key to open up chat with.
-* MEDIA: Media and RGB commands
-
-All layers have RGB specific indicators, so you can see what layer you're on by the underglow.
-
-Woodpad Specific Code
----------------------
-
-Aside from my userspace code, this includes LED indications for numlock and macro mode. It also forces NUMLOCK to be enabled.
diff --git a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c
deleted file mode 100644
index 20b4e064eb3..00000000000
--- a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
- *
- * 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 .
- */
-#include QMK_KEYBOARD_H
-#include "drashna.h"
-
- // Each layer gets a name for readability, which is then used in the keymap matrix below.
- // The underscores don't mean anything - you can have a layer called STUFF or any other name.
- // Layer names don't all need to be of the same length, obviously, and you can also skip them
- // entirely and just use numbers.
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_NUMLOCK] = KEYMAP( /* Base */
- TG(_NAV), TG(_DIABLO), TG(_MACROS), KC_PSLS,\
- KC_P7, KC_P8, KC_P9, KC_PAST, \
- KC_P4, KC_P5, KC_P6, KC_PMNS, \
- KC_P1, KC_P2, KC_P3, KC_PPLS, \
- LT(_MEDIA,KC_P0), KC_PDOT, KC_COLN, KC_PENT \
-),
-[_NAV] = KEYMAP( /* Base */
- _______, _______, _______, _______,\
- KC_HOME, KC_UP, KC_PGUP, _______, \
- KC_LEFT, XXXXXXX, KC_RIGHT, _______, \
- KC_END, KC_DOWN, KC_PGDN, _______, \
- KC_INS, KC_DEL, _______, _______ \
-),
-[_DIABLO] = KEYMAP( /* Base */
- KC_ESC, _______, XXXXXXX, _______,\
- KC_S, KC_I, KC_F, KC_M, \
- KC_1, KC_2, KC_3, KC_4, \
- KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, \
- XXXXXXX, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \
-),
-
-[_MACROS] = KEYMAP( /* Base */
- KC_OVERWATCH, XXXXXXX, _______, XXXXXXX,\
- KC_JUSTGAME, XXXXXXX, XXXXXXX, KC_C9, \
- XXXXXXX, XXXXXXX, KC_AIM, KC_GGEZ, \
- KC_SYMM, KC_TORB, XXXXXXX, KC_GOODGAME, \
- KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \
-),
-[_MEDIA] = KEYMAP( /* Base */
- KC_RESET, KC_MUTE, KC_VOLD, KC_VOLU,\
- KC_MAKE, _______, RGB_HUI, RGB_HUD, \
- KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, \
- RGB_TOG, RGB_MOD, RGB_SAI, RGB_VAI, \
- _______, KC_RGB_T, RGB_SAD, RGB_VAD \
-),
-
-};
-
-
-void numlock_led_on(void) {
- PORTF |= (1 << 7);
-}
-
-void numlock_led_off(void) {
- PORTF &= ~(1 << 7);
-}
-
-
-
-void matrix_init_keymap(void) {
- // set Numlock LED to output and low
- DDRF |= (1 << 7);
- PORTF &= ~(1 << 7);
-}
-
-void matrix_scan_keymap(void) {
- numlock_led_off();
- if ((is_overwatch && biton32(layer_state) == _MACROS) || (biton32(layer_state) == _NUMLOCK)) {
- numlock_led_on();
- }
-
- // Run Diablo 3 macro checking code.
-}
-
-void led_set_keymap(uint8_t usb_led) {
- if (!(usb_led & (1<.
#include "config_common.h"
/* Use I2C or Serial, not both */
-
#define USE_I2C
-#define SCL_CLOCK 400000UL
-
-// #define USE_SERIAL
-/* serial.c configuration for split keyboard */
-// #define SOFT_SERIAL_PIN D0
+#define SCL_CLOCK 800000UL
/* Select hand configuration */
-
#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
//#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate.
#define FORCE_NKRO
@@ -41,6 +32,7 @@ along with this program. If not, see .
#define QMK_KEYS_PER_SCAN 4 //if we press four keys simultaneously, lets process them simultaneously...
#define DIODE_DIRECTION COL2ROW
+
#ifdef AUDIO_ENABLE
#define C6_AUDIO
#define STARTUP_SONG SONG(STARTUP_SOUND)
diff --git a/keyboards/handwired/xealous/debounce.c b/keyboards/handwired/xealous/debounce.c
deleted file mode 100644
index 65a99f27f26..00000000000
--- a/keyboards/handwired/xealous/debounce.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include
-#include "config.h"
-#include "matrix.h"
-#include "timer.h"
-#include "quantum.h"
-
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
-#endif
-
-//Debouncing counters
-typedef uint8_t debounce_counter_t;
-#define DEBOUNCE_COUNTER_MODULO 250
-#define DEBOUNCE_COUNTER_INACTIVE 251
-
-static debounce_counter_t *debounce_counters;
-
-void debounce_init(uint8_t num_rows)
-{
- debounce_counters = malloc(num_rows*MATRIX_COLS);
- memset(debounce_counters, DEBOUNCE_COUNTER_INACTIVE, num_rows*MATRIX_COLS);
-}
-
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
-{
- for (uint8_t row = 0; row < num_rows; row++)
- {
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- if (debounce_counters[row*MATRIX_COLS + col] != DEBOUNCE_COUNTER_INACTIVE)
- {
- if (TIMER_DIFF(current_time, debounce_counters[row*MATRIX_COLS + col], DEBOUNCE_COUNTER_MODULO) >= DEBOUNCING_DELAY) {
- debounce_counters[row*MATRIX_COLS + col] = DEBOUNCE_COUNTER_INACTIVE;
- }
- }
- }
- }
-}
-
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time)
-{
- for (uint8_t row = 0; row < num_rows; row++)
- {
- matrix_row_t delta = raw[row] ^ cooked[row];
-
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- if (debounce_counters[row*MATRIX_COLS + col] == DEBOUNCE_COUNTER_INACTIVE && (delta & (1<.
#include "matrix_scanrate.h"
#endif
-
-
-#ifdef USE_I2C
-# include "i2c.h"
-#else // USE_SERIAL
-# error "only i2c supported"
-#endif
-
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
-#endif
-
-
-#if (MATRIX_COLS <= 8)
-# define print_matrix_header() print("\nr/c 01234567\n")
-# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
-# define matrix_bitpop(i) bitpop(matrix[i])
-# define ROW_SHIFTER ((uint8_t)1)
-#else
-# error "Currently only supports 8 COLS"
-#endif
-
-#define ERROR_DISCONNECT_COUNT 5
-
-#define ROWS_PER_HAND (MATRIX_ROWS/2)
-
-static uint8_t error_count = 0;
-
-static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
-static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-static matrix_row_t* debouncing_matrix_hand_offsetted; //pointer to matrix_debouncing for our hand
-static matrix_row_t* matrix_hand_offsetted; // pointer to matrix for our hand
-
-//Debouncing counters
-typedef uint8_t debounce_counter_t;
-#define DEBOUNCE_COUNTER_MODULO 250
-#define DEBOUNCE_COUNTER_INACTIVE 251
-static debounce_counter_t debounce_counters[MATRIX_ROWS * MATRIX_COLS];
-static debounce_counter_t *debounce_counters_hand_offsetted;
-
-
-#if (DIODE_DIRECTION == ROW2COL)
- error "Only Col2Row supported";
-#endif
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
-static void unselect_row(uint8_t row);
-static matrix_row_t optimized_col_reader(void);
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_slave_scan_user(void) {
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-#ifdef DISABLE_JTAG
- // JTAG disable for PORT F. write JTD bit twice within four cycles.
- MCUCR |= (1<= (b) ? (a) - (b) : (max) - (b) + (a))
-void update_debounce_counters(uint8_t current_time)
-{
- debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted;
- for (uint8_t row = 0; row < ROWS_PER_HAND; row++)
- {
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- if (*debounce_pointer != DEBOUNCE_COUNTER_INACTIVE)
- {
- if (TIMER_DIFF(current_time, *debounce_pointer, DEBOUNCE_COUNTER_MODULO) >=
- DEBOUNCING_DELAY) {
- *debounce_pointer = DEBOUNCE_COUNTER_INACTIVE;
- }
- }
- debounce_pointer++;
- }
- }
-}
-
-void transfer_matrix_values(uint8_t current_time)
-{
- //upload from debounce_matrix to final matrix;
- debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted;
- for (uint8_t row = 0; row < ROWS_PER_HAND; row++)
- {
- matrix_row_t row_value = matrix_hand_offsetted[row];
- matrix_row_t debounce_value = debouncing_matrix_hand_offsetted[row];
-
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- bool final_value = debounce_value & (1 << col);
- bool current_value = row_value & (1 << col);
- if (*debounce_pointer == DEBOUNCE_COUNTER_INACTIVE
- && (current_value != final_value))
- {
- *debounce_pointer = current_time;
- row_value ^= (1 << col);
- }
- debounce_pointer++;
- }
- matrix_hand_offsetted[row] = row_value;
- }
-}
-
-uint8_t _matrix_scan(void)
-{
- uint8_t current_time = timer_read() % DEBOUNCE_COUNTER_MODULO;
-
- // Set row, read cols
- for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
- select_row(current_row);
- asm volatile ("nop"); asm volatile("nop");
-
- debouncing_matrix_hand_offsetted[current_row] = optimized_col_reader();
- // Unselect row
- unselect_row(current_row);
- }
-
- update_debounce_counters(current_time);
- transfer_matrix_values(current_time);
-
- return 1;
-}
-
-
-// Get rows from other half over i2c
-int i2c_transaction(void) {
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
-
- int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
- if (err) goto i2c_error;
-
- // start of matrix stored at 0x00
- err = i2c_master_write(I2C_KEYMAP_START);
- if (err) goto i2c_error;
-
- // Start read
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
- if (err) goto i2c_error;
-
- if (!err) {
- int i;
- for (i = 0; i < ROWS_PER_HAND-1; ++i) {
- matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
- }
- matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- } else {
-i2c_error: // the cable is disconnceted, or something else went wrong
- i2c_reset_state();
- return err;
- }
-
- return 0;
-}
-
-uint8_t matrix_scan(void)
+void matrix_scan_user(void)
{
#ifdef DEBUG_MATRIX_SCAN_RATE
matrix_check_scan_rate();
matrix_time_between_scans();
#endif
- uint8_t ret = _matrix_scan();
-
- if( i2c_transaction() ) {
- // turn on the indicator led when halves are disconnected
- TXLED1;
-
- error_count++;
-
- if (error_count > ERROR_DISCONNECT_COUNT) {
- // reset other half if disconnected
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[slaveOffset+i] = 0;
- }
- }
- } else {
- // turn off the indicator led on no error
- TXLED0;
- error_count = 0;
- }
- matrix_scan_quantum();
- return ret;
+
}
-void matrix_slave_scan(void) {
- _matrix_scan();
-
- int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
-
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i];
- }
-
- matrix_slave_scan_user();
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN
- _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
- }
-}
-
-inline
-static matrix_row_t optimized_col_reader(void) {
+// Copy this code to split_common/matrix.c,
+// and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920
+// Also remove the sleep_us(30), not necessary for this keyboard.
+// In usb_descriptor.c, set .PollingIntervalMS = 0x01
+#define ROW_SHIFTER ((uint8_t)1)
+inline static matrix_row_t optimized_col_reader(void) {
//MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
return (PINB & (1 << 6) ? 0 : (ROW_SHIFTER << 0)) |
(PINB & (1 << 2) ? 0 : (ROW_SHIFTER << 1)) |
@@ -351,26 +61,3 @@ static matrix_row_t optimized_col_reader(void) {
}
-static void select_row(uint8_t row)
-{
- uint8_t pin = row_pins[row];
- _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
- _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
-}
-
-static void unselect_row(uint8_t row)
-{
- uint8_t pin = row_pins[row];
- _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
- _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
-}
-
-static void unselect_rows(void)
-{
- for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
- uint8_t pin = row_pins[x];
- _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
- _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
- }
-}
-
diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk
index 7d07c9aa5ff..ef3357982ea 100644
--- a/keyboards/handwired/xealous/rules.mk
+++ b/keyboards/handwired/xealous/rules.mk
@@ -1,5 +1,4 @@
-#SRC += matrix_scanrate.c matrix.c
-SRC += debounce.c
+SRC += matrix_scanrate.c matrix.c
# MCU name
MCU = atmega32u4
@@ -67,8 +66,7 @@ SUBPROJECT_rev1 = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-CUSTOM_MATRIX = no
-DEBOUNCE_TYPE = custom
+DEBOUNCE_TYPE = eager_pk
LAYOUTS = split60
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c
index 5664d4d2a54..a15f5e5e0b3 100644
--- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c
+++ b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c
@@ -1,4 +1,5 @@
#include "quantum.h"
+#include "command.h"
#include "action_pseudo_lut.h"
static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h
index 7581e54b619..528f08bb994 100644
--- a/keyboards/hs60/v1/config.h
+++ b/keyboards/hs60/v1/config.h
@@ -120,7 +120,6 @@ along with this program. If not, see .
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-#define RGB_MATRIX_SKIP_FRAMES 0
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215
#define DRIVER_ADDR_1 0b1110100
diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h
index b0c56adf891..05255d13310 100644
--- a/keyboards/hs60/v2/config.h
+++ b/keyboards/hs60/v2/config.h
@@ -102,9 +102,19 @@ along with this program. If not, see .
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
#define DRIVER_COUNT 2
#define DRIVER_LED_TOTAL 64
@@ -119,6 +129,11 @@ along with this program. If not, see .
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 32
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/config.h b/keyboards/hs60/v2/keymaps/goatmaster/config.h
new file mode 100644
index 00000000000..f63c9035567
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/config.h
@@ -0,0 +1,37 @@
+/*
+Copyright 2018 Yiancar
+
+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 .
+*/
+#pragma once
+
+/* Include overwrites for specific keymap */
+
+#define HS60_HHKB
+#undef PRODUCT_ID
+#define PRODUCT_ID 0x4855
+
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111
+
+#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 255 }, .index = 3-1 } //red
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/keymap.c b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c
new file mode 100644
index 00000000000..6273dbc646e
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c
@@ -0,0 +1,71 @@
+/* Copyright 2018 Yiancar
+ *
+ * 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 .
+ */
+#include QMK_KEYBOARD_H
+
+//This is the HHKB version of the PCB
+
+enum macro_keys {
+ KC_EML = SAFE_RANGE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_60_hhkb( /* Base */
+ 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_GRV, KC_BSLS,\
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ),
+
+[1] = LAYOUT_60_hhkb( /* FN */
+ 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_TRNS,\
+ KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, \
+ 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, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+
+[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+
+[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+};
+
+void matrix_init_user(void) {
+ //user initialization
+}
+
+void matrix_scan_user(void) {
+ //user matrix
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_EML: //use "KC_EML" as keycode in layers above to call macro
+ if (!record->event.pressed) {
+ send_string_with_delay_P(PSTR("example@email.com"), 10); //change email value here
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/readme.md b/keyboards/hs60/v2/keymaps/goatmaster/readme.md
new file mode 100644
index 00000000000..ea9803cc0bb
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/readme.md
@@ -0,0 +1,6 @@
+The default keymap for HHKB HS60 V2. VIA support enabled.
+=========================================================
+
+
+
+Default layer is normal HHKB with 7U space. Fn layer is used for RGB functions, Volume control and arrow cluster
\ No newline at end of file
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
new file mode 100644
index 00000000000..a2850a83057
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
@@ -0,0 +1,66 @@
+# project specific files
+SRC = keyboards/zeal60/zeal60.c \
+ keyboards/zeal60/rgb_backlight.c \
+ drivers/issi/is31fl3733.c \
+ quantum/color.c \
+ drivers/arm/i2c_master.c
+
+## chip/board settings
+# the next two should match the directories in
+# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = STM32
+MCU_SERIES = STM32F3xx
+
+# Linker script to use
+# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/
+# or /ld/
+MCU_LDSCRIPT = STM32F303xC
+
+# Startup code to use
+# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = stm32f3xx
+
+# Board: it should exist either in /os/hal/boards/
+# or /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 =
+
+# Do not put the microcontroller into power saving mode
+# when we get USB suspend event. We want it to keep updating
+# backlight effects.
+OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
+
+# 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 # Enable keyboard backlight functionality
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no # Audio output on port C6
+NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+#SERIAL_LINK_ENABLE = yes
+
+RAW_ENABLE = yes
+DYNAMIC_KEYMAP_ENABLE = yes
+CIE1931_CURVE = yes
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h
index 4576211f102..5aab3098c7d 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/config.h
+++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h
@@ -20,3 +20,22 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 //Setting \ key to "MOD" instead of "ALPHA" for lighting
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
+
+#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR
+#undef RGB_BACKLIGHT_LAYER_1_INDICATOR
+#undef RGB_BACKLIGHT_LAYER_2_INDICATOR
+#undef RGB_BACKLIGHT_LAYER_3_INDICATOR
+
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 200, .s = 255 }, .index = 3-1 } //purple
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 100, .s = 255 }, .index = 60-1 } //green
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 150, .s = 255 }, .index = 60-1 } //blue
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 60-1 } //white
+
+#undef RGB_BACKLIGHT_BRIGHTNESS
+#define RGB_BACKLIGHT_BRIGHTNESS 175
+
+#undef RGB_BACKLIGHT_COLOR_1
+#undef RGB_BACKLIGHT_COLOR_2
+
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 }
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
index a2850a83057..c46a6b9528c 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
+++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
@@ -1,6 +1,6 @@
# project specific files
SRC = keyboards/zeal60/zeal60.c \
- keyboards/zeal60/rgb_backlight.c \
+ keyboards/zeal60/rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
diff --git a/keyboards/jj40/backlight.c b/keyboards/jj40/backlight.c
deleted file mode 100644
index fbd241fa9de..00000000000
--- a/keyboards/jj40/backlight.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * Backlighting code for PS2AVRGB boards (ATMEGA32A)
- * Kenneth A. (github.com/krusli | krusli.me)
- */
-
-#include "backlight.h"
-#include "quantum.h"
-
-#include
-#include
-
-#include "backlight_custom.h"
-#include "breathing_custom.h"
-
-// DEBUG
-#include
-#include
-
-// Port D: digital pins of the AVR chipset
-#define NUMLOCK_PORT (1 << 0) // D0
-#define CAPSLOCK_PORT (1 << 1) // D1
-#define BACKLIGHT_PORT (1 << 4) // D4
-#define SCROLLLOCK_PORT (1 << 6) // D6
-
-#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64
-#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default
-
-#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask
-
-#define PWM_MAX 0xFF
-#define TIMER_TOP 255 // 8 bit PWM
-
-extern backlight_config_t backlight_config;
-
-/**
- * References
- * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation
- * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b
- * Timers: http://www.avrbeginners.net/architecture/timers/timers.html
- * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/
- * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware
- */
-
-// @Override
-// turn LEDs on and off depending on USB caps/num/scroll lock states.
-__attribute__ ((weak))
-void led_set_user(uint8_t usb_led) {
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- // turn on
- DDRD |= NUMLOCK_PORT;
- PORTD |= NUMLOCK_PORT;
- } else {
- // turn off
- DDRD &= ~NUMLOCK_PORT;
- PORTD &= ~NUMLOCK_PORT;
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRD |= CAPSLOCK_PORT;
- PORTD |= CAPSLOCK_PORT;
- } else {
- DDRD &= ~CAPSLOCK_PORT;
- PORTD &= ~CAPSLOCK_PORT;
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
- DDRD |= SCROLLLOCK_PORT;
- PORTD |= SCROLLLOCK_PORT;
- } else {
- DDRD &= ~SCROLLLOCK_PORT;
- PORTD &= ~SCROLLLOCK_PORT;
- }
-}
-
-#ifdef BACKLIGHT_ENABLE
-
-// sets up Timer 1 for 8-bit PWM
-void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE
- // default 8 bit mode
- TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH
- TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW
-
- // clear output compare value A
- // outb(OCR1AH, 0);
- // outb(OCR1AL, 0);
-
- // clear output comparator registers for B
- OCR1BH = 0; // outb(OCR1BH, 0);
- OCR1BL = 0; // outb(OCR1BL, 0);
-}
-
-bool is_init = false;
-void timer1Init(void) {
- // timer1SetPrescaler(TIMER1PRESCALE)
- // set to DIV/64
- (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE;
-
- // reset TCNT1
- TCNT1H = 0; // outb(TCNT1H, 0);
- TCNT1L = 0; // outb(TCNT1L, 0);
-
- // TOIE1: Timer Overflow Interrupt Enable (Timer 1);
- TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1);
-
- is_init = true;
-}
-
-void timer1UnInit(void) {
- // set prescaler back to NONE
- (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP
-
- // disable timer overflow interrupt
- TIMSK &= ~_BV(TOIE1); // overflow bit?
-
- setPWM(0);
-
- is_init = false;
-}
-
-
-// handle TCNT1 overflow
-//! Interrupt handler for tcnt1 overflow interrupt
-ISR(TIMER1_OVF_vect, ISR_NOBLOCK)
-{
- // sei();
- // handle breathing here
- #ifdef BACKLIGHT_BREATHING
- if (is_breathing()) {
- custom_breathing_handler();
- }
- #endif
-
- // TODO call user defined function
-}
-
-// enable timer 1 PWM
-// timer1PWMBOn()
-void timer1PWMBEnable(void) {
- // turn on channel B (OC1B) PWM output
- // set OC1B as non-inverted PWM
- TCCR1A |= _BV(COM1B1);
- TCCR1A &= ~_BV(COM1B0);
-}
-
-// disable timer 1 PWM
-// timer1PWMBOff()
-void timer1PWMBDisable(void) {
- TCCR1A &= ~_BV(COM1B1);
- TCCR1A &= ~_BV(COM1B0);
-}
-
-void enableBacklight(void) {
- DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
- PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
-}
-
-void disableBacklight(void) {
- // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
- PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
-}
-
-void startPWM(void) {
- timer1Init();
- timer1PWMBEnable();
- enableBacklight();
-}
-
-void stopPWM(void) {
- timer1UnInit();
- disableBacklight();
- timer1PWMBDisable();
-}
-
-void b_led_init_ports(void) {
- /* turn backlight on/off depending on user preference */
- #if BACKLIGHT_ON_STATE == 0
- // DDRx register: sets the direction of Port D
- // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
- PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
- #else
- DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
- PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
- #endif
-
- timer1PWMSetup();
- startPWM();
-
- #ifdef BACKLIGHT_BREATHING
- breathing_enable();
- #endif
-}
-
-void b_led_set(uint8_t level) {
- if (level > BACKLIGHT_LEVELS) {
- level = BACKLIGHT_LEVELS;
- }
-
- setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS));
-}
-
-// called every matrix scan
-void b_led_task(void) {
- // do nothing for now
-}
-
-void setPWM(uint16_t xValue) {
- if (xValue > TIMER_TOP) {
- xValue = TIMER_TOP;
- }
- OCR1B = xValue; // timer1PWMBSet(xValue);
-}
-
-#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/jj40/backlight_custom.h b/keyboards/jj40/backlight_custom.h
deleted file mode 100644
index 7210be840e0..00000000000
--- a/keyboards/jj40/backlight_custom.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Backlighting code for PS2AVRGB boards (ATMEGA32A)
- * Kenneth A. (github.com/krusli | krusli.me)
- */
-
-#ifndef BACKLIGHT_CUSTOM_H
-#define BACKLIGHT_CUSTOM_H
-
-#include
-void b_led_init_ports(void);
-void b_led_set(uint8_t level);
-void b_led_task(void);
-void setPWM(uint16_t xValue);
-
-#endif // BACKLIGHT_CUSTOM_H
diff --git a/keyboards/jj40/breathing_custom.h b/keyboards/jj40/breathing_custom.h
deleted file mode 100644
index 71416b1b45d..00000000000
--- a/keyboards/jj40/breathing_custom.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Breathing effect code for PS2AVRGB boards (ATMEGA32A)
- * Works in conjunction with `backlight.c`.
- *
- * Code adapted from `quantum.c` to register with the existing TIMER1 overflow
- * handler in `backlight.c` instead of setting up its own timer.
- * Kenneth A. (github.com/krusli | krusli.me)
- */
-
-#ifdef BACKLIGHT_ENABLE
-#ifdef BACKLIGHT_BREATHING
-
-#include "backlight_custom.h"
-
-#ifndef BREATHING_PERIOD
-#define BREATHING_PERIOD 6
-#endif
-
-#define breathing_min() do {breathing_counter = 0;} while (0)
-#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0)
-
-// TODO make this share code with quantum.c
-
-#define BREATHING_NO_HALT 0
-#define BREATHING_HALT_OFF 1
-#define BREATHING_HALT_ON 2
-#define BREATHING_STEPS 128
-
-static uint8_t breathing_period = BREATHING_PERIOD;
-static uint8_t breathing_halt = BREATHING_NO_HALT;
-static uint16_t breathing_counter = 0;
-
-static bool breathing = false;
-
-bool is_breathing(void) {
- return breathing;
-}
-
-// See http://jared.geek.nz/2013/feb/linear-led-pwm
-static uint16_t cie_lightness(uint16_t v) {
- if (v <= 5243) // if below 8% of max
- return v / 9; // same as dividing by 900%
- else {
- uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
- // to get a useful result with integer division, we shift left in the expression above
- // and revert what we've done again after squaring.
- y = y * y * y >> 8;
- if (y > 0xFFFFUL) // prevent overflow
- return 0xFFFFU;
- else
- return (uint16_t) y;
- }
-}
-
-void breathing_enable(void) {
- breathing = true;
- breathing_counter = 0;
- breathing_halt = BREATHING_NO_HALT;
- // interrupt already registered
-}
-
-void breathing_pulse(void) {
- if (get_backlight_level() == 0)
- breathing_min();
- else
- breathing_max();
- breathing_halt = BREATHING_HALT_ON;
- // breathing_interrupt_enable();
- breathing = true;
-}
-
-void breathing_disable(void) {
- breathing = false;
- // backlight_set(get_backlight_level());
- b_led_set(get_backlight_level()); // custom implementation of backlight_set()
-}
-
-void breathing_self_disable(void)
-{
- if (get_backlight_level() == 0)
- breathing_halt = BREATHING_HALT_OFF;
- else
- breathing_halt = BREATHING_HALT_ON;
-}
-
-void breathing_toggle(void) {
- if (is_breathing())
- breathing_disable();
- else
- breathing_enable();
-}
-
-void breathing_period_set(uint8_t value)
-{
- if (!value)
- value = 1;
- breathing_period = value;
-}
-
-void breathing_period_default(void) {
- breathing_period_set(BREATHING_PERIOD);
-}
-
-void breathing_period_inc(void)
-{
- breathing_period_set(breathing_period+1);
-}
-
-void breathing_period_dec(void)
-{
- breathing_period_set(breathing_period-1);
-}
-
-/* To generate breathing curve in python:
- * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)]
- */
-static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-// Use this before the cie_lightness function.
-static inline uint16_t scale_backlight(uint16_t v) {
- return v / BACKLIGHT_LEVELS * get_backlight_level();
-}
-
-void custom_breathing_handler(void) {
- uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS;
- // resetting after one period to prevent ugly reset at overflow.
- breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
- uint8_t index = breathing_counter / interval % BREATHING_STEPS;
-
- if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) ||
- ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1)))
- {
- // breathing_interrupt_disable();
- }
-
- setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U)));
-}
-
-#endif // BACKLIGHT_BREATHING
-#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h
index 67561b0b28b..e88147ac85c 100644
--- a/keyboards/jj40/config.h
+++ b/keyboards/jj40/config.h
@@ -1,51 +1,55 @@
/*
Copyright 2017 Luiz Ribeiro
-
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 .
*/
-#include "config_common.h"
+#pragma once
-#ifndef CONFIG_H
-#define CONFIG_H
+#include "config_common.h"
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
// TODO: share these strings with usbconfig.h
// Edit usbconfig.h to change these.
-#define MANUFACTURER winkeyless.kr
+#define MANUFACTURER Kprepublic
#define PRODUCT jj40
/* matrix size */
-#define MATRIX_ROWS 8
-#define MATRIX_COLS 15
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+#define MATRIX_ROW_PINS { B0, B1, B3, B4 }
+#define MATRIX_COL_PINS { C4, C5, C6, C7, A4, A5, A6, A7, A3, A2, A1, A0 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 12
-// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work
+// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a
-#define TAPPING_TOGGLE 3
+/* RGB underglow */
+// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
+#define RGBLED_NUM 5
+#define RGBLIGHT_ANIMATIONS
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
#define NO_UART 1
-/* RGB underglow */
-// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards.
-// The same pin is used on the JJ40, at least.
-#define RGBLED_NUM 5
-#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
-#define RGBLIGHT_ANIMATIONS
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
-#endif
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/jj40/i2c.c b/keyboards/jj40/i2c.c
deleted file mode 100644
index c27f3e3d17e..00000000000
--- a/keyboards/jj40/i2c.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c
index 51f5295f465..26cfa6c067e 100644
--- a/keyboards/jj40/jj40.c
+++ b/keyboards/jj40/jj40.c
@@ -18,53 +18,26 @@ along with this program. If not, see .
#include "jj40.h"
-#include
+#ifdef RGBLIGHT_ENABLE
-#include "action_layer.h"
-#include "quantum.h"
+#include
+#include "i2c_master.h"
+#include "rgblight.h"
-#include "i2c.h"
+extern rgblight_config_t rgblight_config;
-#include "backlight.h"
-#include "backlight_custom.h"
-
-// for keyboard subdirectory level init functions
-// @Override
void matrix_init_kb(void) {
+ i2c_init();
// call user level keymaps, if any
matrix_init_user();
}
-
-#ifdef BACKLIGHT_ENABLE
-/// Overrides functions in `quantum.c`
-void backlight_init_ports(void) {
- b_led_init_ports();
-}
-
-void backlight_task(void) {
- b_led_task();
-}
-
-void backlight_set(uint8_t level) {
- b_led_set(level);
-}
-#endif
-
-#ifdef RGBLIGHT_ENABLE
-extern rgblight_config_t rgblight_config;
-
// custom RGB driver
void rgblight_set(void) {
if (!rgblight_config.enable) {
- for (uint8_t i=0; i.
*/
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
+#pragma once
#include "quantum.h"
-#include "quantum_keycodes.h"
-#include "keycode.h"
-#include "action.h"
-
-void matrix_init_user(void); // TODO port this to other PS2AVRGB boards
-
-#define XXX KC_NO
+#define ___ KC_NO
#define LAYOUT_ortho_4x12( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \
) \
{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \
}
#define LAYOUT_planck_mit( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K3X, K37, K38, K39, K3A, K3B \
) \
{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K3X, XXX, K38, K34, K33, K32, K31 } \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, K33, K34, K3X, ___, K37, K38, K39, K3A, K3B } \
}
#define LAYOUT_planck_1x2uR( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K3X, K38, K39, K3A, K3B \
) \
{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K3X, XXX, K34, K33, K32, K31 } \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, K33, K34, K35, K3X, ___, K38, K39, K3A, K3B } \
}
#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
- ) \
- LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+LAYOUT_ortho_4x12( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
)
#define LAYOUT LAYOUT_planck_mit
-
#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-
-#endif
+#define KC_LAYOUT_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/jj40/keymaps/default/keymap.c b/keyboards/jj40/keymaps/default/keymap.c
index d84b01b15a4..47c6bada689 100644
--- a/keyboards/jj40/keymaps/default/keymap.c
+++ b/keyboards/jj40/keymaps/default/keymap.c
@@ -1,16 +1,30 @@
+/* Copyright 2019
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
+enum layers {
+ _QWERTY = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
};
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
@@ -27,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
- _______, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
@@ -64,10 +78,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12( \
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
+ _______, _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
-// Loop
-void matrix_scan_user(void) {
- // Empty
-};
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
diff --git a/keyboards/jj40/matrix.c b/keyboards/jj40/matrix.c
deleted file mode 100644
index 245813dfd2d..00000000000
--- a/keyboards/jj40/matrix.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include
-#include
-
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_set_row_status(uint8_t row);
-uint8_t bit_reverse(uint8_t x);
-
-void matrix_init(void) {
- // all outputs for rows high
- DDRB = 0xFF;
- PORTB = 0xFF;
- // all inputs for columns
- DDRA = 0x00;
- DDRC &= ~(0x111111<<2);
- DDRD &= ~(1< 7
- (~PINA) & 0xFF
- ) | (
- // cols 8..13, PORTC 7 -> 0
- bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
- );
-
- if (matrix_debouncing[row] != cols) {
- matrix_debouncing[row] = cols;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-// declarations
-void matrix_set_row_status(uint8_t row) {
- DDRB = (1 << row);
- PORTB = ~(1 << row);
-}
-
-uint8_t bit_reverse(uint8_t x) {
- x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
- return x;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk
index 697e17a0141..3e496f97e95 100644
--- a/keyboards/jj40/rules.mk
+++ b/keyboards/jj40/rules.mk
@@ -30,29 +30,29 @@ F_CPU = 12000000
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = bootloadHID
-# build options
-BOOTMAGIC_ENABLE = no
-MOUSEKEY_ENABLE = no
-EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
-COMMAND_ENABLE = yes
-
-BACKLIGHT_ENABLE = yes
-BACKLIGHT_CUSTOM_DRIVER = yes
-
-RGBLIGHT_ENABLE = yes
-RGBLIGHT_CUSTOM_DRIVER = yes
-
-KEY_LOCK_ENABLE = yes
-
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+RGBLIGHT_CUSTOM_DRIVER = yes
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
-OPT_DEFS = -DDEBUG_LEVEL=0
-
-# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c backlight.c
+SRC += i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/jj4x4/backlight.c b/keyboards/jj4x4/backlight.c
deleted file mode 100644
index fbd241fa9de..00000000000
--- a/keyboards/jj4x4/backlight.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * Backlighting code for PS2AVRGB boards (ATMEGA32A)
- * Kenneth A. (github.com/krusli | krusli.me)
- */
-
-#include "backlight.h"
-#include "quantum.h"
-
-#include
-#include
-
-#include "backlight_custom.h"
-#include "breathing_custom.h"
-
-// DEBUG
-#include
-#include
-
-// Port D: digital pins of the AVR chipset
-#define NUMLOCK_PORT (1 << 0) // D0
-#define CAPSLOCK_PORT (1 << 1) // D1
-#define BACKLIGHT_PORT (1 << 4) // D4
-#define SCROLLLOCK_PORT (1 << 6) // D6
-
-#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64
-#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default
-
-#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask
-
-#define PWM_MAX 0xFF
-#define TIMER_TOP 255 // 8 bit PWM
-
-extern backlight_config_t backlight_config;
-
-/**
- * References
- * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation
- * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b
- * Timers: http://www.avrbeginners.net/architecture/timers/timers.html
- * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/
- * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware
- */
-
-// @Override
-// turn LEDs on and off depending on USB caps/num/scroll lock states.
-__attribute__ ((weak))
-void led_set_user(uint8_t usb_led) {
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- // turn on
- DDRD |= NUMLOCK_PORT;
- PORTD |= NUMLOCK_PORT;
- } else {
- // turn off
- DDRD &= ~NUMLOCK_PORT;
- PORTD &= ~NUMLOCK_PORT;
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRD |= CAPSLOCK_PORT;
- PORTD |= CAPSLOCK_PORT;
- } else {
- DDRD &= ~CAPSLOCK_PORT;
- PORTD &= ~CAPSLOCK_PORT;
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
- DDRD |= SCROLLLOCK_PORT;
- PORTD |= SCROLLLOCK_PORT;
- } else {
- DDRD &= ~SCROLLLOCK_PORT;
- PORTD &= ~SCROLLLOCK_PORT;
- }
-}
-
-#ifdef BACKLIGHT_ENABLE
-
-// sets up Timer 1 for 8-bit PWM
-void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE
- // default 8 bit mode
- TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH
- TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW
-
- // clear output compare value A
- // outb(OCR1AH, 0);
- // outb(OCR1AL, 0);
-
- // clear output comparator registers for B
- OCR1BH = 0; // outb(OCR1BH, 0);
- OCR1BL = 0; // outb(OCR1BL, 0);
-}
-
-bool is_init = false;
-void timer1Init(void) {
- // timer1SetPrescaler(TIMER1PRESCALE)
- // set to DIV/64
- (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE;
-
- // reset TCNT1
- TCNT1H = 0; // outb(TCNT1H, 0);
- TCNT1L = 0; // outb(TCNT1L, 0);
-
- // TOIE1: Timer Overflow Interrupt Enable (Timer 1);
- TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1);
-
- is_init = true;
-}
-
-void timer1UnInit(void) {
- // set prescaler back to NONE
- (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP
-
- // disable timer overflow interrupt
- TIMSK &= ~_BV(TOIE1); // overflow bit?
-
- setPWM(0);
-
- is_init = false;
-}
-
-
-// handle TCNT1 overflow
-//! Interrupt handler for tcnt1 overflow interrupt
-ISR(TIMER1_OVF_vect, ISR_NOBLOCK)
-{
- // sei();
- // handle breathing here
- #ifdef BACKLIGHT_BREATHING
- if (is_breathing()) {
- custom_breathing_handler();
- }
- #endif
-
- // TODO call user defined function
-}
-
-// enable timer 1 PWM
-// timer1PWMBOn()
-void timer1PWMBEnable(void) {
- // turn on channel B (OC1B) PWM output
- // set OC1B as non-inverted PWM
- TCCR1A |= _BV(COM1B1);
- TCCR1A &= ~_BV(COM1B0);
-}
-
-// disable timer 1 PWM
-// timer1PWMBOff()
-void timer1PWMBDisable(void) {
- TCCR1A &= ~_BV(COM1B1);
- TCCR1A &= ~_BV(COM1B0);
-}
-
-void enableBacklight(void) {
- DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
- PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
-}
-
-void disableBacklight(void) {
- // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
- PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
-}
-
-void startPWM(void) {
- timer1Init();
- timer1PWMBEnable();
- enableBacklight();
-}
-
-void stopPWM(void) {
- timer1UnInit();
- disableBacklight();
- timer1PWMBDisable();
-}
-
-void b_led_init_ports(void) {
- /* turn backlight on/off depending on user preference */
- #if BACKLIGHT_ON_STATE == 0
- // DDRx register: sets the direction of Port D
- // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
- PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
- #else
- DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
- PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
- #endif
-
- timer1PWMSetup();
- startPWM();
-
- #ifdef BACKLIGHT_BREATHING
- breathing_enable();
- #endif
-}
-
-void b_led_set(uint8_t level) {
- if (level > BACKLIGHT_LEVELS) {
- level = BACKLIGHT_LEVELS;
- }
-
- setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS));
-}
-
-// called every matrix scan
-void b_led_task(void) {
- // do nothing for now
-}
-
-void setPWM(uint16_t xValue) {
- if (xValue > TIMER_TOP) {
- xValue = TIMER_TOP;
- }
- OCR1B = xValue; // timer1PWMBSet(xValue);
-}
-
-#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/jj4x4/backlight_custom.h b/keyboards/jj4x4/backlight_custom.h
deleted file mode 100644
index 7210be840e0..00000000000
--- a/keyboards/jj4x4/backlight_custom.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Backlighting code for PS2AVRGB boards (ATMEGA32A)
- * Kenneth A. (github.com/krusli | krusli.me)
- */
-
-#ifndef BACKLIGHT_CUSTOM_H
-#define BACKLIGHT_CUSTOM_H
-
-#include
-void b_led_init_ports(void);
-void b_led_set(uint8_t level);
-void b_led_task(void);
-void setPWM(uint16_t xValue);
-
-#endif // BACKLIGHT_CUSTOM_H
diff --git a/keyboards/jj4x4/breathing_custom.h b/keyboards/jj4x4/breathing_custom.h
deleted file mode 100644
index 71416b1b45d..00000000000
--- a/keyboards/jj4x4/breathing_custom.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Breathing effect code for PS2AVRGB boards (ATMEGA32A)
- * Works in conjunction with `backlight.c`.
- *
- * Code adapted from `quantum.c` to register with the existing TIMER1 overflow
- * handler in `backlight.c` instead of setting up its own timer.
- * Kenneth A. (github.com/krusli | krusli.me)
- */
-
-#ifdef BACKLIGHT_ENABLE
-#ifdef BACKLIGHT_BREATHING
-
-#include "backlight_custom.h"
-
-#ifndef BREATHING_PERIOD
-#define BREATHING_PERIOD 6
-#endif
-
-#define breathing_min() do {breathing_counter = 0;} while (0)
-#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0)
-
-// TODO make this share code with quantum.c
-
-#define BREATHING_NO_HALT 0
-#define BREATHING_HALT_OFF 1
-#define BREATHING_HALT_ON 2
-#define BREATHING_STEPS 128
-
-static uint8_t breathing_period = BREATHING_PERIOD;
-static uint8_t breathing_halt = BREATHING_NO_HALT;
-static uint16_t breathing_counter = 0;
-
-static bool breathing = false;
-
-bool is_breathing(void) {
- return breathing;
-}
-
-// See http://jared.geek.nz/2013/feb/linear-led-pwm
-static uint16_t cie_lightness(uint16_t v) {
- if (v <= 5243) // if below 8% of max
- return v / 9; // same as dividing by 900%
- else {
- uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
- // to get a useful result with integer division, we shift left in the expression above
- // and revert what we've done again after squaring.
- y = y * y * y >> 8;
- if (y > 0xFFFFUL) // prevent overflow
- return 0xFFFFU;
- else
- return (uint16_t) y;
- }
-}
-
-void breathing_enable(void) {
- breathing = true;
- breathing_counter = 0;
- breathing_halt = BREATHING_NO_HALT;
- // interrupt already registered
-}
-
-void breathing_pulse(void) {
- if (get_backlight_level() == 0)
- breathing_min();
- else
- breathing_max();
- breathing_halt = BREATHING_HALT_ON;
- // breathing_interrupt_enable();
- breathing = true;
-}
-
-void breathing_disable(void) {
- breathing = false;
- // backlight_set(get_backlight_level());
- b_led_set(get_backlight_level()); // custom implementation of backlight_set()
-}
-
-void breathing_self_disable(void)
-{
- if (get_backlight_level() == 0)
- breathing_halt = BREATHING_HALT_OFF;
- else
- breathing_halt = BREATHING_HALT_ON;
-}
-
-void breathing_toggle(void) {
- if (is_breathing())
- breathing_disable();
- else
- breathing_enable();
-}
-
-void breathing_period_set(uint8_t value)
-{
- if (!value)
- value = 1;
- breathing_period = value;
-}
-
-void breathing_period_default(void) {
- breathing_period_set(BREATHING_PERIOD);
-}
-
-void breathing_period_inc(void)
-{
- breathing_period_set(breathing_period+1);
-}
-
-void breathing_period_dec(void)
-{
- breathing_period_set(breathing_period-1);
-}
-
-/* To generate breathing curve in python:
- * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)]
- */
-static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-// Use this before the cie_lightness function.
-static inline uint16_t scale_backlight(uint16_t v) {
- return v / BACKLIGHT_LEVELS * get_backlight_level();
-}
-
-void custom_breathing_handler(void) {
- uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS;
- // resetting after one period to prevent ugly reset at overflow.
- breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
- uint8_t index = breathing_counter / interval % BREATHING_STEPS;
-
- if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) ||
- ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1)))
- {
- // breathing_interrupt_disable();
- }
-
- setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U)));
-}
-
-#endif // BACKLIGHT_BREATHING
-#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h
index 3ecdc06eaee..a8df46f016e 100644
--- a/keyboards/jj4x4/config.h
+++ b/keyboards/jj4x4/config.h
@@ -19,7 +19,6 @@ along with this program. If not, see .
#include "config_common.h"
-
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
// TODO: share these strings with usbconfig.h
@@ -36,16 +35,24 @@ along with this program. If not, see .
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 12
-// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work
+// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a
-#define TAPPING_TOGGLE 3
+/* RGB underglow */
+// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
+#define RGBLED_NUM 4
+#define RGBLIGHT_ANIMATIONS
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
#define NO_UART 1
-/* RGB underglow */
-// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards.
-// The same pin is used on the JJ40, at least.
-#define RGBLED_NUM 5
-#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0.
-#define RGBLIGHT_ANIMATIONS
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/jj4x4/i2c.c b/keyboards/jj4x4/i2c.c
deleted file mode 100644
index c27f3e3d17e..00000000000
--- a/keyboards/jj4x4/i2c.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c
index 6fbff7afba6..265508b2d5b 100644
--- a/keyboards/jj4x4/jj4x4.c
+++ b/keyboards/jj4x4/jj4x4.c
@@ -18,53 +18,26 @@ along with this program. If not, see .
#include "jj4x4.h"
-#include
+#ifdef RGBLIGHT_ENABLE
-#include "action_layer.h"
-#include "quantum.h"
+#include
+#include "i2c_master.h"
+#include "rgblight.h"
-#include "i2c.h"
+extern rgblight_config_t rgblight_config;
-#include "backlight.h"
-#include "backlight_custom.h"
-
-// for keyboard subdirectory level init functions
-// @Override
void matrix_init_kb(void) {
+ i2c_init();
// call user level keymaps, if any
matrix_init_user();
}
-
-#ifdef BACKLIGHT_ENABLE
-/// Overrides functions in `quantum.c`
-void backlight_init_ports(void) {
- b_led_init_ports();
-}
-
-void backlight_task(void) {
- b_led_task();
-}
-
-void backlight_set(uint8_t level) {
- b_led_set(level);
-}
-#endif
-
-#ifdef RGBLIGHT_ENABLE
-extern rgblight_config_t rgblight_config;
-
// custom RGB driver
void rgblight_set(void) {
if (!rgblight_config.enable) {
- for (uint8_t i=0; i.
#include "quantum.h"
-void matrix_init_user(void); // TODO port this to other PS2AVRGB boards
-
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
#define LAYOUT_ortho_4x4( \
K01, K02, K03, K04, \
K11, K12, K13, K14, \
diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c
index 51d4e7d6186..a0b06ee92a3 100644
--- a/keyboards/jj4x4/keymaps/default/keymap.c
+++ b/keyboards/jj4x4/keymaps/default/keymap.c
@@ -1,34 +1,73 @@
+/* Copyright 2019
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
+enum layers {
+ _BASE = 0,
+ _FN1,
+ _FN2,
+};
-#define _QWERTY 0
-
-
+// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
- QWERTY = SAFE_RANGE,
+ QMKBEST = SAFE_RANGE,
+ QMKURL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Qwerty
- * ,---------------------------.
- * | A | B | C | D |
- * +------+------+------+------|
- * | E | F | G | H |
- * +------+------+------+------|
- * | I | J | K | L |
- * +------+------+------+------|
- * | M | N | O | P |
- * ----------------------------'
- */
-[_QWERTY] = LAYOUT_ortho_4x4( \
- KC_A, KC_B, KC_C, KC_D, \
- KC_E, KC_F, KC_G, KC_H, \
- KC_I, KC_J, KC_K, KC_L, \
- KC_M, KC_N, KC_O, KC_P \
-),
+
+ [_BASE] = LAYOUT_ortho_4x4(
+ KC_PGUP, KC_HOME, KC_UP, KC_END , \
+ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \
+ MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \
+ MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \
+ ),
+ [_FN1] = LAYOUT_ortho_4x4(
+ KC_ESC, KC_P7, KC_P8, KC_P9, \
+ KC_TAB, KC_P4, KC_P5, KC_P6, \
+ KC_ENT, KC_P1, KC_P2, KC_P3, \
+ _______, KC_P0, KC_P0, KC_DOT \
+ ),
+ [_FN2] = LAYOUT_ortho_4x4(
+ RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
+ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \
+ _______, _______, _______, RESET, \
+ BL_STEP, _______, QMKBEST, QMKURL \
+ )
+
};
-// Loop
-void matrix_scan_user(void) {
- // Empty
-};
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk
index d99aebbd20d..3ac2cc04329 100644
--- a/keyboards/jj4x4/rules.mk
+++ b/keyboards/jj4x4/rules.mk
@@ -30,27 +30,29 @@ F_CPU = 12000000
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = bootloadHID
-# build options
-BOOTMAGIC_ENABLE = no
-MOUSEKEY_ENABLE = no
-EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
-COMMAND_ENABLE = yes
-
-BACKLIGHT_ENABLE = yes
-BACKLIGHT_CUSTOM_DRIVER = yes
-
-RGBLIGHT_ENABLE = yes
-RGBLIGHT_CUSTOM_DRIVER = yes
-
-KEY_LOCK_ENABLE = yes
-
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+RGBLIGHT_CUSTOM_DRIVER = yes
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
-OPT_DEFS = -DDEBUG_LEVEL=0
-
-SRC = i2c.c backlight.c
+SRC += i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/jj4x4/usbconfig.h b/keyboards/jj4x4/usbconfig.h
index ad97e7f0a38..a7653bde86e 100644
--- a/keyboards/jj4x4/usbconfig.h
+++ b/keyboards/jj4x4/usbconfig.h
@@ -252,8 +252,8 @@ section at the end of this file).
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
* details.
*/
-#define USB_CFG_DEVICE_NAME 'j', 'j', '4', '0'
-#define USB_CFG_DEVICE_NAME_LEN 4
+#define USB_CFG_DEVICE_NAME 'j', 'j', '4', 'x', '4'
+#define USB_CFG_DEVICE_NAME_LEN 5
/* Same as above for the device name. If you don't want a device name, undefine
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
* you use a shared VID/PID.
diff --git a/keyboards/jj50/keymaps/archetype/config.h b/keyboards/jj50/keymaps/archetype/config.h
index 7955796eaf6..a12e070b4fa 100644
--- a/keyboards/jj50/keymaps/archetype/config.h
+++ b/keyboards/jj50/keymaps/archetype/config.h
@@ -4,5 +4,6 @@
#undef TAPPING_TERM
#define AUTO_SHIFT_TIMEOUT 150
+#define NO_AUTO_SHIFT_ALPHA
#define TAPPING_TERM 150
//#define BOOTMAGIC_KEY_SALT KC_LCTL
diff --git a/keyboards/jj50/keymaps/archetype/keymap.c b/keyboards/jj50/keymaps/archetype/keymap.c
index 0704943e082..82c615f135a 100644
--- a/keyboards/jj50/keymaps/archetype/keymap.c
+++ b/keyboards/jj50/keymaps/archetype/keymap.c
@@ -32,71 +32,131 @@ enum {
TD_BSPC_DEL = 0,
TD_LCTL_LBRC = 1,
TD_LALT_RBRC = 2,
+ TD_ESC_LAYER = 3,
};
void left_brackets(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- if (state->interrupted || !state->pressed) {
- register_mods(MOD_LSFT);
- register_code(KC_9);
+ if (!state->pressed) {
+ register_code16(KC_LPRN);
} else {
- register_mods(MOD_LCTL);
+ register_code(KC_LCTL);
}
} else if (state->count == 2) {
- register_code(KC_LBRC);
+ register_code16(KC_LBRC);
} else if (state->count == 3) {
- register_mods(MOD_LSFT);
- register_code(KC_LBRC);
+ register_code16(KC_LCBR);
}
}
void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- if (state->interrupted || !state->pressed) {
- unregister_mods(MOD_LSFT);
- unregister_code(KC_9);
- } else {
- unregister_mods(MOD_LCTL);
- }
+ unregister_code16(KC_LPRN);
} else if (state->count == 2) {
- unregister_code(KC_LBRC);
+ unregister_code16(KC_LBRC);
} else if (state->count == 3) {
- unregister_mods(MOD_LSFT);
- unregister_code(KC_LBRC);
+ unregister_code16(KC_LCBR);
}
+
+ unregister_code(KC_LCTL);
}
void right_brackets(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- if (state->interrupted || !state->pressed) {
- register_mods(MOD_LSFT);
- register_code(KC_0);
+ if (!state->pressed) {
+ register_code16(KC_RPRN);
} else {
- register_mods(MOD_LALT);
+ register_code(KC_LALT);
}
} else if (state->count == 2) {
- register_code(KC_RBRC);
+ register_code16(KC_RBRC);
} else if (state->count == 3) {
- register_mods(MOD_LSFT);
- register_code(KC_RBRC);
+ register_code16(KC_RCBR);
}
}
void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- if (state->interrupted || !state->pressed) {
- unregister_mods(MOD_LSFT);
- unregister_code(KC_0);
- } else {
- unregister_mods(MOD_LALT);
- }
+ unregister_code16(KC_RPRN);
} else if (state->count == 2) {
- unregister_code(KC_RBRC);
+ unregister_code16(KC_RBRC);
} else if (state->count == 3) {
- unregister_mods(MOD_LSFT);
- unregister_code(KC_RBRC);
+ unregister_code16(KC_RCBR);
}
+
+ unregister_code(KC_LALT);
+}
+
+typedef struct {
+ bool is_press_action;
+ int state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD = 2,
+ DOUBLE_TAP = 3,
+ DOUBLE_HOLD = 4,
+ DOUBLE_SINGLE_TAP = 5, //send two single taps
+ TRIPLE_TAP = 6,
+ TRIPLE_HOLD = 7,
+ TRIPLE_SINGLE_TAP = 8, //send three single taps
+};
+
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ else return SINGLE_HOLD;
+ }
+ else if (state->count == 2) {
+ if (state->interrupted) return DOUBLE_SINGLE_TAP;
+ else if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+
+ if (state->count == 3) {
+ if (state->interrupted) return TRIPLE_SINGLE_TAP;
+ else if (state->pressed) return TRIPLE_HOLD;
+ else return TRIPLE_TAP;
+ }
+ else return 9; //magic number. At some point this method will expand to work for more presses
+}
+
+static tap tap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+void layer_switcher (qk_tap_dance_state_t *state, void *user_data) {
+ tap_state.state = cur_dance(state);
+ switch (tap_state.state) {
+ case SINGLE_TAP: register_code(KC_ESC); break;
+ case SINGLE_HOLD: register_code(KC_ESC); break;
+ case DOUBLE_TAP: register_code(KC_ESC); break;
+ case DOUBLE_HOLD: layer_on(_COLEMAK); break;
+ case DOUBLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break;
+ case TRIPLE_TAP: register_code(KC_ESC); break;
+ case TRIPLE_HOLD: layer_on(_FX); break;
+ case TRIPLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break;
+ //Last case is for fast typing. Assuming your key is `f`:
+ //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
+ //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
+ }
+}
+
+void layer_switcher_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (tap_state.state) {
+ case SINGLE_TAP: unregister_code(KC_ESC); break;
+ case SINGLE_HOLD: unregister_code(KC_ESC); break;
+ case DOUBLE_TAP: unregister_code(KC_ESC); break;
+ case DOUBLE_HOLD: break;
+ case DOUBLE_SINGLE_TAP: unregister_code(KC_ESC); break;
+ case TRIPLE_TAP: unregister_code(KC_ESC); break;
+ case TRIPLE_HOLD: break;
+ case TRIPLE_SINGLE_TAP: unregister_code(KC_ESC); break;
+ }
+ tap_state.state = 0;
}
qk_tap_dance_action_t tap_dance_actions[] = {
@@ -106,6 +166,8 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset),
// Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT
[TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset),
+ // Layer Switcher ESC
+ [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, layer_switcher, layer_switcher_reset, 100),
};
@@ -115,7 +177,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
//| | | | | | | | | | | | |
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ TD(TD_ESC_LAYER), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
//| | | | | | | | | | | | |
@@ -131,7 +193,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
//| | | | | | | | | | | | |
- TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), LT(_FN, KC_SPC), _______, KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \
+ TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), _______, LT(_FX, KC_SPC), KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
),
@@ -194,19 +256,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
//| | | | | | | | | | | | |
- _______, BL_ON, BL_INC, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
//| | | | | | | | | | | | |
- _______, BL_OFF, BL_DEC, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______, \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
//| | | | | | | | | | | | |
- _______, RGB_TOG, BL_STEP, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_TOG, \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
//| | | | | | | | | | | | |
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_HUD, RGB_SAD \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
),
diff --git a/keyboards/kbdfans/kbd4x/info.json b/keyboards/kbdfans/kbd4x/info.json
index f9952e79031..28883b265a0 100644
--- a/keyboards/kbdfans/kbd4x/info.json
+++ b/keyboards/kbdfans/kbd4x/info.json
@@ -2,7 +2,7 @@
"keyboard_name": "kbd4x",
"url": "",
"maintainer": "qmk",
- "width": 14,
+ "width": 12,
"height": 4,
"layouts": {
"LAYOUT_planck_mit": {
diff --git a/keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c b/keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c
new file mode 100644
index 00000000000..fb074e12104
--- /dev/null
+++ b/keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c
@@ -0,0 +1,145 @@
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _QW,
+ _FO,
+ _FL,
+ _CL,
+ _DL
+};
+
+
+
+
+// Custom macros
+#define SPC_FUN LT(_FL, KC_SPC)
+#define BSC_CON LT(_CL, KC_BSPC)
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* 0: Qwerty layer
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PRSCR│ INS │HOME │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BSLS │ DEL │ END │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
+ * │TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BSPC │PGUP │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ENTER │PGDN │
+ * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │LSHFT │LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSHFT │ UP │MO_CL│
+ * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
+ * │LCTRL │L_GUI │L_ALT │SPC │MO(_FL│BSPC │R_ALT│R_GUI│R_CTR│LEFT │DOWN │RIGHT│
+ * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
+ */
+
+ /* 0: QWERTY */
+ [_QW] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_HOME,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_END,
+ 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_PGUP,
+ KC_CLCK, 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_PGDN,
+ 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_UP, MO(_CL),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_BSPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ /* 1: forty: this layer emulates a forty percent keyboard so I can transition to a forty percent :)
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
+ * │ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ENT │ │ │ │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ │
+ * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │LSHFT │LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSHFT │ │MO_CL│
+ * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
+ * │LCTRL │L_ALT │MO(DL)│SPCFUN │BSPC │MO(_CL) │R_ALT│R_GUI│R_CTR│ │ │ │
+ * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
+ */
+
+ /* 1: FORTY */
+ [_FO] = LAYOUT(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX,
+ 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, XXXXXXX, MO(_CL),
+ KC_LCTL, KC_LALT, MO(_DL), SPC_FUN, KC_BSPC, MO(_CL), KC_RALT, KC_RGUI, KC_RCTL, XXXXXXX, XXXXXXX, XXXXXXX),
+
+
+ /* 2: Function layer
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
+ * │ │ │HOME │ UP │END │ │ │ │ │ │ │ │ │ │VOLUP│
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │ │ │LEFT │DOWN │RIGHT│ │ │ │ │ │ │ │ │VOLDN│
+ * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │ │ │ │ │PGDN │PGUP │ │ │ │ │ │ │ │ │ │
+ * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
+ * │ │ │ │ │ │ │VOLDN│VOLUP│ │ │ │ │
+ * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
+ */
+
+ /* 2: ANSI Fn layer */
+ [_FL] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
+ _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______),
+
+ /* 3: Control layer
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │RESET│QWERT│FORTY│ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
+ * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ DEL │ │ │ │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ \ │ │ │
+ * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │
+ * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
+ */
+
+ /* 3: Control layer */
+ [_CL] = LAYOUT(
+ RESET, TO(_QW), TO(_FO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD,
+ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, _______, KC_VOLU,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, _______, KC_VOLD,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______,
+ _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_SAD, RGB_HUI),
+
+ /* 4: Another layer for ease
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤
+ * │ │ │ │ │ │ │ │ _ │ + │ { │ } │ | │ │ │ │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │ │ │ │ │ │ │ │ - │ = │ [ │ ] │ \ │ │ │
+ * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │
+ * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘
+ */
+
+ /* 3: D control layer */
+ [_DL] = LAYOUT(
+ RESET, TO(_QW), TO(_FO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD,
+ _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_VOLU,
+ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_VOLD,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______,
+ _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_SAD, RGB_HUI)
+};
diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c
index ee1f69e914c..98d73535687 100644
--- a/keyboards/kc60/keymaps/noroadsleft/keymap.c
+++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c
@@ -9,24 +9,24 @@
** LAYER DEFINITIONS **
**********************/
enum layers_keymap {
- // BASE LAYERS
- _QWERTY = 0,
- _DVORAK,
- _COLEMAK,
- _MAC,
- _QUAKE2,
- _QUAKE2_DVORAK,
- _QUAKE2_CONSOLE,
+ // BASE LAYERS
+ _QWERTY = 0,
+ _DVORAK,
+ _COLEMAK,
+ _MAC,
+ _QUAKE2,
+ _QUAKE2_DVORAK,
+ _QUAKE2_CONSOLE,
- // FUNCTION LAYERS
- _FUNCWIN,
- _FUNCMAC,
- _FUNCQ2,
+ // FUNCTION LAYERS
+ _FUNCWIN,
+ _FUNCMAC,
+ _FUNCQ2,
- // OTHER LAYERS
- _NUMPAD,
- _MACROS,
- _SYSTEM
+ // OTHER LAYERS
+ _NUMPAD,
+ _MACROS,
+ _SYSTEM
};
// LAYER SHORT CODES
@@ -70,24 +70,24 @@ enum layers_keymap {
// MACRO DEFINITIONS
enum custom_keycodes {
- F_CAPS = SAFE_RANGE,
- T_L3DED,
- G_PUSH,
- G_FTCH,
- G_COMM,
- G_RST,
- G_C10R,
- G_BRCH,
- SIGNA,
- GO_Q2,
- Q2_ON,
- Q2_OFF,
- Q2_ESC,
- Q2_GRV,
- MC_UNDO,
- MC_PSTE,
- NUBS_Z,
- VRSN
+ F_CAPS = SAFE_RANGE,
+ T_L3DED,
+ G_PUSH,
+ G_FTCH,
+ G_COMM,
+ G_RST,
+ G_C10R,
+ G_BRCH,
+ SIGNA,
+ GO_Q2,
+ Q2_ON,
+ Q2_OFF,
+ Q2_ESC,
+ Q2_GRV,
+ MC_UNDO,
+ MC_PSTE,
+ NUBS_Z,
+ VRSN
};
@@ -98,293 +98,314 @@ enum custom_keycodes {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch(keycode) {
- // these are our macros!
- case F_CAPS:
- /*
- Objective: write a macro that checks the current layers that are
- enabled, and activates the appropriate function layer.
- */
- if ( biton32(layer_state) == _MAC ) {
- if (record->event.pressed) {
- layer_on(_FUNCMAC);
- } else {
- layer_off(_FUNCMAC);
- }
- } else {
- if (record->event.pressed) {
- layer_on(_FUNCWIN);
- } else {
- layer_off(_FUNCWIN);
- }
- };
- return false;
- case T_L3DED:
- if (record->event.pressed) {
- SEND_STRING("lavak3DED ");
- };
- return false;
- case G_PUSH:
- if (record->event.pressed) {
- SEND_STRING("git push origin ");
- };
- return false;
- case G_FTCH:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- clear_mods();
- SEND_STRING("git pull upstream ");
- } else {
- SEND_STRING("git fetch upstream ");
- }
- };
- return false;
- case G_COMM:
- if (record->event.pressed) {
- SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT));
- layer_off(_MACROS);
- };
- return false;
- case G_BRCH:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- clear_mods();
- SEND_STRING("master");
- } else {
- SEND_STRING("$(git branch-name)");
- }
- layer_off(_MACROS);
- };
- return false;
- case SIGNA:
- if (record->event.pressed) {
- SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER));
- layer_off(_MACROS);
- };
- return false;
- case GO_Q2:
- if (record->event.pressed) {
- //default_layer_set(_QWERTY);
- layer_move(_QWERTY); // TO(_QWERTY);
- layer_on(_QUAKE2);
- //layer_off(_SYSTEM);
- };
- return false;
- case Q2_ON:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_ENTER));
- layer_on(_DVORAK);
- layer_on(_QUAKE2_DVORAK);
- };
- return false;
- case Q2_OFF:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_ENTER));
- layer_move(_QWERTY); // TO(_QWERTY);
- layer_on(_QUAKE2);
- };
- return false;
- case Q2_ESC:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_ESCAPE));
- layer_move(_QWERTY); // TO(_QWERTY);
- layer_on(_QUAKE2);
- };
- return false;
- case Q2_GRV:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_GRAVE));
- layer_on(_DVORAK);
- layer_on(_QUAKE2_DVORAK);
- layer_on(_QUAKE2_CONSOLE);
- };
- return false;
- case MC_UNDO:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
- } else {
- SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) );
- }
- };
- return false;
- case MC_PSTE:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
- } else {
- SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) );
- }
- };
- return false;
- case NUBS_Z:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_RALT ) {
- SEND_STRING( SS_TAP(X_NONUS_BSLASH) );
- } else {
- SEND_STRING( SS_TAP(X_Z) );
- }
- };
- return false;
- case VRSN:
- if (record->event.pressed) {
- SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION );
- }
- return false;
- } // switch()
- return true;
+ switch(keycode) {
+ // these are our macros!
+ case F_CAPS:
+ /*
+ * Objective: write a macro that checks the current layers that are
+ * enabled, and activates the appropriate function layer.
+ */
+ if ( biton32(layer_state) == _MAC ) {
+ if (record->event.pressed) {
+ layer_on(_FUNCMAC);
+ } else {
+ layer_off(_FUNCMAC);
+ }
+ } else {
+ if (record->event.pressed) {
+ layer_on(_FUNCWIN);
+ } else {
+ layer_off(_FUNCWIN);
+ }
+ };
+ return false;
+ case T_L3DED:
+ if (record->event.pressed) {
+ SEND_STRING("lavak3DED ");
+ };
+ return false;
+ case G_PUSH:
+ if (record->event.pressed) {
+ SEND_STRING("git push origin ");
+ };
+ return false;
+ case G_FTCH:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ clear_mods();
+ SEND_STRING("git pull upstream ");
+ } else {
+ SEND_STRING("git fetch upstream ");
+ }
+ };
+ return false;
+ case G_COMM:
+ if (record->event.pressed) {
+ SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT));
+ layer_off(_MACROS);
+ };
+ return false;
+ case G_BRCH:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ clear_mods();
+ SEND_STRING("master");
+ } else {
+ SEND_STRING("$(git branch-name)");
+ }
+ layer_off(_MACROS);
+ };
+ return false;
+ case SIGNA:
+ if (record->event.pressed) {
+ SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER));
+ layer_off(_MACROS);
+ };
+ return false;
+ case GO_Q2:
+ if (record->event.pressed) {
+ //default_layer_set(_QWERTY);
+ layer_move(_QWERTY); // TO(_QWERTY);
+ layer_on(_QUAKE2);
+ //layer_off(_SYSTEM);
+ };
+ return false;
+ case Q2_ON:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ENTER));
+ layer_on(_DVORAK);
+ layer_on(_QUAKE2_DVORAK);
+ };
+ return false;
+ case Q2_OFF:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ENTER));
+ layer_move(_QWERTY); // TO(_QWERTY);
+ layer_on(_QUAKE2);
+ };
+ return false;
+ case Q2_ESC:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ESCAPE));
+ layer_move(_QWERTY); // TO(_QWERTY);
+ layer_on(_QUAKE2);
+ };
+ return false;
+ case Q2_GRV:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_GRAVE));
+ layer_on(_DVORAK);
+ layer_on(_QUAKE2_DVORAK);
+ layer_on(_QUAKE2_CONSOLE);
+ };
+ return false;
+ case MC_UNDO:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
+ } else {
+ SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) );
+ }
+ };
+ return false;
+ case MC_PSTE:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
+ } else {
+ SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) );
+ }
+ };
+ return false;
+ case NUBS_Z:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ SEND_STRING( SS_DOWN(X_NONUS_BSLASH) );
+ } else {
+ SEND_STRING( SS_DOWN(X_Z) );
+ }
+ } else {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ SEND_STRING( SS_UP(X_NONUS_BSLASH) );
+ } else {
+ SEND_STRING( SS_UP(X_Z) );
+ }
+ };
+ return false;
+ case VRSN:
+ if (record->event.pressed) {
+ SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION );
+ }
+ return false;
+ case KC_1 ... KC_0:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ register_code( keycode + 0x3b );
+ } else {
+ register_code( keycode );
+ }
+ } else {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ unregister_code( keycode + 0x3b );
+ } else {
+ unregister_code( keycode );
+ }
+ }
+ return false;
+ } // switch()
+ return true;
};
// KEYMAPS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /****************
- ** BASE LAYERS **
- ****************/
+ /****************
+ ** BASE LAYERS **
+ ****************/
- /* QWERTY */
- [_QWERTY] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
- FW_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, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
- ),
+ /* QWERTY */
+ [_QWERTY] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ FW_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, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
+ ),
- /* Dvorak */
- [_DVORAK] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \
- KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
- FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
- KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
- ),
+ /* Dvorak */
+ [_DVORAK] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
+ FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
+ ),
- /* Colemak */
- [_COLEMAK] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
- FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
- ),
+ /* Colemak */
+ [_COLEMAK] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
+ FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
+ ),
- /****************
- ** OS OVERLAYS **
- ****************/
+ /****************
+ ** OS OVERLAYS **
+ ****************/
- /* Mac */
- [_MAC] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FM), _______ \
- ),
+ /* Mac */
+ [_MAC] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FM), _______ \
+ ),
- /*********************
- ** QUAKE 2 OVERLAYS **
- *********************/
+ /*********************
+ ** QUAKE 2 OVERLAYS **
+ *********************/
- /* Quake 2 */
- [_QUAKE2] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
- ),
+ /* Quake 2 */
+ [_QUAKE2] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
+ ),
- [_QUAKE2_DVORAK] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
- ),
+ [_QUAKE2_DVORAK] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
+ ),
- [_QUAKE2_CONSOLE] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
- ),
+ [_QUAKE2_CONSOLE] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
+ ),
- /********************
- ** FUNCTION LAYERS **
- ********************/
+ /********************
+ ** FUNCTION LAYERS **
+ ********************/
- /* Windows Fn layer */
- [_FUNCWIN] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
- _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
- NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \
- _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \
- _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \
- ),
+ /* Windows Fn layer */
+ [_FUNCWIN] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
+ _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
+ NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \
+ _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \
+ _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \
+ ),
- /* MacOS Fn layer */
- [_FUNCMAC] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
- _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \
- NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \
- _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \
- _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
- ),
+ /* MacOS Fn layer */
+ [_FUNCMAC] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
+ _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \
+ NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \
+ _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \
+ _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
+ ),
- /* Quake 2 Fn layer */
- [_FUNCQ2] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
- _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
- NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \
- _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
- ),
+ /* Quake 2 Fn layer */
+ [_FUNCQ2] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
+ _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
+ NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \
+ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
+ ),
- /*****************
- ** OTHER LAYERS **
- *****************/
+ /*****************
+ ** OTHER LAYERS **
+ *****************/
- /* Numpad layer */
- [_NUMPAD] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \
- _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \
- _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \
- _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \
- _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
- ),
+ /* Numpad layer */
+ [_NUMPAD] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \
+ _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \
+ _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \
+ _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \
+ _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
+ ),
- /* Macro layer */
- [_MACROS] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \
- _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
- ),
+ /* Macro layer */
+ [_MACROS] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \
+ _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
+ ),
- /* System layer */
- [_SYSTEM] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \
- XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \
- ),
+ /* System layer */
+ [_SYSTEM] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \
+ XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \
+ ),
};
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md
index 59fbfd246a4..c9db4f8de20 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme.md
@@ -1,6 +1,6 @@
# @noroadsleft's KC60 keymap
-### Last updated: February 14, 2019, 3:50 AM UTC-0800
+### Last updated: April 7, 2019, 2:26 AM UTC-0700

diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
index ebcb3cca860..b9dc556e4e3 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
@@ -16,7 +16,7 @@
These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method.
-I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L383), is a [macro](./keymap.c#L165-172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching.
+I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L404), is a [macro](./keymap.c#L165-L172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching.
When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers.
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md
index e5ee7cbdeb8..a65b3acbeb4 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md
@@ -60,7 +60,7 @@ Output: `git commit -m ""` Left
Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer.
-#### [G_BRCH](./keymap.c#L148-158)
+#### [G_BRCH](./keymap.c#L148-L158)
| Condition | Output |
| :-------- | :----- |
@@ -93,7 +93,7 @@ An Undo shortcut that turns to Redo if Shift is being held. I'm not s
The program I use this in uses Shift + Command + Option + V to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using Shift changes the behavior.
-#### [NUBS_Z](./keymap.c#L220-L228)
+#### [NUBS_Z](./keymap.c#L220-L234)
| Condition | Output |
| :-------- | :----- |
@@ -102,11 +102,15 @@ The program I use this in uses Shift + Command + Opti
Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z.
-#### [VRSN](./keymap.c#L229-L233)
+#### [VRSN](./keymap.c#L235-L239)
Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
- kc60/noroadsleft @ 0.6.240-20-ge91549-dirty
+ kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty
+
+#### [Emulated Numeric Keypad](./keymap.c#L240-L254)
+
+If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °.
----
diff --git a/keyboards/keebio/bdn9/bdn9.h b/keyboards/keebio/bdn9/bdn9.h
index 26b04356050..8a451132647 100644
--- a/keyboards/keebio/bdn9/bdn9.h
+++ b/keyboards/keebio/bdn9/bdn9.h
@@ -31,5 +31,7 @@
KC1, KC2, KC3 \
) \
{ \
- { KA1, KA2, KA3, KB1, KB2, KB3, KC1, KC2, KC3 } \
+ { KA1, KA2, KA3 }, \
+ { KB1, KB2, KB3 }, \
+ { KC1, KC2, KC3 } \
}
diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h
index ad0ada04017..1637ce45f1c 100644
--- a/keyboards/keebio/bdn9/config.h
+++ b/keyboards/keebio/bdn9/config.h
@@ -28,15 +28,15 @@ along with this program. If not, see .
#define DESCRIPTION 3x3 Macropad with Rotary Encoders
/* key matrix size */
-#define MATRIX_ROWS 1
-#define MATRIX_COLS 9
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 3
/* Keyboard Matrix Assignments */
-#define MATRIX_ROW_PINS { NO_PIN }
-#define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 }
-
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION COL2ROW
+#define DIRECT_PINS { \
+ { D2, D4, F4 }, \
+ { D7, B1, B3 }, \
+ { E6, B4, B2 } \
+}
#define NUMBER_OF_ENCODERS 2
#define ENCODERS_PAD_A { D1, F5 }
diff --git a/keyboards/keebio/bfo9000/bfo9000.h b/keyboards/keebio/bfo9000/bfo9000.h
index c3bd2236cef..985c7f67f13 100644
--- a/keyboards/keebio/bfo9000/bfo9000.h
+++ b/keyboards/keebio/bfo9000/bfo9000.h
@@ -1,16 +1,7 @@
-#ifndef BFO9000_H
-#define BFO9000_H
+#pragma once
#include "quantum.h"
-#ifdef USE_I2C
-#include
-#ifdef __AVR__
- #include
- #include
-#endif
-#endif
-
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, R08, \
L10, L11, L12, L13, L14, L15, L16, L17, L18, R10, R11, R12, R13, R14, R15, R16, R17, R18, \
@@ -33,5 +24,3 @@
{ R40, R41, R42, R43, R44, R45, R46, R47, R48 }, \
{ R50, R51, R52, R53, R54, R55, R56, R57, R58 } \
}
-
-#endif
diff --git a/keyboards/keebio/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h
index 5dc2bd43436..c5afb265f3c 100644
--- a/keyboards/keebio/bfo9000/config.h
+++ b/keyboards/keebio/bfo9000/config.h
@@ -45,6 +45,9 @@ along with this program. If not, see .
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
+/* serial.c configuration for split keyboard */
+#define SOFT_SERIAL_PIN D0
+
/* ws2812 RGB LED */
#define RGB_DI_PIN B4
#define RGBLED_NUM 20 // Number of LEDs
diff --git a/keyboards/keebio/bfo9000/i2c.c b/keyboards/keebio/bfo9000/i2c.c
deleted file mode 100644
index 084c890c405..00000000000
--- a/keyboards/keebio/bfo9000/i2c.c
+++ /dev/null
@@ -1,162 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include "i2c.h"
-
-#ifdef USE_I2C
-
-// Limits the amount of we wait for any one i2c transaction.
-// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
-// 9 bits, a single transaction will take around 90μs to complete.
-//
-// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
-// poll loop takes at least 8 clock cycles to execute
-#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
-
-#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
-
-volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
-
-static volatile uint8_t slave_buffer_pos;
-static volatile bool slave_has_register_set = false;
-
-// Wait for an i2c operation to finish
-inline static
-void i2c_delay(void) {
- uint16_t lim = 0;
- while(!(TWCR & (1<10.
- // Check datasheets for more info.
- TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
-}
-
-// Start a transaction with the given i2c slave address. The direction of the
-// transfer is set with I2C_READ and I2C_WRITE.
-// returns: 0 => success
-// 1 => error
-uint8_t i2c_master_start(uint8_t address) {
- TWCR = (1< slave ACK
-// 1 => slave NACK
-uint8_t i2c_master_write(uint8_t data) {
- TWDR = data;
- TWCR = (1<= SLAVE_BUFFER_SIZE ) {
- ack = 0;
- slave_buffer_pos = 0;
- }
- slave_has_register_set = true;
- } else {
- i2c_slave_buffer[slave_buffer_pos] = TWDR;
- BUFFER_POS_INC();
- }
- break;
-
- case TW_ST_SLA_ACK:
- case TW_ST_DATA_ACK:
- // master has addressed this device as a slave transmitter and is
- // requesting data.
- TWDR = i2c_slave_buffer[slave_buffer_pos];
- BUFFER_POS_INC();
- break;
-
- case TW_BUS_ERROR: // something went wrong, reset twi state
- TWCR = 0;
- default:
- break;
- }
- // Reset everything, so we are ready for the next TWI interrupt
- TWCR |= (1<
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+/* Use I2C or Serial, not both */
+
+// #define USE_SERIAL
+#define USE_I2C
+
+/* Select hand configuration */
+// #define MASTER_LEFT
+// #define MASTER_RIGHT
+#define EE_HANDS
+
+#define IGNORE_MOD_TAP_INTERRUPT
+#define TAPPING_TERM 150
+#define TAPPING_TOGGLE 2
+
+// #undef RGBLED_NUM
+// #define RGBLIGHT_ANIMATIONS
+// #define RGBLED_NUM 12
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
\ No newline at end of file
diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c
new file mode 100644
index 00000000000..d15569ee964
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c
@@ -0,0 +1,381 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum bfo9000_layers {
+ _COLEMAK, // Colemak (default layer)
+ _QWERTY, // Qwerty
+ _COLEMAKGM, // Colemak gaming/vanilla (limited dual-role keys with layer access)
+ _QWERTYGM, // QWERTY gaming/vanilla (limited dual-role keys with layer access)
+ _NUMBERS, // Numbers & Symbols
+ _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST)
+ _FUNCTION, // Function
+ _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows)
+ _NUMPAD, // Numpad
+ _ADJUST, // Adjust layer (accessed via tri-layer feature)
+ _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature)
+};
+
+enum bfo9000_keycodes {
+ COLEMAK = SAFE_RANGE,
+ QWERTY,
+ COLEMAKGM,
+ QWERTYGM,
+ NUMPAD = TG(_NUMPAD),
+ ADJUST = MO(_ADJUST2),
+ SPCFN = LT(_FUNCTION, KC_SPC),
+ BSPCFN = LT(_FUNCTION2, KC_BSPC),
+ ENTNS = LT(_NUMBERS, KC_ENT),
+ DELNS = LT(_NUMBERS2, KC_DEL),
+ CTLESC = CTL_T(KC_ESC),
+ ALTAPP = ALT_T(KC_APP),
+ NKROTG = MAGIC_TOGGLE_NKRO
+};
+
+//Tap Dance Declarations
+enum {
+ ADJ = 0,
+ LBCB,
+ RBCB,
+ EQPL,
+ PLEQ,
+ MNUN,
+ SLAS,
+ GVTL,
+ PPLEQ,
+ PMNUN,
+ PSLPAS
+};
+
+void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ layer_on(_ADJUST2);
+ set_oneshot_layer(_ADJUST2, ONESHOT_START);
+ }
+}
+void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 2) {
+ layer_off(_ADJUST2);
+ clear_oneshot_layer_state(ONESHOT_PRESSED);
+ }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer
+[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap
+[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap
+[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap
+[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap
+[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap
+[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap
+[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap
+[PPLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap
+[PMNUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap
+[PSLPAS] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Colemak
+ (Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Tab | Q | W | F | P | G | | | Home | | Pause | | | J | L | U | Y | ; | \ |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ |Esc/Ctl| A | R | S | T | D | | | PgUp | | ScrLck| | | H | N | E | I | O | ' |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ |SCShift| Z | X | C | V | B |Esc/Ctl|App/Alt| PgDn | | PrtScr| RAlt | RCtl | K | M | , | . | / |SCShift|
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Ins | ` | [ | ] |App/Alt| Spc/Fn| Ent/NS| Bspc | End | | | Enter |Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_COLEMAK] = LAYOUT( \
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
+ CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* QWERTY
+ (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Tab | Q | W | E | R | T | | | Home | | Pause | | | Y | U | I | O | P | \ |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ |Esc/Ctl| A | S | D | F | G | | | PgUp | | ScrLck| | | H | J | K | L | ; | ' |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ |SCShift| Z | X | C | V | B |Esc/Ctl|App/Alt| PgDn | | PrtScr| RAlt | RCtl | N | M | , | . | / |SCShift|
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Ins | ` | [ | ] |App/Alt| Spc/Fn| Ent/NS| Bspc | End | | | Enter |Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_QWERTY] = LAYOUT( \
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Numbers/Symbols layer
+ (Multiple characters: single-tap for first, double-tap for second)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | | | | | | | | | | | | | | | | | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | 6 | 7 | 8 | 9 | 0 | | | | | | | | ^ | & | * | ( | ) | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | 1 | 2 | 3 | 4 | 5 | | | | | | | | ! | @ | # | $ | % | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | . | / * | - _ | + = | | | | | | | | ` ~ | [ { | ] } | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | ( | ) | [ { | ] } | | | | | | | | | | | | | | | |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_NUMBERS] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______,
+ _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), _______, _______, _______, _______, _______, _______, TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______,
+ KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+[_NUMBERS2] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______,
+ _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), _______, _______, _______, _______, _______, _______, TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______,
+ KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+/* Function layer
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | | | | | | | | | | | | | | | | | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | | Up | | | | | | | | | | | | Up | Ctrl+Y| | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | Ctrl+A| Left | Down | Right | C+A+Tb| | | | | | | | PgUp | Right | Down | Left | Home | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | Ctrl+Z| Ctrl+X| Ctrl+C| Ctrl+V| Bspc | | | | | | | | PgDn | Mute | Vol- | Vol+ | End | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | | | | | | | | | | | | | | Prev | Play | Next | Stop |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_FUNCTION] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______,
+ _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______,
+ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
+),
+
+[_FUNCTION2] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______,
+ _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______,
+ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP
+),
+
+/* Numpad layer
+ (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | | | | | | | | | | | | | | | | | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | NumLk | | | | | | | | | | | Tab | NumLk | KP / | KP * | KP - | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | | | | | | KP 4 | KP 5 | KP 6 | = | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | KP . |KP/ KP*| KP- _ | KP+ = | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent| | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | ( | ) | [ { | ] } | | | | | | | | | | | KP 0 | KP . | KP Ent| | |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_NUMPAD] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_NLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______,
+ _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______,
+ _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______,
+ _______, _______, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
+ KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______
+),
+
+/* Colemak gaming/vanilla
+ (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Del/NS2 on right side to access Adjust layer)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Tab | Q | W | F | P | G | J | L | Home | | Pause | | | J | L | U | Y | ; | \ |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | LCtl | A | R | S | T | D | H | N | PgUp | | ScrLck| | | H | N | E | I | O | ' |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Shift | Z | X | C | V | B | Esc | LAlt | PgDn | | PrtScr| RAlt | RCtl | K | M | , | . | / | Shift |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Ins | ` | [ | ] | LAlt | Space | Enter | Bspc | End | | | Ent/NS|Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_COLEMAKGM] = LAYOUT( \
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
+ KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* QWERTY gaming/vanilla
+ (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Del/NS2 on right side to access Adjust layer)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Tab | Q | W | E | T | Y | U | I | Home | | Pause | | | Y | U | I | O | P | \ |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | LCtl | A | S | D | F | G | H | J | PgUp | | ScrLck| | | H | J | K | L | ; | ' |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Shift | Z | X | C | V | B | Esc | LAlt | PgDn | | PrtScr| RAlt | RCtl | N | M | , | . | / | Shift |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | Ins | ` | [ | ] | LAlt | Space | Enter | Bspc | End | | | Ent/NS|Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_QWERTYGM] = LAYOUT( \
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Adjust layer
+ (Enter/Number + Delete/Number2 under non-gaming/vanilla layers or press & hold Adjust key on function row; Numpad is a toggle)
+ ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------.
+ | | | | | | | | | | | | | | | | | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | |Colemak| Qwerty| |ColmkGM| QWGM | | | | | | | | Numpad| | | | | RESET |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | | | | | | | | | | | | | | | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | | | | | | | | | | | | | NKROTG| | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | | | | | | | | | | | | | | | | | |
+ |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------|
+ | | | | | | | | | | | | | | | | | | | |
+ `-----------------------------------------------------------------------' `-----------------------------------------------------------------------'
+*/
+[_ADJUST] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+[_ADJUST2] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
+
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case COLEMAK:
+ if (record->event.pressed) {
+ default_layer_set(1UL << _COLEMAK);
+// persistent_default_layer_set(1UL << _COLEMAK);
+ layer_off ( _QWERTY);
+ layer_off ( _NUMBERS);
+ layer_off ( _NUMBERS2);
+ layer_off ( _FUNCTION);
+ layer_off ( _FUNCTION2);
+ layer_off ( _NUMPAD);
+ layer_off ( _COLEMAKGM);
+ layer_off ( _QWERTYGM);
+ layer_off ( _ADJUST);
+ layer_off ( _ADJUST2);
+ }
+ return false;
+ break;
+ case QWERTY:
+ if (record->event.pressed) {
+ default_layer_set(1UL << _QWERTY);
+// persistent_default_layer_set(1UL << _QWERTY);
+ layer_off ( _COLEMAK);
+ layer_off ( _NUMBERS);
+ layer_off ( _NUMBERS2);
+ layer_off ( _FUNCTION);
+ layer_off ( _FUNCTION2);
+ layer_off ( _NUMPAD);
+ layer_off ( _COLEMAKGM);
+ layer_off ( _QWERTYGM);
+ layer_off ( _ADJUST);
+ layer_off ( _ADJUST2);
+ }
+ return false;
+ break;
+ case COLEMAKGM:
+ if (record->event.pressed) {
+ default_layer_set(1UL << _COLEMAKGM);
+ layer_off ( _QWERTY);
+ layer_off ( _COLEMAK);
+ layer_off ( _NUMBERS);
+ layer_off ( _NUMBERS2);
+ layer_off ( _FUNCTION);
+ layer_off ( _FUNCTION2);
+ layer_off ( _NUMPAD);
+ layer_off ( _QWERTYGM);
+ layer_off ( _ADJUST);
+ layer_off ( _ADJUST2);
+ }
+ return false;
+ break;
+ case QWERTYGM:
+ if (record->event.pressed) {
+ default_layer_set(1UL << _QWERTYGM);
+ layer_off ( _QWERTY);
+ layer_off ( _COLEMAK);
+ layer_off ( _NUMBERS);
+ layer_off ( _NUMBERS2);
+ layer_off ( _FUNCTION);
+ layer_off ( _FUNCTION2);
+ layer_off ( _NUMPAD);
+ layer_off ( _COLEMAKGM);
+ layer_off ( _ADJUST);
+ layer_off ( _ADJUST2);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk
new file mode 100644
index 00000000000..cf63c44f4f0
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk
@@ -0,0 +1,19 @@
+# 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 = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = yes # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+TAP_DANCE_ENABLE = yes # Enable Tap Dancing function
diff --git a/keyboards/keebio/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk
index d11f9a54e7c..3ebe39a902f 100644
--- a/keyboards/keebio/bfo9000/rules.mk
+++ b/keyboards/keebio/bfo9000/rules.mk
@@ -1,8 +1,3 @@
-SRC += matrix.c \
- i2c.c \
- split_util.c \
- serial.c
-
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
@@ -41,7 +36,7 @@ F_USB = $(F_CPU)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
+# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = caterina
@@ -63,8 +58,8 @@ 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.
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-CUSTOM_MATRIX = yes
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/keebio/bfo9000/serial.c b/keyboards/keebio/bfo9000/serial.c
deleted file mode 100644
index fea57b65101..00000000000
--- a/keyboards/keebio/bfo9000/serial.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * WARNING: be careful changing this code, it is very timing dependent
- */
-
-#ifndef F_CPU
-#define F_CPU 16000000
-#endif
-
-#include
-#include
-#include
-#include
-#include "serial.h"
-
-#ifndef USE_I2C
-
-// Serial pulse period in microseconds. Its probably a bad idea to lower this
-// value.
-#define SERIAL_DELAY 24
-
-matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
-matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
-
-#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS))
-
-#define SLAVE_DATA_CORRUPT (1<<0)
-volatile uint8_t status = 0;
-
-inline static
-void serial_delay(void) {
- _delay_us(SERIAL_DELAY);
-}
-
-inline static
-void serial_output(void) {
- SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
-}
-
-// make the serial pin an input with pull-up resistor
-inline static
-void serial_input(void) {
- SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-inline static
-matrix_row_t serial_read_pin(void) {
- return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
-}
-
-inline static
-void serial_low(void) {
- SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
-}
-
-inline static
-void serial_high(void) {
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-void serial_master_init(void) {
- serial_output();
- serial_high();
-}
-
-void serial_slave_init(void) {
- serial_input();
-
- // Enable INT0
- EIMSK |= _BV(INT0);
- // Trigger on falling edge of INT0
- EICRA &= ~(_BV(ISC00) | _BV(ISC01));
-}
-
-// Used by the master to synchronize timing with the slave.
-static
-void sync_recv(void) {
- serial_input();
- // This shouldn't hang if the slave disconnects because the
- // serial line will float to high if the slave does disconnect.
- while (!serial_read_pin());
- serial_delay();
-}
-
-// Used by the slave to send a synchronization signal to the master.
-static
-void sync_send(void) {
- serial_output();
-
- serial_low();
- serial_delay();
-
- serial_high();
-}
-
-// Reads a byte from the serial line
-static
-matrix_row_t serial_read_byte(void) {
- matrix_row_t byte = 0;
- serial_input();
- for ( uint8_t i = 0; i < MATRIX_COLS; ++i) {
- byte = (byte << 1) | serial_read_pin();
- serial_delay();
- _delay_us(1);
- }
-
- return byte;
-}
-
-// Sends a byte with MSB ordering
-static
-void serial_write_byte(matrix_row_t data) {
- matrix_row_t b = MATRIX_COLS;
- serial_output();
- while( b-- ) {
- if(data & (1UL << b)) {
- serial_high();
- } else {
- serial_low();
- }
- serial_delay();
- }
-}
-
-// interrupt handle to be used by the slave device
-ISR(SERIAL_PIN_INTERRUPT) {
- sync_send();
-
- matrix_row_t checksum = 0;
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_slave_buffer[i]);
- sync_send();
- checksum += ROW_MASK & serial_slave_buffer[i];
- }
- serial_write_byte(checksum);
- sync_send();
-
- // wait for the sync to finish sending
- serial_delay();
-
- // read the middle of pulses
- _delay_us(SERIAL_DELAY/2);
-
- matrix_row_t checksum_computed = 0;
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_master_buffer[i] = serial_read_byte();
- sync_send();
- checksum_computed += ROW_MASK & serial_master_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_send();
-
- serial_input(); // end transaction
-
- if ( checksum_computed != checksum_received ) {
- status |= SLAVE_DATA_CORRUPT;
- } else {
- status &= ~SLAVE_DATA_CORRUPT;
- }
-}
-
-inline
-bool serial_slave_DATA_CORRUPT(void) {
- return status & SLAVE_DATA_CORRUPT;
-}
-
-// Copies the serial_slave_buffer to the master and sends the
-// serial_master_buffer to the slave.
-//
-// Returns:
-// 0 => no error
-// 1 => slave did not respond
-int serial_update_buffers(void) {
- // this code is very time dependent, so we need to disable interrupts
- cli();
-
- // signal to the slave that we want to start a transaction
- serial_output();
- serial_low();
- _delay_us(1);
-
- // wait for the slaves response
- serial_input();
- serial_high();
- _delay_us(SERIAL_DELAY);
-
- // check if the slave is present
- if (serial_read_pin()) {
- // slave failed to pull the line low, assume not present
- sei();
- return 1;
- }
-
- // if the slave is present syncronize with it
- sync_recv();
-
- matrix_row_t checksum_computed = 0;
- // receive data from the slave
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_slave_buffer[i] = serial_read_byte();
- sync_recv();
- checksum_computed += ROW_MASK & serial_slave_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_recv();
-
- if (checksum_computed != checksum_received) {
- sei();
- return 1;
- }
-
- matrix_row_t checksum = 0;
- // send data to the slave
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_master_buffer[i]);
- sync_recv();
- checksum += ROW_MASK & serial_master_buffer[i];
- }
- serial_write_byte(checksum);
- sync_recv();
-
- // always, release the line when not in use
- serial_output();
- serial_high();
-
- sei();
- return 0;
-}
-
-#endif
diff --git a/keyboards/keebio/bfo9000/serial.h b/keyboards/keebio/bfo9000/serial.h
deleted file mode 100644
index 62761945721..00000000000
--- a/keyboards/keebio/bfo9000/serial.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MY_SERIAL_H
-#define MY_SERIAL_H
-
-#include "config.h"
-#include "matrix.h"
-#include
-
-/* TODO: some defines for interrupt setup */
-#define SERIAL_PIN_DDR DDRD
-#define SERIAL_PIN_PORT PORTD
-#define SERIAL_PIN_INPUT PIND
-#define SERIAL_PIN_MASK _BV(PD0)
-#define SERIAL_PIN_INTERRUPT INT0_vect
-
-#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
-#define SERIAL_MASTER_BUFFER_LENGTH 1
-
-// Buffers for master - slave communication
-extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
-extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
-
-void serial_master_init(void);
-void serial_slave_init(void);
-int serial_update_buffers(void);
-bool serial_slave_data_corrupt(void);
-
-#endif
diff --git a/keyboards/keebio/iris/info.json b/keyboards/keebio/iris/info.json
index f7b017b97ac..37806975f8e 100644
--- a/keyboards/keebio/iris/info.json
+++ b/keyboards/keebio/iris/info.json
@@ -2,8 +2,8 @@
"keyboard_name": "Iris",
"url": "https://keeb.io",
"maintainer": "Keebio",
- "width": 14.5,
- "height": 5,
+ "width": 15,
+ "height": 5.75,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h
index dd247a42a7f..41933b0f3ff 100644
--- a/keyboards/keebio/iris/keymaps/drashna/config.h
+++ b/keyboards/keebio/iris/keymaps/drashna/config.h
@@ -19,8 +19,8 @@ along with this program. If not, see .
/* Use I2C or Serial, not both */
-#define USE_SERIAL
-#undef USE_I2C
+// #define USE_SERIAL
+#define USE_I2C
/* Select hand configuration */
@@ -31,7 +31,7 @@ along with this program. If not, see .
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
#define RGBLED_NUM 18 // Number of LEDs
-
+#define RGBLED_SPLIT { 9, 9 }
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 12
#define RGBLIGHT_VAL_STEP 12
@@ -55,7 +55,7 @@ along with this program. If not, see .
#define QMK_SPEAKER C6
#undef PRODUCT
-#ifdef KEYBOARD_iris_rev2
+#ifdef KEYBOARD_keebio_iris_rev2
#define PRODUCT Drashna Hacked Iris Rev.2
#endif
diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c
index 0c3b0d6d443..b306b6928a2 100644
--- a/keyboards/keebio/iris/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c
@@ -121,3 +121,14 @@ void matrix_init_keymap(void) {
writePinHigh(B0);
#endif
}
+
+
+void keyboard_post_init_keymap(void) {
+#if BACKLIGHT_ENABLE
+ backlight_enable();
+ backlight_level(5);
+ #ifdef BACKLIGHT_BREATHING
+ breathing_enable();
+ #endif
+#endif
+}
diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk
index e8035176efb..bac5f95f3a1 100644
--- a/keyboards/keebio/iris/keymaps/drashna/rules.mk
+++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk
@@ -5,13 +5,14 @@ CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
TAP_DANCE_ENABLE = no
RGBLIGHT_ENABLE = yes
-AUDIO_ENABLE = yes
+AUDIO_ENABLE = no
NKRO_ENABLE = yes
BACKLIGHT_ENABLE = no
SWAP_HANDS_ENABLE = no
-INDICATOR_LIGHTS = yes
+INDICATOR_LIGHTS = no
MACROS_ENABLED = no
RGBLIGHT_TWINKLE = no
+RGBLIGHT_STARTUP_ANIMATION = yes
BOOTLOADER = qmk-dfu
diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h
new file mode 100644
index 00000000000..4e2bf729f22
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/drashna_lp/config.h
@@ -0,0 +1,48 @@
+/*
+Copyright 2017 Danny Nguyen
+
+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 .
+*/
+
+#pragma once
+
+/* Use I2C or Serial, not both */
+#include "../drashna/config.h"
+
+#ifdef RGBLIGHT_ENABLE
+#undef RGBLED_NUM
+#define RGBLED_NUM 16 // Number of LEDs
+#undef RGBLED_SPLIT
+#define RGBLED_SPLIT { 8, 8 }
+#endif
+
+#undef PRODUCT
+#ifdef KEYBOARD_keebio_iris_rev2
+#define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
+#endif
+
+#undef SHFT_LED1
+#define SHFT_LED1 5
+#undef SHFT_LED2
+#define SHFT_LED2 10
+
+#undef CTRL_LED1
+#define CTRL_LED1 6
+#undef CTRL_LED2
+#define CTRL_LED2 9
+
+#undef ALT_LED1
+#define ALT_LED1 7
+#undef GUI_LED1
+#define GUI_LED1 8
diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c b/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c
new file mode 100644
index 00000000000..ff7bd09c0cf
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c
@@ -0,0 +1 @@
+// placeholder
diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk b/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk
new file mode 100644
index 00000000000..d3f6f5550f9
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk
@@ -0,0 +1,7 @@
+USER_NAME := drashna
+SRC += ../drashna/keymap.c
+
+include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk
+
+AUDIO_ENABLE = no
+BACKLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h
index b985c4dfc12..1b462d8cad6 100644
--- a/keyboards/keebio/iris/keymaps/drashna_old/config.h
+++ b/keyboards/keebio/iris/keymaps/drashna_old/config.h
@@ -23,10 +23,12 @@ along with this program. If not, see .
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
#define RGBLED_NUM 16 // Number of LEDs
+#undef RGBLED_SPLIT
+#define RGBLED_SPLIT { 8, 8 }
#endif
#undef PRODUCT
-#ifdef KEYBOARD_iris_rev2
+#ifdef KEYBOARD_keebio_iris_rev2
#define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
#endif
diff --git a/keyboards/orthodox/config.h b/keyboards/keebio/quefrency/keymaps/georgepetri/config.h
similarity index 78%
rename from keyboards/orthodox/config.h
rename to keyboards/keebio/quefrency/keymaps/georgepetri/config.h
index 821cd7e29f2..d72d7760ef9 100644
--- a/keyboards/orthodox/config.h
+++ b/keyboards/keebio/quefrency/keymaps/georgepetri/config.h
@@ -1,9 +1,9 @@
/*
-This is the c configuration file for the keyboard
+This is the c configuration file for the keymap
Copyright 2012 Jun Wako
-Copyright 2017 Jack Humbert
-Copyright 2017 Art Ortenburger
+Copyright 2015 Jack Humbert
+Copyright 2018 Danny Nguyen
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
@@ -19,9 +19,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
-#include "config_common.h"
-
-#endif
+#define USE_I2C
\ No newline at end of file
diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c
new file mode 100644
index 00000000000..f08ab4f8343
--- /dev/null
+++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c
@@ -0,0 +1,44 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_65(
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+ 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_DEL, KC_HOME,\
+// ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤
+ 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_END, \
+// ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤
+ 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_PGUP,\
+// ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤
+ 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_PGDN,\
+// ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤
+ KC_LCTL, KC_LGUI, KC_LALT, MO(_FN1), KC_SPC, KC_SPC ,_______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+// └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+ ),
+
+ [_FN1] = LAYOUT_65(
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+ 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_BSPC, KC_DEL, KC_INS, \
+// ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS,\
+// ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+// ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+// ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+// └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+ )
+};
diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md b/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md
new file mode 100644
index 00000000000..425190d198d
--- /dev/null
+++ b/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md
@@ -0,0 +1,48 @@
+# George Petri's Quefrency 65 layout
+
+```
+make keebio/quefrency:georgepetri
+```
+
+Based on the default querty layout with minor tweaks.
+The position of the arrow keys in a line in the bottom right.
+The backspace key is 1u and to the left of the delete key.
+Grave, pause and insert are on the function layer.
+
+### Base Layer
+```
+┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐
+│ ESC ││ 1 ││ 2 ││ 3 ││ 4 ││ 5 ││ 6 │ │ 7 ││ 8 ││ 9 ││ 0 ││ MINS││ EQL ││ BSPC││ DEL ││ HOME│
+└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘
+┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐
+│ TAB ││ Q ││ W ││ E ││ R ││ T │ │ Y ││ U ││ I ││ O ││ P ││ LBRC││ RBRC││ BSLS ││ END │
+└──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘
+┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐
+│ CAPS ││ A ││ S ││ D ││ F ││ G │ │ H ││ J ││ K ││ L ││ SCLN││ QUOT││ ENT ││ PGUP│
+└────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘
+┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐
+│ LSFT ││ Z ││ X ││ C ││ V ││ B │ │ N ││ M ││ COMM││ DOT ││ SLSH││ RSFT ││ PGDN│
+└────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘
+┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐
+│ LCTL ││ LGUI ││ LALT ││MO(_FN1)││ SPC │ │ SPC ││ RALT││ RCTL││ LEFT││ DOWN││ UP ││ RGHT│
+└────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘
+```
+
+### Function
+```
+┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐
+│ GRV ││ F1 ││ F2 ││ F3 ││ F4 ││ F5 ││ F6 │ │ F7 ││ F8 ││ F9 ││ F10 ││ F11 ││ F12 ││ BSPC││ DEL ││ INS │
+└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘
+┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐
+│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ ││ PAUS│
+└──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘
+┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐
+│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ │
+└────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘
+┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐
+│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │
+└────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘
+┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐
+│ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │
+└────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘
+```
\ No newline at end of file
diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk b/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/keyboards/exclusive/e6v2/bmc/i2c.h b/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h
similarity index 66%
rename from keyboards/exclusive/e6v2/bmc/i2c.h
rename to keyboards/keebio/quefrency/keymaps/kingwangwong/config.h
index 5407d7bee3f..bf632842e9c 100644
--- a/keyboards/exclusive/e6v2/bmc/i2c.h
+++ b/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h
@@ -1,5 +1,9 @@
/*
-Copyright 2016 Luiz Ribeiro
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+Copyright 2018 Danny Nguyen
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
@@ -15,10 +19,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-// Please do not modify this file
-
#pragma once
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
\ No newline at end of file
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+//#define USE_I2C
+#define USB_MAX_POWER_CONSUMPTION 50
+
+
+// #define USB_MAX_POWER_CONSUMPTION 100
diff --git a/keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c b/keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c
new file mode 100644
index 00000000000..7bdc115ab97
--- /dev/null
+++ b/keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c
@@ -0,0 +1,40 @@
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _BASE,
+ _FN1
+};
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │BSLS │ DEL │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┘ ┌──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┤
+ * │TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │BSPC │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┤
+ * │CAPS │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ENTER │
+ * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┐ └──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┤
+ * │LSHFT │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │RSHFT │ UP │
+ * ├──────┬─────┴─┬───┴──┬──┴─────┴────┬┴─────┤ ├─────┴┬────┴────┬┴────┬┴────┬┴────┬─────┼─────┤
+ * │LCTRL │L_GUI │L_ALT │SPC │FN1 │ │SPC │BSPC │R_ALT│R_CTR│LEFT │DOWN │RIGHT│
+ * └──────┴───────┴──────┴─────────────┴──────┘ └──────┴─────────┴─────┴─────┴─────┴─────┴─────┘
+ */
+ [_BASE] = 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_DEL,
+ 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_BSPC, KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_RGHT, KC_DOWN
+ ),
+
+ [_FN1] = 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_DEL, KC_BSPC,
+ _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+
+ )
+};
diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h
index 2048232c9c3..ed948a4b3bb 100644
--- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h
+++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h
@@ -12,7 +12,7 @@
#define EE_HANDS
#define IGNORE_MOD_TAP_INTERRUPT
-#define TAPPING_TERM 175
+#define TAPPING_TERM 150
#define TAPPING_TOGGLE 2
// #undef RGBLED_NUM
diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c
index 81c163a028f..e345ce4a383 100644
--- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c
+++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c
@@ -246,16 +246,11 @@ uint32_t layer_state_set_user(uint32_t state) {
return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST);
}
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case COLEMAK:
if (record->event.pressed) {
- persistent_default_layer_set(1UL << _COLEMAK);
+ default_layer_set(1UL << _COLEMAK);
layer_off ( _QWERTY);
layer_off ( _NUMBERS);
layer_off ( _NUMBERS2);
@@ -269,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case QWERTY:
if (record->event.pressed) {
- persistent_default_layer_set(1UL << _QWERTY);
+ default_layer_set(1UL << _QWERTY);
layer_off ( _COLEMAK);
layer_off ( _NUMBERS);
layer_off ( _NUMBERS2);
diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk
index b9e39c05393..cf63c44f4f0 100644
--- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk
+++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk
@@ -4,7 +4,7 @@
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/config.h b/keyboards/kinesis/keymaps/insertsnideremarks/config.h
index 9ce094be516..053a291b7c6 100644
--- a/keyboards/kinesis/keymaps/insertsnideremarks/config.h
+++ b/keyboards/kinesis/keymaps/insertsnideremarks/config.h
@@ -6,7 +6,7 @@
// place overrides here
#define IGNORE_MOD_TAP_INTERRUPT
-#define TAPPING_TERM 175
+#define TAPPING_TERM 150
#define TAPPING_TOGGLE 2
diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c
index 7f328b4f0e9..10b0c2cb73d 100644
--- a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c
+++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c
@@ -1,4 +1,4 @@
-#include QMK_KEYBOARD_H
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -147,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN
),
-/* Number/symbol layer
+/* Numbers/Symbols layer
(Multiple characters: single-tap for first, double-tap for second)
,-----------------------------------------------------------------------------------------------------------.
| | | | | | | | | | | | | | | | | | |
@@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| | | KP . |KP/KP*| KP- _| KP+ =| | | KP 1 | KP 2 | KP 3 |KP Ent| |
`--------+------+------+------+------+------' `------+------+------+------+------+--------'
- | ( | ) | [ { | ] } | | KP 0 | , | KP . |KP Ent|
+ | ( | ) | [ { | ] } | | | KP 0 | KP . |KP Ent|
`---------------------------' `---------------------------'
,---------------. ,---------------.
| | | | | |
@@ -272,14 +272,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______,
_______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______,
_______, _______, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
- KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), KC_P0, KC_COMM, KC_PDOT, KC_PENT,
+ KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, KC_P0, KC_PDOT, KC_PENT,
_______, _______, _______, _______,
_______, _______,
_______, _______, _______, _______, _______, _______
),
/* Colemak gaming/vanilla
- (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer)
+ (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer)
,-----------------------------------------------------------------------------------------------------------.
| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst|
`-----------------------------------------------------------------------------------------------------------'
@@ -288,18 +288,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
- | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
+ | LCtrl | A | R | S | T | D | | H | N | E | I | O | ' |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Shift | Z | X | C | V | B | | K | M | , | . | / | Shift |
`--------+------+------+------+------+------' `------+------+------+------+------+--------'
| Ins | ` | [ | ] | | Left | Down | Up | Right|
`---------------------------' `---------------------------'
,---------------. ,---------------.
- |Esc/Ctl|TD(ADJ)| | RAlt | RCtl |
+ | Esc | | | RAlt | RCtl |
,-------|-------|-------| |-------+-------+-------.
- | | | LAlt | | RGUI | | |
- | Space | Enter |-------| |-------| Delete| Bspc |
- | | |Bspc/FN| | Ent/NS| | |
+ | | | LAlt | | RGUI | Delete| Bspc |
+ | Space | Enter |-------| |-------| / | / |
+ | | | Bspc | | Ent/NS|Number2| Fn2 |
`-----------------------' `-----------------------'
*/
[_COLEMAKGM] = LAYOUT_pretty(
@@ -309,13 +309,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
- CTLESC, TD(ADJ), KC_RALT, KC_RCTL,
+ KC_ESC, XXXXXXX, KC_RALT, KC_RCTL,
KC_LALT, KC_RGUI,
- KC_SPC, KC_ENT, BSPCFN, ENTNS, KC_DEL, KC_BSPC
+ KC_SPC, KC_ENT, KC_BSPC, ENTNS, DELNS, BSPCFN
),
/* QWERTY gaming/vanilla
- (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer)
+ (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer)
,-----------------------------------------------------------------------------------------------------------.
| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst|
`-----------------------------------------------------------------------------------------------------------'
@@ -324,18 +324,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
- | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
+ | LCtrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Shift | Z | X | C | V | B | | N | M | , | . | / | Shift |
`--------+------+------+------+------+------' `------+------+------+------+------+--------'
| Ins | ` | [ | ] | | Left | Down | Up | Right|
`---------------------------' `---------------------------'
,---------------. ,---------------.
- |Esc/Ctl|TD(ADJ)| | RAlt | RCtl |
+ | Esc | | | RAlt | RCtl |
,-------|-------|-------| |-------+-------+-------.
- | | | LAlt | | RGUI | | |
- | Space | Enter |-------| |-------| Delete| Bspc |
- | | |Bspc/FN| | Ent/NS| | |
+ | | | LAlt | | RGUI | Delete| Bspc |
+ | Space | Enter |-------| |-------| / | / |
+ | | | Bspc | | Ent/NS|Number2| Fn2 |
`-----------------------' `-----------------------'
*/
[_QWERTYGM] = LAYOUT_pretty(
@@ -345,9 +345,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
- CTLESC, TD(ADJ), KC_RALT, KC_RCTL,
+ KC_ESC, XXXXXXX, KC_RALT, KC_RCTL,
KC_LALT, KC_RGUI,
- KC_SPC, KC_ENT, BSPCFN, ENTNS, KC_DEL, KC_BSPC
+ KC_SPC, KC_ENT, KC_BSPC, ENTNS, DELNS, BSPCFN
),
/* Adjust layer
@@ -404,11 +404,6 @@ uint32_t layer_state_set_user(uint32_t state) {
return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST);
}
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case COLEMAK:
diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md
index 7a146c7a292..4c8fb153c57 100644
--- a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md
+++ b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md
@@ -1,6 +1,6 @@
# insertsnideremarks' Kinesis Keymap
-These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers.
+These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's USB-USB TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers.
There are minor changes in the base keywell layout of non-alpha keys (e.g., CapsLock is ESC/Ctl, arrow clusters on one side), while the thumb clusters deviate more from the default layout.
@@ -10,36 +10,36 @@ Changes to the thumb clusters include:
* Backspace have been duplicated on both clusters.
* The 2u keys serve dual function as momentary layer switchers.
-I've largely left the function keys untouched, with the intension of not using them. They are neither easy to use nor reach due to their locations and size, and, prior to Advantage2, particularly terrible rubber domes were used. They have since updated the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys.
+I've largely left the function keys untouched, with the intension of not using them. They are neither easy to use nor reach due to their locations and size, and the rubber domes used were terrible. They have since replaced the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys.
I use Colemak as my default layout. I've included QWERTY here as well.
-Additionally, I've added gaming/vanilla version of Colemak and QWERTY layouts. These layouts have limited access to the Function or Numbers layers, and are mainly used for gaming.
+Additionally, I've added gaming/vanilla version of Colemak and QWERTY layouts. These layouts have limited access to the Function or Numbers/Symbols layers, and are mainly used for gaming.
Persistent default layer has been enabled for Colemak and QWERTY. The gaming/vanilla Colemak and QWERTY can be set as default layer, but will not be persistent.
## Future plans
-* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock). May configure it as layer indicator.
+* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock) to use as layer indicators.
* Add a speaker now that QMK supports additional pins for audio use.
-* Utilize the leftover spots on the key matrix, as well as unused pins on Teensy to run macropad and/or foot pedals.
+* Utilize the leftover spots on the key matrix, as well as unused pins on Teensy++ 2.0 to run macropad and/or foot pedals.
### Colemak
- (Default layer, keys separated by /: tap for first, hold for second; uses Space Cadet Shifts)
- ,-----------------------------------------------------------------------------------------------------------.
- | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst|
- `-----------------------------------------------------------------------------------------------------------'
- ,-------------------------------------------. ,-------------------------------------------.
- | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
- |--------+------+------+------+------+------| |------+------+------+------+------+--------|
- | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
- |--------+------+------+------+------+------| |------+------+------+------+------+--------|
- |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' |
- |--------+------+------+------+------+------| |------+------+------+------+------+--------|
- |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift|
- `--------+------+------+------+------+------' `------+------+------+------+------+--------'
- | Ins | ` | [ | ] | | Left | Down | Up | Right|
+ (Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts)
+ ,-----------------------------------------------------------------------------------------------------------.
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst|
+ `-----------------------------------------------------------------------------------------------------------'
+ ,-------------------------------------------. ,-------------------------------------------.
+ | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
+ |--------+------+------+------+------+------| |------+------+------+------+------+--------|
+ | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
+ |--------+------+------+------+------+------| |------+------+------+------+------+--------|
+ |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' |
+ |--------+------+------+------+------+------| |------+------+------+------+------+--------|
+ |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift|
+ `--------+------+------+------+------+------' `------+------+------+------+------+--------'
+ | Ins | ` | [ | ] | | Left | Down | Up | Right|
`---------------------------' `---------------------------'
,---------------. ,---------------.
|Esc/Ctl| Hyper | | RAlt | RCtl |
@@ -150,7 +150,7 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va
### Colemak gaming/vanilla
- (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer)
+ (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer)
,-----------------------------------------------------------------------------------------------------------.
| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst|
`-----------------------------------------------------------------------------------------------------------'
@@ -159,23 +159,23 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
- | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
+ | LCtrl | A | R | S | T | D | | H | N | E | I | O | ' |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Shift | Z | X | C | V | B | | K | M | , | . | / | Shift |
`--------+------+------+------+------+------' `------+------+------+------+------+--------'
| Ins | ` | [ | ] | | Left | Down | Up | Right|
`---------------------------' `---------------------------'
,---------------. ,---------------.
- |Esc/Ctl|TD(ADJ)| | RAlt | RCtl |
+ | Esc | | | RAlt | RCtl |
,-------|-------|-------| |-------+-------+-------.
- | | | LAlt | | RGUI | | |
- | Space | Enter |-------| |-------| Delete| Bspc |
- | | |Bspc/FN| | Ent/NS| | |
+ | | | LAlt | | RGUI | Delete| Bspc |
+ | Space | Enter |-------| |-------| / | / |
+ | | | Bspc | | Ent/NS|Number2| Fn2 |
`-----------------------' `-----------------------'
### QWERTY gaming/vanilla
- (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer)
+ (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer)
,-----------------------------------------------------------------------------------------------------------.
| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst|
`-----------------------------------------------------------------------------------------------------------'
@@ -184,18 +184,18 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
- | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
+ | LCtrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|--------+------+------+------+------+------| |------+------+------+------+------+--------|
| Shift | Z | X | C | V | B | | N | M | , | . | / | Shift |
`--------+------+------+------+------+------' `------+------+------+------+------+--------'
| Ins | ` | [ | ] | | Left | Down | Up | Right|
`---------------------------' `---------------------------'
,---------------. ,---------------.
- |Esc/Ctl|TD(ADJ)| | RAlt | RCtl |
+ | Esc | | | RAlt | RCtl |
,-------|-------|-------| |-------+-------+-------.
- | | | LAlt | | RGUI | | |
- | Space | Enter |-------| |-------| Delete| Bspc |
- | | |Bspc/FN| | Ent/NS| | |
+ | | | LAlt | | RGUI | Delete| Bspc |
+ | Space | Enter |-------| |-------| / | / |
+ | | | Bspc | | Ent/NS|Number2| Fn2 |
`-----------------------' `-----------------------'
### Adjust layer
@@ -221,4 +221,4 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va
| | |-------| |-------| | |
| | | | | | | |
`-----------------------' `-----------------------'
-
\ No newline at end of file
+
diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h
index d2f73a6a8e1..f63c38bf6f8 100644
--- a/keyboards/massdrop/alt/config.h
+++ b/keyboards/massdrop/alt/config.h
@@ -119,3 +119,10 @@ along with this program. If not, see .
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 15
+#define RGB_MATRIX_LED_FLUSH_LIMIT 10
+#define RGB_MATRIX_EXTRA_TOG
+
+#include "config_led.h"
diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c
new file mode 100644
index 00000000000..7d98e47c907
--- /dev/null
+++ b/keyboards/massdrop/alt/config_led.c
@@ -0,0 +1,148 @@
+#ifdef RGB_MATRIX_ENABLE
+#include "alt.h"
+
+#include "led_matrix.h"
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// This table can be almost-automatically derived from ISSI3733_LED_MAP that is
+// defined in config_led.h
+
+// You can calculate the (0-244, 0-64) x/y values from the x/y values defined in
+// ISSI3733_LED_MAP with the following formula:
+// uint8_t rgb_x = ((ISSI3733_LED_MAP[i].x - MIN_X) / (MAX_X - MIN_X)) * 224;
+// uint8_t rgb_y = ((ISSI3733_LED_MAP[i].y - MIN_Y) / (MAX_Y - MIN_Y)) * 64;
+// Where the min/max vars are the minimum and maximum "bounds" of x/y values
+// present in ISSI3733_LED_MAP
+//
+// The row/col values need to be manually tweaked though, compensating for the
+// "empty" cells that are a product of larger keys
+//
+// There is a quick-and-dirty implementation of this under ledvis.html
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC
+ /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1
+ /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2
+ /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3
+ /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4
+ /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5
+ /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6
+ /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7
+ /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8
+ /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9
+ /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0
+ /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS
+ /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL
+ /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC
+ /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL
+ /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB
+ /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q
+ /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W
+ /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E
+ /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R
+ /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T
+ /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y
+ /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U
+ /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I
+ /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O
+ /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P
+ /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC
+ /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC
+ /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS
+ /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME
+ /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
+ /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A
+ /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S
+ /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D
+ /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F
+ /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G
+ /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H
+ /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J
+ /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K
+ /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L
+ /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN
+ /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT
+ /* _________________________________________ */ // ____
+ /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT
+ /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP
+ /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT
+ /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z
+ /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X
+ /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C
+ /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V
+ /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B
+ /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N
+ /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M
+ /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM
+ /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT
+ /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH
+ /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT
+ /* _________________________________________ */ // ____
+ /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP
+ /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN
+ /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL
+ /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI
+ /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT
+ /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1)
+ /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT
+ /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN
+ /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT
+
+ // Underglow LEDs
+ { { 255 }, { 1, 1 }, 0 },
+ { { 255 }, { 15, 0 }, 0 },
+ { { 255 }, { 31, 0 }, 0 },
+ { { 255 }, { 47, 0 }, 0 },
+ { { 255 }, { 63, 0 }, 0 },
+ { { 255 }, { 79, 0 }, 0 },
+ { { 255 }, { 95, 0 }, 0 },
+ { { 255 }, { 112, 0 }, 0 },
+ { { 255 }, { 128, 0 }, 0 },
+ { { 255 }, { 144, 0 }, 0 },
+ { { 255 }, { 160, 0 }, 0 },
+ { { 255 }, { 176, 0 }, 0 },
+ { { 255 }, { 192, 0 }, 0 },
+ { { 255 }, { 208, 0 }, 0 },
+ { { 255 }, { 222, 1 }, 0 },
+ { { 255 }, { 224, 13 }, 0 },
+ { { 255 }, { 224, 25 }, 0 },
+ { { 255 }, { 224, 38 }, 0 },
+ { { 255 }, { 224, 50 }, 0 },
+ { { 255 }, { 222, 62 }, 0 },
+ { { 255 }, { 191, 64 }, 0 },
+ { { 255 }, { 179, 64 }, 0 },
+ { { 255 }, { 167, 64 }, 0 },
+ { { 255 }, { 153, 64 }, 0 },
+ { { 255 }, { 139, 64 }, 0 },
+ { { 255 }, { 125, 64 }, 0 },
+ { { 255 }, { 112, 64 }, 0 },
+ { { 255 }, { 98, 64 }, 0 },
+ { { 255 }, { 84, 64 }, 0 },
+ { { 255 }, { 70, 64 }, 0 },
+ { { 255 }, { 56, 64 }, 0 },
+ { { 255 }, { 42, 64 }, 0 },
+ { { 255 }, { 28, 64 }, 0 },
+ { { 255 }, { 1, 62 }, 0 },
+ { { 255 }, { 0, 50 }, 0 },
+ { { 255 }, { 0, 38 }, 0 },
+ { { 255 }, { 0, 25 }, 0 },
+ { { 255 }, { 0, 13 }, 0 },
+};
+
+#ifdef USB_LED_INDICATOR_ENABLE
+void rgb_matrix_indicators_kb(void)
+{
+ led_matrix_indicators();
+}
+#endif // USB_LED_INDICATOR_ENABLE
+
+#endif
diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h
index a049e38179a..82117b33279 100644
--- a/keyboards/massdrop/alt/config_led.h
+++ b/keyboards/massdrop/alt/config_led.h
@@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef _config_led_h_
-#define _config_led_h_
+#pragma once
//Define number of ISSI3733 drivers being used (1...16)
#define ISSI3733_DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT
//Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic)
#define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE }
@@ -30,22 +30,25 @@ along with this program. If not, see .
//Count of LED bodies
#define ISSI3733_LED_COUNT 105
-//Default Global Current Register value (Default brightness 0 - 255)
-#define ISSI3733_GCR_DEFAULT 128
-
#define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus
#define LED_GCR_STEP 10 //GCR increment/decrement value
+#ifdef USE_MASSDROP_CONFIGURATOR
+#define ANIMATION_SPEED_STEP 1
+
+#define BREATHE_STEP 1
+#define BREATHE_MIN_STEP 0
+#define BREATHE_MAX_STEP 255
+#endif
+
+//Default Global Current Register value (Default brightness 0 - 255)
+#define ISSI3733_GCR_DEFAULT LED_GCR_MAX
+
//Automatic power rollback and recovery
#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
-#define ANIMATION_SPEED_STEP 1
-
-#define BREATHE_MIN_STEP 0
-#define BREATHE_MAX_STEP 255
-
//LED Mapping - More practically generated from a spreadsheet program
//id: ID of the LED (Sync with PCB callouts)
//x: Physical X coordinate of LED (units do not matter)
@@ -174,5 +177,3 @@ along with this program. If not, see .
#define USB_LED_COMPOSE_SCANCODE 255
#define USB_LED_KANA_SCANCODE 255
#endif //USB_LED_INDICATOR_ENABLE
-
-#endif //_config_led_h_
diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
index 10bc62c1f0e..a4519d40490 100644
--- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = 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_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c
index 10bc62c1f0e..a4519d40490 100644
--- a/keyboards/massdrop/alt/keymaps/default/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/default/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = 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_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c
new file mode 100644
index 00000000000..7969583df4b
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c
@@ -0,0 +1,223 @@
+#include QMK_KEYBOARD_H
+
+enum alt_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = 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_BSPC, KC_DEL, \
+ 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_HOME, \
+ 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_PGUP, \
+ 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_UP, KC_PGDN, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = 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_MUTE, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //LEDs are normally inactive, no processing is performed on them
+ //Flags are used in matching criteria for an LED to be active and indicate how to color it
+ //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_)
+ //LED IDs can be found in config_led.h in the keyboard's directory
+ //Examples are below
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //Specific LEDs use the user's selected pattern while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 },
+
+ //Specific LEDs use specified RGB values while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 },
+
+ //All LEDs use the user's selected pattern
+ //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green
+ //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1)
+ //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //When layer 1 is active, key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007)
+ //When layer 1 is active, edge LEDs use green (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8)
+ //When layer 1 is active, edge LEDs use green (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF)
+ // { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF8000, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255, .layer = 1 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFFFFFFF8, .id3 = 0x000003FF, .g = 127, .layer = 1 },
+
+ //All key LEDs use red while edge LEDs use the active pattern
+ //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007)
+ //Edge uses active pattern (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8)
+ //Edge uses active pattern (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF)
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFFFFFFF8, .id3 = 0x000003FF },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/alt/keymaps/default_md/rules.mk b/keyboards/massdrop/alt/keymaps/default_md/rules.mk
new file mode 100644
index 00000000000..064a6f54c1f
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/default_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c
index 639eb2da75e..26a1c6d0148 100644
--- a/keyboards/massdrop/alt/keymaps/mac/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = 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_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c
new file mode 100644
index 00000000000..8a052cc250e
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c
@@ -0,0 +1,193 @@
+#include QMK_KEYBOARD_H
+
+enum alt_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = 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_BSPC, KC_DEL, \
+ 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_HOME, \
+ 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_PGUP, \
+ 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_UP, KC_PGDN, \
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = 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_MUTE, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //Please see ../default_md/keymap.c for examples
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/alt/keymaps/mac_md/rules.mk b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk
new file mode 100644
index 00000000000..064a6f54c1f
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/keymaps/reywood/README.md b/keyboards/massdrop/alt/keymaps/reywood/README.md
new file mode 100644
index 00000000000..5ee630dfb80
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/reywood/README.md
@@ -0,0 +1,5 @@
+# THIS KEYMAP IS BROKEN
+
+The CTRL and ALT have both been switched to using the QMK RGB Matrix system,
+rendering any custom effects that used the old, custom Massdrop lighting system,
+BROKEN.
diff --git a/keyboards/massdrop/alt/keymaps/reywood/rules.mk b/keyboards/massdrop/alt/keymaps/reywood/rules.mk
index b5b961a0f3b..956d1c700c2 100644
--- a/keyboards/massdrop/alt/keymaps/reywood/rules.mk
+++ b/keyboards/massdrop/alt/keymaps/reywood/rules.mk
@@ -1,6 +1,4 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
SRC += rgb_matrix_user.c
#For platform and packs
@@ -32,3 +30,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk
index c5539158f58..aa45c68056d 100644
--- a/keyboards/massdrop/alt/rules.mk
+++ b/keyboards/massdrop/alt/rules.mk
@@ -1,6 +1,6 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
+SRC = matrix.c
+SRC += config_led.c
#For platform and packs
ARM_ATSAM = SAMD51J18A
@@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = custom
diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h
index 71ccac0f399..df2e5092163 100644
--- a/keyboards/massdrop/ctrl/config.h
+++ b/keyboards/massdrop/ctrl/config.h
@@ -119,3 +119,10 @@ along with this program. If not, see .
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 15
+#define RGB_MATRIX_LED_FLUSH_LIMIT 10
+#define RGB_MATRIX_EXTRA_TOG
+
+#include "config_led.h"
diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c
new file mode 100644
index 00000000000..afdbf3a2227
--- /dev/null
+++ b/keyboards/massdrop/ctrl/config_led.c
@@ -0,0 +1,144 @@
+#ifdef RGB_MATRIX_ENABLE
+#include "ctrl.h"
+
+#include "led_matrix.h"
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS
+ { { 0|(0<<4) }, { 7, 5 }, 0 },
+ { { 0|(1<<4) }, { 31, 5 }, 0 },
+ { { 0|(2<<4) }, { 43, 5 }, 0 },
+ { { 0|(3<<4) }, { 55, 5 }, 0 },
+ { { 0|(4<<4) }, { 67, 5 }, 0 },
+ { { 0|(5<<4) }, { 85, 5 }, 0 },
+ { { 0|(6<<4) }, { 97, 5 }, 0 },
+ { { 0|(7<<4) }, { 109, 5 }, 0 },
+ { { 6|(0<<4) }, { 121, 5 }, 0 },
+ { { 6|(1<<4) }, { 139, 5 }, 0 },
+ { { 6|(2<<4) }, { 151, 5 }, 0 },
+ { { 6|(3<<4) }, { 163, 5 }, 0 },
+ { { 6|(4<<4) }, { 175, 5 }, 0 },
+ { { 6|(5<<4) }, { 193, 5 }, 0 },
+ { { 6|(6<<4) }, { 205, 5 }, 1 },
+ { { 6|(7<<4) }, { 217, 5 }, 0 },
+ // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP
+ { { 1|(0<<4) }, { 7, 20 }, 0 },
+ { { 1|(1<<4) }, { 19, 20 }, 0 },
+ { { 1|(2<<4) }, { 31, 20 }, 0 },
+ { { 1|(3<<4) }, { 43, 20 }, 0 },
+ { { 1|(4<<4) }, { 55, 20 }, 0 },
+ { { 1|(5<<4) }, { 67, 20 }, 0 },
+ { { 1|(6<<4) }, { 79, 20 }, 0 },
+ { { 1|(7<<4) }, { 91, 20 }, 0 },
+ { { 7|(0<<4) }, { 103, 20 }, 0 },
+ { { 7|(1<<4) }, { 115, 20 }, 0 },
+ { { 7|(2<<4) }, { 127, 20 }, 0 },
+ { { 7|(3<<4) }, { 139, 20 }, 0 },
+ { { 7|(4<<4) }, { 151, 20 }, 0 },
+ { { 7|(5<<4) }, { 169, 20 }, 0 },
+ { { 7|(6<<4) }, { 193, 20 }, 0 },
+ { { 7|(7<<4) }, { 205, 20 }, 0 },
+ { { 9|(7<<4) }, { 217, 20 }, 0 },
+ // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN
+ { { 2|(0<<4) }, { 10, 30 }, 0 },
+ { { 2|(1<<4) }, { 25, 30 }, 0 },
+ { { 2|(2<<4) }, { 37, 30 }, 0 },
+ { { 2|(3<<4) }, { 49, 30 }, 0 },
+ { { 2|(4<<4) }, { 61, 30 }, 0 },
+ { { 2|(5<<4) }, { 73, 30 }, 0 },
+ { { 2|(6<<4) }, { 85, 30 }, 0 },
+ { { 2|(7<<4) }, { 97, 30 }, 0 },
+ { { 8|(0<<4) }, { 109, 30 }, 0 },
+ { { 8|(1<<4) }, { 121, 30 }, 0 },
+ { { 8|(2<<4) }, { 133, 30 }, 0 },
+ { { 8|(3<<4) }, { 145, 30 }, 0 },
+ { { 8|(4<<4) }, { 157, 30 }, 0 },
+ { { 8|(5<<4) }, { 172, 30 }, 0 },
+ { { 8|(6<<4) }, { 193, 30 }, 0 },
+ { { 8|(7<<4) }, { 205, 30 }, 0 },
+ { { 9|(6<<4) }, { 217, 30 }, 0 },
+ // 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
+ { { 3|(0<<4) }, { 11, 39 }, 1 },
+ { { 3|(1<<4) }, { 28, 39 }, 0 },
+ { { 3|(2<<4) }, { 40, 39 }, 0 },
+ { { 3|(3<<4) }, { 52, 39 }, 0 },
+ { { 3|(4<<4) }, { 64, 39 }, 0 },
+ { { 3|(5<<4) }, { 76, 39 }, 0 },
+ { { 3|(6<<4) }, { 88, 39 }, 0 },
+ { { 3|(7<<4) }, { 100, 39 }, 0 },
+ { { 9|(0<<4) }, { 112, 39 }, 0 },
+ { { 9|(1<<4) }, { 124, 39 }, 0 },
+ { { 9|(2<<4) }, { 136, 39 }, 0 },
+ { { 9|(3<<4) }, { 148, 39 }, 0 },
+ { { 9|(4<<4) }, { 168, 39 }, 0 },
+ // 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_UP
+ { { 4|(0<<4) }, { 14, 49 }, 0 },
+ { { 4|(1<<4) }, { 34, 49 }, 0 },
+ { { 4|(2<<4) }, { 46, 49 }, 0 },
+ { { 4|(3<<4) }, { 58, 49 }, 0 },
+ { { 4|(4<<4) }, { 70, 49 }, 0 },
+ { { 4|(5<<4) }, { 82, 49 }, 0 },
+ { { 4|(6<<4) }, { 94, 49 }, 0 },
+ { { 4|(7<<4) }, { 106, 49 }, 0 },
+ { { 10|(0<<4) }, { 118, 49 }, 0 },
+ { { 10|(1<<4) }, { 130, 49 }, 0 },
+ { { 10|(2<<4) }, { 142, 49 }, 0 },
+ { { 10|(3<<4) }, { 165, 49 }, 0 },
+ { { 9|(5<<4) }, { 205, 49 }, 0 },
+ // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ { { 5|(0<<4) }, { 8, 59 }, 0 },
+ { { 5|(1<<4) }, { 23, 59 }, 0 },
+ { { 5|(2<<4) }, { 38, 59 }, 0 },
+ { { 5|(3<<4) }, { 83, 59 }, 0 },
+ { { 5|(4<<4) }, { 129, 59 }, 0 },
+ { { 5|(5<<4) }, { 144, 59 }, 0 },
+ { { 5|(6<<4) }, { 159, 59 }, 0 },
+ { { 5|(7<<4) }, { 174, 59 }, 0 },
+ { { 10|(4<<4) }, { 193, 59 }, 0 },
+ { { 10|(5<<4) }, { 205, 59 }, 0 },
+ { { 10|(6<<4) }, { 217, 59 }, 0 },
+ // Underglow / Border
+ { { 0xFF }, { 222, 64 }, 0 },
+ { { 0xFF }, { 204, 64 }, 0 },
+ { { 0xFF }, { 186, 64 }, 0 },
+ { { 0xFF }, { 167, 64 }, 0 },
+ { { 0xFF }, { 149, 64 }, 0 },
+ { { 0xFF }, { 130, 64 }, 0 },
+ { { 0xFF }, { 112, 64 }, 0 },
+ { { 0xFF }, { 94, 64 }, 0 },
+ { { 0xFF }, { 75, 64 }, 0 },
+ { { 0xFF }, { 57, 64 }, 0 },
+ { { 0xFF }, { 38, 64 }, 0 },
+ { { 0xFF }, { 20, 64 }, 0 },
+ { { 0xFF }, { 0, 64 }, 0 },
+ { { 0xFF }, { 0, 47 }, 0 },
+ { { 0xFF }, { 0, 32 }, 0 },
+ { { 0xFF }, { 0, 17 }, 0 },
+ { { 0xFF }, { 0, 0 }, 0 },
+ { { 0xFF }, { 20, 0 }, 0 },
+ { { 0xFF }, { 38, 0 }, 0 },
+ { { 0xFF }, { 57, 0 }, 0 },
+ { { 0xFF }, { 75, 0 }, 0 },
+ { { 0xFF }, { 94, 0 }, 0 },
+ { { 0xFF }, { 112, 0 }, 0 },
+ { { 0xFF }, { 130, 0 }, 0 },
+ { { 0xFF }, { 149, 0 }, 0 },
+ { { 0xFF }, { 167, 0 }, 0 },
+ { { 0xFF }, { 186, 0 }, 0 },
+ { { 0xFF }, { 204, 0 }, 0 },
+ { { 0xFF }, { 222, 1 }, 0 },
+ { { 0xFF }, { 224, 17 }, 0 },
+ { { 0xFF }, { 224, 32 }, 0 },
+ { { 0xFF }, { 224, 47 }, 0 },
+};
+
+#ifdef USB_LED_INDICATOR_ENABLE
+void rgb_matrix_indicators_kb(void)
+{
+ led_matrix_indicators();
+}
+#endif // USB_LED_INDICATOR_ENABLE
+
+#endif
diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h
index 471ab7007d1..0c91a0c80ba 100644
--- a/keyboards/massdrop/ctrl/config_led.h
+++ b/keyboards/massdrop/ctrl/config_led.h
@@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef _config_led_h_
-#define _config_led_h_
+#pragma once
//Define number of ISSI3733 drivers being used (1...16)
#define ISSI3733_DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT
//Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic)
#define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE }
@@ -30,22 +30,25 @@ along with this program. If not, see .
//Count of LED bodies
#define ISSI3733_LED_COUNT 119
-//Default Global Current Register value (Default brightness 0 - 255)
-#define ISSI3733_GCR_DEFAULT 128
-
#define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus
#define LED_GCR_STEP 10 //GCR increment/decrement value
+#ifdef USE_MASSDROP_CONFIGURATOR
+#define ANIMATION_SPEED_STEP 1
+
+#define BREATHE_STEP 1
+#define BREATHE_MIN_STEP 0
+#define BREATHE_MAX_STEP 255
+#endif
+
+//Default Global Current Register value (Default brightness 0 - 255)
+#define ISSI3733_GCR_DEFAULT LED_GCR_MAX
+
//Automatic power rollback and recovery
#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
-#define ANIMATION_SPEED_STEP 1
-
-#define BREATHE_MIN_STEP 0
-#define BREATHE_MAX_STEP 255
-
//LED Mapping - More practically generated from a spreadsheet program
//id: ID of the LED (Sync with PCB callouts)
//x: Physical X coordinate of LED (units do not matter)
@@ -187,5 +190,3 @@ along with this program. If not, see .
#define USB_LED_COMPOSE_SCANCODE 255
#define USB_LED_KANA_SCANCODE 255
#endif //USB_LED_INDICATOR_ENABLE
-
-#endif //_config_led_h_
diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c
index cdb627f9c4b..182abbbad4f 100644
--- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum ctrl_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c
new file mode 100644
index 00000000000..16f88ffe1dc
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c
@@ -0,0 +1,226 @@
+#include QMK_KEYBOARD_H
+
+enum ctrl_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //LEDs are normally inactive, no processing is performed on them
+ //Flags are used in matching criteria for an LED to be active and indicate how to color it
+ //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_)
+ //LED IDs can be found in config_led.h in the keyboard's directory
+ //Examples are below
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //Specific LEDs use the user's selected pattern while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 },
+
+ //Specific LEDs use specified RGB values while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 },
+
+ //All LEDs use the user's selected pattern
+ //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green
+ //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1)
+ //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //When layer 1 is active, key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF)
+ //When layer 1 is active, edge LEDs use green (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000)
+ //When layer 1 is active, edge LEDs use green (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF)
+ // { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF0000, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255, .layer = 1 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFF800000, .id3 = 0x00FFFFFF, .g = 127, .layer = 1 },
+
+ //All key LEDs use red while edge LEDs use the active pattern
+ //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF)
+ //Edge uses active pattern (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000)
+ //Edge uses active pattern (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF)
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFF800000, .id3 = 0x00FFFFFF },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk
new file mode 100644
index 00000000000..064a6f54c1f
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c
index e41b5eba20c..41cf8275724 100644
--- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum ctrl_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c
new file mode 100644
index 00000000000..6dfc2137862
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c
@@ -0,0 +1,196 @@
+#include QMK_KEYBOARD_H
+
+enum ctrl_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //Please see ../default_md/keymap.c for examples
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk
new file mode 100644
index 00000000000..064a6f54c1f
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md
new file mode 100644
index 00000000000..5ee630dfb80
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md
@@ -0,0 +1,5 @@
+# THIS KEYMAP IS BROKEN
+
+The CTRL and ALT have both been switched to using the QMK RGB Matrix system,
+rendering any custom effects that used the old, custom Massdrop lighting system,
+BROKEN.
diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c
index 0bdc1521401..58911aa7574 100644
--- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c
@@ -15,7 +15,6 @@
extern issi3733_led_t *lede;
extern issi3733_led_t led_map[];
-extern led_disp_t disp;
enum ctrl_keycodes {
L_BRI = SAFE_RANGE, //LED Brightness Increase
@@ -238,8 +237,6 @@ void led_matrix_run(void)
{
led_cur = led_map;
- disp.frame += 1;
-
breathe_mult = 1;
if (led_animation_breathing)
@@ -314,7 +311,7 @@ void led_matrix_run(void)
}
float pomod;
- pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed;
+ pomod = (float)(g_tick % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed;
//Add in any moving effects
if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L)))
diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk
new file mode 100644
index 00000000000..064a6f54c1f
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c
new file mode 100644
index 00000000000..1e50b4a53c4
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c
@@ -0,0 +1,105 @@
+#include QMK_KEYBOARD_H
+#include "xulkal.h"
+
+enum ctrl_keycodes {
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, TD_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \
+ KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, RGB_RMOD, RGB_MOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, _______, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, RGB_TOG, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case U_T_AUTO:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk b/keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk
new file mode 100644
index 00000000000..f78fb3237b9
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk
@@ -0,0 +1 @@
+DISABLE_LTO = yes
diff --git a/keyboards/massdrop/ctrl/led_programs.c b/keyboards/massdrop/ctrl/led_programs.c
deleted file mode 100644
index ca27016454d..00000000000
--- a/keyboards/massdrop/ctrl/led_programs.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2018 Massdrop Inc.
-
-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 .
-*/
-
-#include "ctrl.h"
-#include "led_matrix.h"
-
-//Teal <-> Salmon
-led_setup_t leds_teal_salmon[] = {
- { .hs = 0, .he = 33, .rs = 24, .re = 24, .gs = 215, .ge = 215, .bs = 204, .be = 204, .ef = EF_NONE },
- { .hs = 33, .he = 66, .rs = 24, .re = 255, .gs = 215, .ge = 114, .bs = 204, .be = 118, .ef = EF_NONE },
- { .hs = 66, .he = 100, .rs = 255, .re = 255, .gs = 114, .ge = 114, .bs = 118, .be = 118, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Yellow
-led_setup_t leds_yellow[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Off
-led_setup_t leds_off[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Red
-led_setup_t leds_red[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Green
-led_setup_t leds_green[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Blue
-led_setup_t leds_blue[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//White
-led_setup_t leds_white[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//White with moving red stripe
-led_setup_t leds_white_with_red_stripe[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE },
- { .hs = 0, .he = 15, .rs = 0, .re = 0, .gs = 0, .ge = 255, .bs = 0, .be = 255, .ef = EF_SCR_R | EF_SUBTRACT },
- { .hs = 15, .he = 30, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 0, .ef = EF_SCR_R | EF_SUBTRACT },
- { .end = 1 },
-};
-
-//Black with moving red stripe
-led_setup_t leds_black_with_red_stripe[] = {
- { .hs = 0, .he = 15, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R },
- { .hs = 15, .he = 30, .rs = 255, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R },
- { .end = 1 },
-};
-
-//Rainbow no scrolling
-led_setup_t leds_rainbow_ns[] = {
- { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER },
- { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER },
- { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER },
- { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER },
- { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER },
- { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER },
- { .end = 1 },
-};
-
-//Rainbow scrolling
-led_setup_t leds_rainbow_s[] = {
- { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .end = 1 },
-};
-
-//Add new LED animations here using one from above as example
-//The last entry must be { .end = 1 }
-//Add the new animation name to the list below following its format
-
-void *led_setups[] = {
- leds_rainbow_s,
- leds_rainbow_ns,
- leds_teal_salmon,
- leds_yellow,
- leds_red,
- leds_green,
- leds_blue,
- leds_white,
- leds_white_with_red_stripe,
- leds_black_with_red_stripe,
- leds_off
-};
-
-const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]);
diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk
index c5539158f58..aa45c68056d 100644
--- a/keyboards/massdrop/ctrl/rules.mk
+++ b/keyboards/massdrop/ctrl/rules.mk
@@ -1,6 +1,6 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
+SRC = matrix.c
+SRC += config_led.c
#For platform and packs
ARM_ATSAM = SAMD51J18A
@@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = custom
diff --git a/keyboards/niu_mini/keymaps/planck/rules.mk b/keyboards/niu_mini/keymaps/planck/rules.mk
index e69de29bb2d..8b137891791 100644
--- a/keyboards/niu_mini/keymaps/planck/rules.mk
+++ b/keyboards/niu_mini/keymaps/planck/rules.mk
@@ -0,0 +1 @@
+
diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk
index b8d0ace97a4..496928ed70c 100644
--- a/keyboards/niu_mini/rules.mk
+++ b/keyboards/niu_mini/rules.mk
@@ -58,7 +58,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = yes # Audio output on port C6
+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.
diff --git a/keyboards/ok60/keymaps/default/keymap.c b/keyboards/ok60/keymaps/default/keymap.c
index 7c5a90856e8..c51510c646e 100644
--- a/keyboards/ok60/keymaps/default/keymap.c
+++ b/keyboards/ok60/keymaps/default/keymap.c
@@ -7,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL
),
[1] = LAYOUT_60_ansi(
diff --git a/keyboards/orthodox/i2c.h b/keyboards/orthodox/i2c.h
deleted file mode 100644
index 2af843ff60a..00000000000
--- a/keyboards/orthodox/i2c.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef I2C_H
-#define I2C_H
-
-#include
-#include "matrix.h"
-
-#ifndef F_CPU
-#define F_CPU 16000000UL
-#endif
-
-#define I2C_READ 1
-#define I2C_WRITE 0
-
-#define I2C_ACK 1
-#define I2C_NACK 0
-
-#define SLAVE_BUFFER_SIZE 0x10
-
-// i2c SCL clock frequency
-#define SCL_CLOCK 100000UL
-
-extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
-
-void i2c_master_init(void);
-uint8_t i2c_master_start(uint8_t address);
-void i2c_master_stop(void);
-uint8_t i2c_master_write(uint8_t data);
-uint8_t i2c_master_read(int);
-void i2c_reset_state(void);
-void i2c_slave_init(uint8_t address);
-
-
-static inline unsigned char i2c_start_read(unsigned char addr) {
- return i2c_master_start((addr << 1) | I2C_READ);
-}
-
-static inline unsigned char i2c_start_write(unsigned char addr) {
- return i2c_master_start((addr << 1) | I2C_WRITE);
-}
-
-// from SSD1306 scrips
-extern unsigned char i2c_rep_start(unsigned char addr);
-extern void i2c_start_wait(unsigned char addr);
-extern unsigned char i2c_readAck(void);
-extern unsigned char i2c_readNak(void);
-extern unsigned char i2c_read(unsigned char ack);
-
-#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
-
-#endif
diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h
index a2eaf63c302..1f04d5298c9 100644
--- a/keyboards/orthodox/keymaps/drashna/config.h
+++ b/keyboards/orthodox/keymaps/drashna/config.h
@@ -23,8 +23,8 @@ along with this program. If not, see .
/* Use I2C or Serial, not both */
-#define USE_SERIAL
-#undef USE_I2C
+// #define USE_SERIAL
+#define USE_I2C
/* Select hand configuration */
@@ -41,6 +41,7 @@ along with this program. If not, see .
#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN D3
#define RGBLED_NUM 16 // Number of LEDs
+#define RGBLED_SPLIT { 8, 8 }
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 12
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c
index 0f23bd9aa0c..b1d40690558 100644
--- a/keyboards/orthodox/keymaps/drashna/keymap.c
+++ b/keyboards/orthodox/keymaps/drashna/keymap.c
@@ -38,7 +38,7 @@ uint8_t last_osm;
) \
LAYOUT_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
- KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, OS_RGUI, K16, K17, K18, K19, K1A, KC_QUOT, \
+ KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF \
)
#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk
index a826c664a7b..fdbfc94c9ba 100644
--- a/keyboards/orthodox/keymaps/drashna/rules.mk
+++ b/keyboards/orthodox/keymaps/drashna/rules.mk
@@ -5,11 +5,13 @@ CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
TAP_DANCE_ENABLE = no
RGBLIGHT_ENABLE = yes
-AUDIO_ENABLE = yes
+AUDIO_ENABLE = no
NKRO_ENABLE = yes
INDICATOR_LIGHTS = yes
MACROS_ENABLED = no
RGBLIGHT_TWINKLE = no
+RGBLIGHT_STARTUP_ANIMATION = yes
+
BOOTLOADER = qmk-dfu
diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h
index 51c52455278..6f8dad60acb 100644
--- a/keyboards/orthodox/orthodox.h
+++ b/keyboards/orthodox/orthodox.h
@@ -1,5 +1,6 @@
-#ifndef ORTHODOX_H
-#define ORTHODOX_H
+#pragma once
+
+#include "quantum.h"
#ifdef KEYBOARD_orthodox_rev1
#include "rev1.h"
@@ -25,7 +26,3 @@
{ KC_##LR18, KC_##LR17, KC_##LR16, KC_##LR15, KC_##LR14, KC_##LR13, KC_##LR12, KC_NO, KC_##LR10 }, \
{ KC_##LR28, KC_##LR27, KC_##LR26, KC_##LR25, KC_##LR24, KC_##LR23, KC_##LR22, KC_##LR21, KC_##LR20 } \
}
-
-#include "quantum.h"
-
-#endif
diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h
index f7497c09c5c..198fff5aca2 100644
--- a/keyboards/orthodox/rev1/config.h
+++ b/keyboards/orthodox/rev1/config.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef REV1_CONFIG_H
-#define REV1_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -49,6 +48,8 @@ along with this program. If not, see .
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define SOFT_SERIAL_PIN D0
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -89,5 +90,3 @@ along with this program. If not, see .
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json
index 0a8442cf4b1..83180aa15e5 100644
--- a/keyboards/orthodox/rev1/info.json
+++ b/keyboards/orthodox/rev1/info.json
@@ -1,8 +1,8 @@
{
"keyboard_name": "Monkeebs Orthodox Rev.1",
"maintainer": "drashna",
- "width": 17,
- "height": 17.24,
+ "width": 19,
+ "height": 5,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h
index e73263fb687..783dfb34b95 100644
--- a/keyboards/orthodox/rev1/rev1.h
+++ b/keyboards/orthodox/rev1/rev1.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef REV1_H
-#define REV1_H
+#pragma once
#include "orthodox.h"
@@ -42,7 +41,3 @@ along with this program. If not, see .
{ R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \
{ R28, R27, R26, R25, R24, R23, R22, R21, R20 } \
}
-
-#endif
-
-
diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h
index d727ae674b4..53e5b15ae82 100644
--- a/keyboards/orthodox/rev3/config.h
+++ b/keyboards/orthodox/rev3/config.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef REV3_CONFIG_H
-#define REV3_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -54,6 +53,8 @@ along with this program. If not, see .
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define SOFT_SERIAL_PIN D0
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -95,5 +96,3 @@ along with this program. If not, see .
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json
index 289169d72b7..c98c9f232d7 100644
--- a/keyboards/orthodox/rev3/info.json
+++ b/keyboards/orthodox/rev3/info.json
@@ -1,8 +1,8 @@
{
"keyboard_name": "Monkeebs Orthodox Rev.3",
"maintainer": "drashna",
- "width": 17,
- "height": 17.24,
+ "width": 19,
+ "height": 5,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h
index 2be9b9605ce..783dfb34b95 100644
--- a/keyboards/orthodox/rev3/rev3.h
+++ b/keyboards/orthodox/rev3/rev3.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef REV3_H
-#define REV3_H
+#pragma once
#include "orthodox.h"
@@ -42,6 +41,3 @@ along with this program. If not, see .
{ R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \
{ R28, R27, R26, R25, R24, R23, R22, R21, R20 } \
}
-
-#endif
-
diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h
index 591827fb973..54cbb823eca 100644
--- a/keyboards/orthodox/rev3_teensy/config.h
+++ b/keyboards/orthodox/rev3_teensy/config.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef REV3_TEENSY_CONFIG_H
-#define REV3_TEENSY_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -46,6 +45,8 @@ along with this program. If not, see .
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define SOFT_SERIAL_PIN D0
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -87,5 +88,3 @@ along with this program. If not, see .
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json
index d578a413408..5781c08f8e2 100644
--- a/keyboards/orthodox/rev3_teensy/info.json
+++ b/keyboards/orthodox/rev3_teensy/info.json
@@ -1,8 +1,8 @@
{
"keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)",
"maintainer": "drashna",
- "width": 17,
- "height": 17.24,
+ "width": 19,
+ "height": 5,
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h
index 0081a0df011..783dfb34b95 100644
--- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h
+++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef REV3_TEENSY_H
-#define REV3_TEENSY_H
+#pragma once
#include "orthodox.h"
@@ -42,6 +41,3 @@ along with this program. If not, see .
{ R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \
{ R28, R27, R26, R25, R24, R23, R22, R21, R20 } \
}
-
-#endif
-
diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk
index 715f25c3a00..61878ea83c3 100644
--- a/keyboards/orthodox/rules.mk
+++ b/keyboards/orthodox/rules.mk
@@ -1,8 +1,3 @@
-SRC += matrix.c \
- i2c.c \
- split_util.c \
- serial.c
-
# MCU name
MCU = atmega32u4
@@ -40,7 +35,7 @@ F_USB = $(F_CPU)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
+# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Interrupt driven control endpoint task(+60)
@@ -61,12 +56,10 @@ 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.
-SUBPROJECT_rev1 = yes
-USE_I2C = yes
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-CUSTOM_MATRIX = yes
+SPLIT_KEYBOARD = yes
DEFAULT_FOLDER = orthodox/rev3
diff --git a/keyboards/orthodox/serial.c b/keyboards/orthodox/serial.c
deleted file mode 100644
index fea57b65101..00000000000
--- a/keyboards/orthodox/serial.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * WARNING: be careful changing this code, it is very timing dependent
- */
-
-#ifndef F_CPU
-#define F_CPU 16000000
-#endif
-
-#include
-#include
-#include
-#include
-#include "serial.h"
-
-#ifndef USE_I2C
-
-// Serial pulse period in microseconds. Its probably a bad idea to lower this
-// value.
-#define SERIAL_DELAY 24
-
-matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
-matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
-
-#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS))
-
-#define SLAVE_DATA_CORRUPT (1<<0)
-volatile uint8_t status = 0;
-
-inline static
-void serial_delay(void) {
- _delay_us(SERIAL_DELAY);
-}
-
-inline static
-void serial_output(void) {
- SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
-}
-
-// make the serial pin an input with pull-up resistor
-inline static
-void serial_input(void) {
- SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-inline static
-matrix_row_t serial_read_pin(void) {
- return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
-}
-
-inline static
-void serial_low(void) {
- SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
-}
-
-inline static
-void serial_high(void) {
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-void serial_master_init(void) {
- serial_output();
- serial_high();
-}
-
-void serial_slave_init(void) {
- serial_input();
-
- // Enable INT0
- EIMSK |= _BV(INT0);
- // Trigger on falling edge of INT0
- EICRA &= ~(_BV(ISC00) | _BV(ISC01));
-}
-
-// Used by the master to synchronize timing with the slave.
-static
-void sync_recv(void) {
- serial_input();
- // This shouldn't hang if the slave disconnects because the
- // serial line will float to high if the slave does disconnect.
- while (!serial_read_pin());
- serial_delay();
-}
-
-// Used by the slave to send a synchronization signal to the master.
-static
-void sync_send(void) {
- serial_output();
-
- serial_low();
- serial_delay();
-
- serial_high();
-}
-
-// Reads a byte from the serial line
-static
-matrix_row_t serial_read_byte(void) {
- matrix_row_t byte = 0;
- serial_input();
- for ( uint8_t i = 0; i < MATRIX_COLS; ++i) {
- byte = (byte << 1) | serial_read_pin();
- serial_delay();
- _delay_us(1);
- }
-
- return byte;
-}
-
-// Sends a byte with MSB ordering
-static
-void serial_write_byte(matrix_row_t data) {
- matrix_row_t b = MATRIX_COLS;
- serial_output();
- while( b-- ) {
- if(data & (1UL << b)) {
- serial_high();
- } else {
- serial_low();
- }
- serial_delay();
- }
-}
-
-// interrupt handle to be used by the slave device
-ISR(SERIAL_PIN_INTERRUPT) {
- sync_send();
-
- matrix_row_t checksum = 0;
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_slave_buffer[i]);
- sync_send();
- checksum += ROW_MASK & serial_slave_buffer[i];
- }
- serial_write_byte(checksum);
- sync_send();
-
- // wait for the sync to finish sending
- serial_delay();
-
- // read the middle of pulses
- _delay_us(SERIAL_DELAY/2);
-
- matrix_row_t checksum_computed = 0;
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_master_buffer[i] = serial_read_byte();
- sync_send();
- checksum_computed += ROW_MASK & serial_master_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_send();
-
- serial_input(); // end transaction
-
- if ( checksum_computed != checksum_received ) {
- status |= SLAVE_DATA_CORRUPT;
- } else {
- status &= ~SLAVE_DATA_CORRUPT;
- }
-}
-
-inline
-bool serial_slave_DATA_CORRUPT(void) {
- return status & SLAVE_DATA_CORRUPT;
-}
-
-// Copies the serial_slave_buffer to the master and sends the
-// serial_master_buffer to the slave.
-//
-// Returns:
-// 0 => no error
-// 1 => slave did not respond
-int serial_update_buffers(void) {
- // this code is very time dependent, so we need to disable interrupts
- cli();
-
- // signal to the slave that we want to start a transaction
- serial_output();
- serial_low();
- _delay_us(1);
-
- // wait for the slaves response
- serial_input();
- serial_high();
- _delay_us(SERIAL_DELAY);
-
- // check if the slave is present
- if (serial_read_pin()) {
- // slave failed to pull the line low, assume not present
- sei();
- return 1;
- }
-
- // if the slave is present syncronize with it
- sync_recv();
-
- matrix_row_t checksum_computed = 0;
- // receive data from the slave
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_slave_buffer[i] = serial_read_byte();
- sync_recv();
- checksum_computed += ROW_MASK & serial_slave_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_recv();
-
- if (checksum_computed != checksum_received) {
- sei();
- return 1;
- }
-
- matrix_row_t checksum = 0;
- // send data to the slave
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_master_buffer[i]);
- sync_recv();
- checksum += ROW_MASK & serial_master_buffer[i];
- }
- serial_write_byte(checksum);
- sync_recv();
-
- // always, release the line when not in use
- serial_output();
- serial_high();
-
- sei();
- return 0;
-}
-
-#endif
diff --git a/keyboards/orthodox/serial.h b/keyboards/orthodox/serial.h
deleted file mode 100644
index a46a98c9472..00000000000
--- a/keyboards/orthodox/serial.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MY_SERIAL_H
-#define MY_SERIAL_H
-
-#include "config.h"
-#include
-#include "matrix.h"
-
-/* TODO: some defines for interrupt setup */
-#define SERIAL_PIN_DDR DDRD
-#define SERIAL_PIN_PORT PORTD
-#define SERIAL_PIN_INPUT PIND
-#define SERIAL_PIN_MASK _BV(PD0)
-#define SERIAL_PIN_INTERRUPT INT0_vect
-
-#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
-#define SERIAL_MASTER_BUFFER_LENGTH 1
-
-// Buffers for master - slave communication
-extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
-extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
-
-void serial_master_init(void);
-void serial_slave_init(void);
-int serial_update_buffers(void);
-bool serial_slave_data_corrupt(void);
-
-#endif
diff --git a/keyboards/orthodox/split_util.h b/keyboards/orthodox/split_util.h
deleted file mode 100644
index a0a8dd3bf43..00000000000
--- a/keyboards/orthodox/split_util.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef SPLIT_KEYBOARD_UTIL_H
-#define SPLIT_KEYBOARD_UTIL_H
-
-#include
-#include "eeconfig.h"
-
-
-#define SLAVE_I2C_ADDRESS 0x32
-
-extern volatile bool isLeftHand;
-
-// slave version of matix scan, defined in matrix.c
-void matrix_slave_scan(void);
-
-void split_keyboard_setup(void);
-bool has_usb(void);
-void keyboard_slave_loop(void);
-
-void matrix_master_OLED_init (void);
-
-#endif
diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h
index 00bdbc60f1b..edb25ad2743 100644
--- a/keyboards/panc60/config.h
+++ b/keyboards/panc60/config.h
@@ -39,5 +39,3 @@ along with this program. If not, see .
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
diff --git a/keyboards/panc60/i2c.c b/keyboards/panc60/i2c.c
deleted file mode 100644
index e8c4455ad1b..00000000000
--- a/keyboards/panc60/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-// Please do not modify this file
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/panc60/matrix.c b/keyboards/panc60/matrix.c
deleted file mode 100644
index cf0f63837b9..00000000000
--- a/keyboards/panc60/matrix.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-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 .
-*/
-
-#include
-#include
-#include
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) { }
-
-__attribute__ ((weak))
-void matrix_scan_user(void) { }
-
-// #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 }
-// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_init(void) {
-
- // disables JTAG so we can use them as columns
- MCUCSR = (1<
#include "action_layer.h"
-#include "i2c.h"
+#include "i2c_master.h"
#include "quantum.h"
__attribute__ ((weak))
@@ -44,7 +44,7 @@ void rgblight_set(void) {
}
i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif
diff --git a/keyboards/panc60/panc60.h b/keyboards/panc60/panc60.h
index 95dcb1f90be..ee4569c615c 100644
--- a/keyboards/panc60/panc60.h
+++ b/keyboards/panc60/panc60.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef PANC60_H
-#define PANC60_H
+#pragma once
#include "quantum.h"
@@ -67,5 +66,3 @@
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, KC_NO, KC_NO } \
}
-
-#endif
diff --git a/keyboards/panc60/readme.md b/keyboards/panc60/readme.md
index 05ac3d72bee..3312a07ce73 100644
--- a/keyboards/panc60/readme.md
+++ b/keyboards/panc60/readme.md
@@ -14,6 +14,8 @@ Make example for this keyboard (after setting up your build environment):
Flashing
+**Reset Key:** Hold down the key located at `K40`, commonly programmed as left control while plugging in the keyboard.
+
ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
To put the panc60 into reset, hold left control while plugging in.
@@ -36,9 +38,9 @@ macOS:
```
3. Install the following packages:
```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk
index 588562a95b4..5531807f185 100644
--- a/keyboards/panc60/rules.mk
+++ b/keyboards/panc60/rules.mk
@@ -31,7 +31,7 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = yes
+BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
@@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/panc60/usbconfig.h b/keyboards/panc60/usbconfig.h
index d2d848fcdc8..54a7d20f142 100644
--- a/keyboards/panc60/usbconfig.h
+++ b/keyboards/panc60/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
new file mode 100644
index 00000000000..c449d171926
--- /dev/null
+++ b/keyboards/planck/ez/config.h
@@ -0,0 +1,141 @@
+/*
+ * 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 .
+ */
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define DEVICE_VER 0x0000
+
+#undef MATRIX_ROWS
+#undef MATRIX_COLS
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+
+/*
+ * 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)
+ *
+*/
+
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+
+#define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 }
+#define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 }
+
+#define NUMBER_OF_ENCODERS 1
+#define ENCODERS_PAD_A { B12 }
+#define ENCODERS_PAD_B { B13 }
+
+#define MUSIC_MAP
+#undef AUDIO_VOICES
+#undef C6_AUDIO
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 6
+
+/* 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
+
+/*
+ * 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
+
+// #define WS2812_LED_N 2
+// #define RGBLED_NUM WS2812_LED_N
+// #define WS2812_TIM_N 2
+// #define WS2812_TIM_CH 2
+// #define PORT_WS2812 GPIOA
+// #define PIN_WS2812 1
+// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
+//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
+//#define WS2812_EXTERNAL_PULLUP
+
+#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
+
+#define DRIVER_COUNT 1
+#define DRIVER_1_LED_TOTAL 47
+#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+
+#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
new file mode 100644
index 00000000000..b859af6c15b
--- /dev/null
+++ b/keyboards/planck/ez/ez.c
@@ -0,0 +1,175 @@
+/* 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 .
+ */
+#include "ez.h"
+
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, A_12, B_12, C_12},
+ {0, A_11, B_11, C_11},
+ {0, A_10, B_10, C_10},
+ {0, A_9, B_9, C_9},
+ {0, A_8, B_8, C_8},
+ {0, A_7, B_7, C_7},
+
+ {0, G_12, H_12, I_12},
+ {0, G_11, H_11, I_11},
+ {0, G_10, H_10, I_10},
+ {0, G_9, H_9, I_9},
+ {0, G_8, H_8, I_8},
+ {0, G_7, H_7, I_7},
+
+ {0, A_6, B_6, C_6},
+ {0, A_5, B_5, C_5},
+ {0, A_4, B_4, C_4},
+ {0, A_3, B_3, C_3},
+ {0, A_2, B_2, C_2},
+ {0, A_1, B_1, C_1},
+
+ {0, G_6, H_6, I_6},
+ {0, G_5, H_5, I_5},
+ {0, G_4, H_4, I_4},
+ {0, G_3, H_3, I_3},
+ {0, G_2, H_2, I_2},
+ {0, G_1, H_1, I_1},
+
+ {0, D_12, E_12, F_12},
+ {0, D_11, E_11, F_11},
+ {0, D_10, E_10, F_10},
+ {0, D_9, E_9, F_9},
+ {0, D_8, E_8, F_8},
+ {0, D_7, E_7, F_7},
+
+ {0, J_12, K_12, L_12},
+ {0, J_11, K_11, L_11},
+ {0, J_10, K_10, L_10},
+ {0, J_9, K_9, L_9},
+ {0, J_8, K_8, L_8},
+ {0, J_7, K_7, L_7},
+
+ {0, D_6, E_6, F_6},
+ {0, D_5, E_5, F_5},
+ {0, D_4, E_4, F_4},
+ {0, D_3, E_3, F_3},
+ {0, D_2, E_2, F_2},
+ {0, D_1, E_1, F_1},
+
+ {0, J_6, K_6, L_6},
+ {0, J_5, K_5, L_5},
+ {0, J_4, K_4, L_4},
+ {0, J_3, K_3, L_3},
+ {0, J_2, K_2, L_2},
+
+};
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+
+ /*{row | col << 4}
+ | {x=0..224, y=0..64}
+ | | modifier
+ | | | */
+ {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
+ {{0|(1<<4)}, {20.36*1, 21.33*0}, 0},
+ {{0|(2<<4)}, {20.36*2, 21.33*0}, 0},
+ {{0|(3<<4)}, {20.36*3, 21.33*0}, 0},
+ {{0|(4<<4)}, {20.36*4, 21.33*0}, 0},
+ {{0|(5<<4)}, {20.36*5, 21.33*0}, 0},
+ {{4|(0<<4)}, {20.36*6, 21.33*0}, 0},
+ {{4|(1<<4)}, {20.36*7, 21.33*0}, 0},
+ {{4|(2<<4)}, {20.36*8, 21.33*0}, 0},
+ {{4|(3<<4)}, {20.36*9, 21.33*0}, 0},
+ {{4|(4<<4)}, {20.36*10,21.33*0}, 0},
+ {{4|(5<<4)}, {20.36*11,21.33*0}, 1},
+
+ {{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
+ {{1|(1<<4)}, {20.36*1, 21.33*1}, 0},
+ {{1|(2<<4)}, {20.36*2, 21.33*1}, 0},
+ {{1|(3<<4)}, {20.36*3, 21.33*1}, 0},
+ {{1|(4<<4)}, {20.36*4, 21.33*1}, 0},
+ {{1|(5<<4)}, {20.36*5, 21.33*1}, 0},
+ {{5|(0<<4)}, {20.36*6, 21.33*1}, 0},
+ {{5|(1<<4)}, {20.36*7, 21.33*1}, 0},
+ {{5|(2<<4)}, {20.36*8, 21.33*1}, 0},
+ {{5|(3<<4)}, {20.36*9, 21.33*1}, 0},
+ {{5|(4<<4)}, {20.36*10,21.33*1}, 0},
+ {{5|(5<<4)}, {20.36*11,21.33*1}, 1},
+
+ {{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
+ {{2|(1<<4)}, {20.36*1, 21.33*2}, 0},
+ {{2|(2<<4)}, {20.36*2, 21.33*2}, 0},
+ {{2|(3<<4)}, {20.36*3, 21.33*2}, 0},
+ {{2|(4<<4)}, {20.36*4, 21.33*2}, 0},
+ {{2|(5<<4)}, {20.36*5, 21.33*2}, 0},
+ {{6|(0<<4)}, {20.36*6, 21.33*2}, 0},
+ {{6|(1<<4)}, {20.36*7, 21.33*2}, 0},
+ {{6|(2<<4)}, {20.36*8, 21.33*2}, 0},
+ {{6|(3<<4)}, {20.36*9, 21.33*2}, 0},
+ {{6|(4<<4)}, {20.36*10,21.33*2}, 0},
+ {{6|(5<<4)}, {20.36*11,21.33*2}, 1},
+
+ {{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
+ {{3|(1<<4)}, {20.36*1, 21.33*3}, 1},
+ {{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
+ {{7|(3<<4)}, {20.36*3, 21.33*3}, 1},
+ {{7|(4<<4)}, {20.36*4, 21.33*3}, 1},
+ {{7|(5<<4)}, {20.36*5.5,21.33*3}, 0},
+ {{7|(0<<4)}, {20.36*7, 21.33*3}, 1},
+ {{7|(1<<4)}, {20.36*8, 21.33*3}, 1},
+ {{7|(2<<4)}, {20.36*9, 21.33*3}, 1},
+ {{3|(3<<4)}, {20.36*10,21.33*3}, 1},
+ {{3|(4<<4)}, {20.36*11,21.33*3}, 1}
+};
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+
+ palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL);
+
+ palClearPad(GPIOB, 8);
+ palClearPad(GPIOB, 9);
+}
+
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+uint32_t layer_state_set_kb(uint32_t state) {
+
+ palClearPad(GPIOB, 8);
+ palClearPad(GPIOB, 9);
+ state = layer_state_set_user(state);
+ uint8_t layer = biton32(state);
+ switch (layer) {
+ case 3:
+ palSetPad(GPIOB, 9);
+ break;
+ case 4:
+ palSetPad(GPIOB, 8);
+ break;
+ case 6:
+ palSetPad(GPIOB, 9);
+ palSetPad(GPIOB, 8);
+ break;
+ default:
+ break;
+ }
+ return state;
+}
diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h
new file mode 100644
index 00000000000..a3ca2b6eceb
--- /dev/null
+++ b/keyboards/planck/ez/ez.h
@@ -0,0 +1,107 @@
+/* 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 .
+ */
+#pragma once
+
+#include "planck.h"
+
+#define LAYOUT_planck_1x2uC( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, k35 } \
+}
+
+#define LAYOUT_planck_1x2uR( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, k35 } \
+}
+
+#define LAYOUT_planck_1x2uL( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, k35 } \
+}
+
+#define LAYOUT_planck_2x2u( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, k3b }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, k35 } \
+}
+
+#define LAYOUT_planck_grid( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, KC_NO, k36, k37, k38, k39, k3a \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05 }, \
+ { k10, k11, k12, k13, k14, k15 }, \
+ { k20, k21, k22, k23, k24, k25 }, \
+ { k30, k31, k32, k39, k3a, KC_NO }, \
+ { k06, k07, k08, k09, k0a, k0b }, \
+ { k16, k17, k18, k19, k1a, k1b }, \
+ { k26, k27, k28, k29, k2a, k2b }, \
+ { k36, k37, k38, k33, k34, k35 } \
+}
+
+#define KEYMAP LAYOUT_planck_grid
+#define LAYOUT_ortho_4x12 LAYOUT_planck_grid
+#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk
new file mode 100644
index 00000000000..c6fb52d2b5b
--- /dev/null
+++ b/keyboards/planck/ez/rules.mk
@@ -0,0 +1,24 @@
+# project specific files
+LAYOUTS += ortho_4x12
+
+# Cortex version
+MCU = STM32F303
+
+# 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 = no # Custom matrix file
+AUDIO_ENABLE = yes
+RGBLIGHT_ENABLE = no
+# SERIAL_LINK_ENABLE = yes
+ENCODER_ENABLE = yes
+RGB_MATRIX_ENABLE = IS31FL3737
diff --git a/keyboards/planck/keymaps/oeywil/.gitignore b/keyboards/planck/keymaps/oeywil/.gitignore
index a7fbec47477..03b2b466681 100644
--- a/keyboards/planck/keymaps/oeywil/.gitignore
+++ b/keyboards/planck/keymaps/oeywil/.gitignore
@@ -1 +1 @@
-secret.h
+secrets.h
diff --git a/keyboards/planck/keymaps/oeywil/config.h b/keyboards/planck/keymaps/oeywil/config.h
index 215ea9f75c9..09b22e193e8 100644
--- a/keyboards/planck/keymaps/oeywil/config.h
+++ b/keyboards/planck/keymaps/oeywil/config.h
@@ -1,7 +1,4 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
@@ -32,7 +29,9 @@
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
-// Most tactile encoders have detents every 4 stages
-#define ENCODER_RESOLUTION 4
+// Leader Key
+#define LEADER_TIMEOUT 250
+#define LEADER_PER_KEY_TIMING
-#endif
+// Tap dance
+#define TAPPING_TERM 200
diff --git a/keyboards/planck/keymaps/oeywil/keymap.c b/keyboards/planck/keymaps/oeywil/keymap.c
index f718c8f6a7b..59e76cab12b 100644
--- a/keyboards/planck/keymaps/oeywil/keymap.c
+++ b/keyboards/planck/keymaps/oeywil/keymap.c
@@ -1,112 +1,139 @@
#include QMK_KEYBOARD_H
-#include "secret.h"
+#include "no_keycodes.h"
+#if __has_include("secrets.h")
+# include "secrets.h"
+#else
+# define mail_str ""
+# define pwd_str ""
+#endif
+
+// layer definitions
enum planck_layers {
_DEFAULT,
_LOWER,
_RAISE,
- _FUNCTION,
_GAME,
- _GAMERAISE
+ _GLOW
};
-#define LOWER MO(_LOWER)
-#define RAISE MO(_RAISE)
-#define FUNCTION MO(_FUNCTION)
-#define GAMER MO(_GAMERAISE)
+// sounds
+#ifdef AUDIO_ENABLE
+ float gamesong[][2] = SONG(MARIO_MUSHROOM);
+ float defsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
+ float failed[][2] = SONG(TERMINAL_SOUND);
+#endif
-#define NO_OE KC_SCLN
-#define NO_AE KC_QUOT
-#define NO_AA KC_LBRC
-#define NO_EXCL LSFT(KC_1)
-#define NO_QEST LSFT(KC_MINS)
-#define NO_APOS KC_BSLS
-#define NO_QUOT LSFT(KC_2)
-#define NO_UMLA KC_RBRC
-#define NO_HASH LSFT(KC_3)
-#define NO_FSLS LSFT(KC_7)
-#define NO_LPAR LSFT(KC_8)
-#define NO_RPAR LSFT(KC_9)
-#define NO_ALFA ALGR(KC_2)
-#define NO_AMPE LSFT(KC_6)
-#define NO_USDO ALGR(KC_4)
-#define NO_PERC LSFT(KC_5)
-#define NO_BSLS KC_EQL
-#define NO_ASTE LSFT(KC_BSLS)
-#define NO_LBRA ALGR(KC_7)
-#define NO_RBRA ALGR(KC_0)
-#define NO_LBRC ALGR(KC_8)
-#define NO_RBRC ALGR(KC_9)
-#define NO_ANBR KC_NUBS
-#define NO_DASH KC_SLSH
-#define NO_PLUS KC_MINS
-#define NO_EQUA LSFT(KC_0)
+// leader key
+bool leader_succeed;
+bool leader_layer_game;
+bool leader_layer_def;
+LEADER_EXTERNS();
-#define TSKMGR LCTL(LSFT(KC_ESC))
-#define STEAM LSFT(KC_F7)
-#define WKILL LALT(KC_F4)
-#define BWORD LCTL(KC_LEFT)
-#define FWORD LCTL(KC_RIGHT)
+void matrix_scan_user(void) {
+ LEADER_DICTIONARY() {
+ leader_succeed = leading = false;
+ leader_layer_game = false;
+ leader_layer_def = false;
-float onsong[][2] = SONG(MARIO_MUSHROOM);
-float offsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
-
-enum custom_keycodes {
- PWD = SAFE_RANGE,
- MAIL,
- GAMEON,
- GAMEOFF
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case PWD:
- if (record->event.pressed) {
- SEND_STRING(pwd_str);
- }
- break;
- case MAIL:
- if (record->event.pressed) {
- SEND_STRING(mail_str);
- }
- break;
- case GAMEON:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- PLAY_SONG(onsong);
- #endif
- layer_on(_GAME);
- }
- break;
- case GAMEOFF:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- PLAY_SONG(offsong);
- #endif
- layer_off(_GAME);
- }
- break;
+ SEQ_TWO_KEYS(KC_P, KC_P) {
+ SEND_STRING(pwd_str);
+ leader_succeed = true;
+ }
+ SEQ_TWO_KEYS(KC_P, KC_M) {
+ SEND_STRING(mail_str);
+ leader_succeed = true;
+ }
+ SEQ_TWO_KEYS(KC_B, KC_B) {
+ SEND_STRING("build"SS_TAP(X_ENTER));
+ leader_succeed = true;
+ }
+ SEQ_TWO_KEYS(KC_B, KC_F) {
+ SEND_STRING("flash"SS_TAP(X_ENTER));
+ reset_keyboard();
+ leader_succeed = true;
+ }
+ SEQ_TWO_KEYS(KC_L, KC_G) {
+ layer_on(_GAME);
+ leader_layer_game = true;
+ }
+ SEQ_TWO_KEYS(KC_L, KC_D) {
+ layer_off(_GAME);
+ leader_layer_def = true;
+ }
+ leader_end();
}
- return true;
+}
+
+void leader_end(void) {
+ if (leader_succeed) {
+ // do nothing
+ } else if (leader_layer_game) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(gamesong);
+ #endif
+ } else if (leader_layer_def) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(defsong);
+ #endif
+ } else {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(failed);
+ #endif
+ }
+}
+
+// tap dance definitions
+typedef struct {
+ bool is_press_action;
+ int state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD = 2,
+ DOUBLE_TAP = 3,
+ DOUBLE_HOLD = 4,
+ DOUBLE_SINGLE_TAP = 5,
+ TRIPLE_TAP = 6,
+ TRIPLE_HOLD = 7
};
+enum {
+ TD_LSFT = 0,
+ TD_LCTL,
+ TD_RSFT,
+ TD_RCTL
+};
+
+int cur_dance (qk_tap_dance_state_t *state);
+void lsft_finished (qk_tap_dance_state_t *state, void *user_data);
+void lsft_reset (qk_tap_dance_state_t *state, void *user_data);
+void rsft_finished (qk_tap_dance_state_t *state, void *user_data);
+void rsft_reset (qk_tap_dance_state_t *state, void *user_data);
+void lctl_finished (qk_tap_dance_state_t *state, void *user_data);
+void lctl_reset (qk_tap_dance_state_t *state, void *user_data);
+void rctl_finished (qk_tap_dance_state_t *state, void *user_data);
+void rctl_reset (qk_tap_dance_state_t *state, void *user_data);
+
+// layer declarations
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default
* ,-----------------------------------------------------------------------------------.
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp |
+ * | Tab | Q | W | E | R | T | Y | U | I | O | Å | BkSp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | N | M | , | . | Å | Shift|
+ * | Shift| Z | X | C | V | B | N | M | P | , | . | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | Win | Alt | Lower| Space | Enter | Raise| AltGr| Game | Fn |
+ * | Ctrl | Lead | Win | Alt | Lower| Space| Enter| Raise| AltGr| App | Lead | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
[_DEFAULT] = LAYOUT_planck_grid(
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_GESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_AA, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_NO, KC_SPC, KC_NO, KC_ENT, RAISE, KC_RALT, GAMEON, FUNCTION
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, NO_AA, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE,
+ TD(TD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, TD(TD_RSFT),
+ TD(TD_LCTL), KC_LEAD, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_ALGR, KC_APP, KC_LEAD, TD(TD_RCTL)
),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -116,81 +143,250 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | Win | Alt | Lower| Space | Enter | | | | |
+ * | Ctrl | | Win | Alt | Lower| M_PP |M_Next| | | Mute | VolD | VolUp|
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_planck_grid(
- KC_TRNS, BWORD, KC_UP, FWORD, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL,
- KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO,
- KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
+ KC_TRNS, LCTL(KC_LEFT), KC_UP, LCTL(KC_RIGHT), KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL,
+ KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO,
+ KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS,
+ KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU
),
/* Raise
* ,-----------------------------------------------------------------------------------.
- * | Tab | ! | ? | ' | " | ¨ | | / | 7 | 8 | 9 | Ins |
+ * | Tab | ! | ? | # | * | | | = | / | 7 | 8 | 9 | Ins |
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * | BkSp | @ | & | # | $ | % | <> | \ | 4 | 5 | 6 | * |
+ * | BkSp | @ | & | $ | % | ~ | + | \ | 4 | 5 | 6 | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Shift| ( | ) | { | } | [ | ] | 0 | 1 | 2 | 3 | Shift|
+ * | Shift| ' | " | ¨ | | | - | 0 | 1 | 2 | 3 | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | Win | Alt | | Space | Enter | Raise| - | + | = |
+ * | Ctrl | | Win | Alt | | Space| Enter| Raise| AltGr| | | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_planck_grid(
- KC_TRNS, NO_EXCL, NO_QEST, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, NO_FSLS, KC_7, KC_8, KC_9, KC_INS,
- KC_BSPC, NO_ALFA, NO_AMPE, NO_HASH, NO_USDO, NO_PERC, NO_ANBR, NO_BSLS, KC_4, KC_5, KC_6, NO_ASTE,
- KC_TRNS, NO_LPAR, NO_RPAR, NO_LBRA, NO_RBRA, NO_LBRC, NO_RBRC, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, NO_DASH, NO_PLUS, NO_EQUA
- ),
- /* Function
- * ,-----------------------------------------------------------------------------------.
- * | | | | | |TskMgr| | | | | Pwd | Vol+ |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Reset| | | | | | | | Wkill| | | Vol- |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | Mail | | | | VolM |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | Play/Pause | Next | | | | |
- * `-----------------------------------------------------------------------------------'
- */
- [_FUNCTION] = LAYOUT_planck_grid(
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TSKMGR, KC_NO, KC_NO, KC_NO, KC_NO, PWD, KC_VOLU,
- RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, WKILL, KC_NO, KC_NO, KC_VOLD,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MAIL, KC_NO, KC_NO, KC_NO, KC_MUTE,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, KC_NO, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO
+ KC_TRNS, NO_EXCL, NO_QEST, NO_HASH, NO_ASTE, NO_PIPE, NO_EQUA, NO_FSLS, KC_7, KC_8, KC_9, KC_INS,
+ KC_BSPC, NO_ALFA, NO_AMPE, NO_USDO, NO_PERC, NO_TILD, NO_PLUS, NO_BSLS, KC_4, KC_5, KC_6, KC_NO,
+ KC_TRNS, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, KC_NO, NO_DASH, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
+ KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO
),
/* Game
* ,-----------------------------------------------------------------------------------.
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp |
+ * | Tab | Q | W | E | R | T | Y | U | I | O | | BkSp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | N | M | | | | |
+ * | Shift| Z | X | C | V | B | N | M | P | , | . | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | | Alt | Raise| Space | Enter | | | | |
+ * | Ctrl | Lead | | Alt | Lower| Space| Enter| Lower| | | Lead | |
* `-----------------------------------------------------------------------------------'
*/
[_GAME] = LAYOUT_planck_grid(
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_LCTL, KC_NO, KC_LALT, GAMER, KC_NO, KC_SPC, KC_NO, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_NO, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, KC_NO,
+ KC_LCTL, KC_LEAD, KC_NO, KC_LALT, MO(_GLOW), KC_SPC, KC_ENT, MO(_GLOW), KC_NO, KC_NO, KC_LEAD, KC_NO
),
- /* Game raise
+ /* Game lower
* ,-----------------------------------------------------------------------------------.
- * | Tab | 1 | 2 | 3 | 4 | 5 | | | | | | Vol+ |
+ * | Tab | 1 | 2 | 3 | | | | | | | | Steam|
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc | F1 | F2 | F3 | F4 | F5 | | | | | | Vol- |
+ * | Esc | 4 | 5 | 6 | | | | | | | | F12 |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Shift| | | | | | | | | | | VolM |
+ * | Shift| 7 | 8 | 9 | 0 | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | | Alt | | Space | Enter | | | Def | Steam|
+ * | Ctrl | | | Alt | | PlyPa| Next | | | Mute | VolD | VolUp|
* `-----------------------------------------------------------------------------------'
*/
- [_GAMERAISE] = LAYOUT_planck_grid(
- KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU,
- KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD,
- KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE,
- KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, GAMEOFF, STEAM
+ [_GLOW] = LAYOUT_planck_grid(
+ KC_TRNS, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_F7),
+ KC_TRNS, KC_4, KC_5, KC_6, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12,
+ KC_TRNS, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU
)
};
+
+// tap dance declarations
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ else return SINGLE_HOLD;
+ }
+ else if (state->count == 2) {
+ if (state->interrupted) return DOUBLE_SINGLE_TAP;
+ else if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+ if (state->count == 3) {
+ if (state->interrupted || !state->pressed) return TRIPLE_TAP;
+ else return TRIPLE_HOLD;
+ }
+ else return 8;
+}
+
+static tap xtap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+void lsft_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ register_code16(LSFT(KC_8));
+ break;
+ case SINGLE_HOLD:
+ register_code(KC_LSFT);
+ break;
+ case DOUBLE_TAP:
+ register_code(KC_NUBS);
+ break;
+ case DOUBLE_SINGLE_TAP:
+ register_code(KC_NUBS);
+ break;
+ }
+}
+
+void lsft_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ unregister_code16(LSFT(KC_8));
+ break;
+ case SINGLE_HOLD:
+ unregister_code(KC_LSFT);
+ break;
+ case DOUBLE_TAP:
+ unregister_code(KC_NUBS);
+ break;
+ case DOUBLE_SINGLE_TAP:
+ unregister_code(KC_NUBS);
+ break;
+ }
+ xtap_state.state = 0;
+}
+
+void rsft_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ register_code16(LSFT(KC_9));
+ break;
+ case SINGLE_HOLD:
+ register_code(KC_RSFT);
+ break;
+ case DOUBLE_TAP:
+ register_code16(LSFT(KC_NUBS));
+ break;
+ case DOUBLE_SINGLE_TAP:
+ register_code16(LSFT(KC_NUBS));
+ break;
+ }
+}
+
+void rsft_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ unregister_code16(LSFT(KC_9));
+ break;
+ case SINGLE_HOLD:
+ unregister_code(KC_RSFT);
+ break;
+ case DOUBLE_TAP:
+ unregister_code16(LSFT(KC_NUBS));
+ break;
+ case DOUBLE_SINGLE_TAP:
+ unregister_code16(LSFT(KC_NUBS));
+ break;
+ }
+ xtap_state.state = 0;
+}
+
+void lctl_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ register_mods(MOD_BIT(KC_ALGR));
+ register_code(KC_7);
+ break;
+ case SINGLE_HOLD:
+ register_code(KC_LCTL);
+ break;
+ case DOUBLE_TAP:
+ register_mods(MOD_BIT(KC_ALGR));
+ register_code(KC_8);
+ break;
+ case DOUBLE_SINGLE_TAP:
+ register_mods(MOD_BIT(KC_ALGR));
+ register_code(KC_8);
+break;
+ }
+}
+
+void lctl_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ unregister_code(KC_7);
+ unregister_mods(MOD_BIT(KC_ALGR));
+ break;
+ case SINGLE_HOLD:
+ unregister_code(KC_LCTL);
+ break;
+ case DOUBLE_TAP:
+ unregister_code(KC_8);
+ unregister_mods(MOD_BIT(KC_ALGR));
+ break;
+ case DOUBLE_SINGLE_TAP:
+ unregister_code(KC_8);
+ unregister_mods(MOD_BIT(KC_ALGR));
+break;
+ }
+ xtap_state.state = 0;
+}
+
+void rctl_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ register_mods(MOD_BIT(KC_ALGR));
+ register_code(KC_0);
+ break;
+ case SINGLE_HOLD:
+ register_code(KC_RCTL);
+ break;
+ case DOUBLE_TAP:
+ register_mods(MOD_BIT(KC_ALGR));
+ register_code(KC_9);
+ break;
+ case DOUBLE_SINGLE_TAP:
+ register_mods(MOD_BIT(KC_ALGR));
+ register_code(KC_9);
+ break;
+ }
+}
+
+void rctl_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP:
+ unregister_code(KC_0);
+ unregister_mods(MOD_BIT(KC_ALGR));
+ break;
+ case SINGLE_HOLD:
+ unregister_code(KC_RCTL);
+ break;
+ case DOUBLE_TAP:
+ unregister_code(KC_9);
+ unregister_mods(MOD_BIT(KC_ALGR));
+ break;
+ case DOUBLE_SINGLE_TAP:
+ unregister_code(KC_9);
+ unregister_mods(MOD_BIT(KC_ALGR));
+ break;
+ }
+ xtap_state.state = 0;
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_LSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lsft_finished, lsft_reset),
+ [TD_RSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rsft_finished, rsft_reset),
+ [TD_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lctl_finished, lctl_reset),
+ [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rctl_finished, rctl_reset),
+};
diff --git a/keyboards/planck/keymaps/oeywil/no_keycodes.h b/keyboards/planck/keymaps/oeywil/no_keycodes.h
new file mode 100644
index 00000000000..c412c35d81b
--- /dev/null
+++ b/keyboards/planck/keymaps/oeywil/no_keycodes.h
@@ -0,0 +1,28 @@
+// øæå
+#define NO_OE KC_SCLN
+#define NO_AE KC_QUOT
+#define NO_AA KC_LBRC
+// rename
+#define NO_ANBR KC_NUBS
+#define NO_APOS KC_BSLS
+#define NO_BSLS KC_EQL
+#define NO_DASH KC_SLSH
+#define NO_PLUS KC_MINS
+#define NO_UMLA KC_RBRC
+#define NO_PIPE KC_GRV
+// shifted
+#define NO_EXCL LSFT(KC_1)
+#define NO_QUOT LSFT(KC_2)
+#define NO_HASH LSFT(KC_3)
+#define NO_PERC LSFT(KC_5)
+#define NO_AMPE LSFT(KC_6)
+#define NO_FSLS LSFT(KC_7)
+#define NO_LPAR LSFT(KC_8)
+#define NO_RPAR LSFT(KC_9)
+#define NO_EQUA LSFT(KC_0)
+#define NO_QEST LSFT(KC_MINS)
+#define NO_ASTE LSFT(KC_BSLS)
+// altgr
+#define NO_ALFA ALGR(KC_2)
+#define NO_USDO ALGR(KC_4)
+#define NO_TILD ALGR(KC_RBRC)
diff --git a/keyboards/planck/keymaps/oeywil/readme.md b/keyboards/planck/keymaps/oeywil/readme.md
index e9e061be3a8..364f9422c71 100644
--- a/keyboards/planck/keymaps/oeywil/readme.md
+++ b/keyboards/planck/keymaps/oeywil/readme.md
@@ -1,9 +1,4 @@
About
------
-A simple Norwegian Layout.
-
-Layout
--------
-
-
+A simple Norwegian grid layout using Leader Key, Tap Dance and audio.
diff --git a/keyboards/planck/keymaps/oeywil/rules.mk b/keyboards/planck/keymaps/oeywil/rules.mk
index a0373a4d4e5..23b2611735b 100644
--- a/keyboards/planck/keymaps/oeywil/rules.mk
+++ b/keyboards/planck/keymaps/oeywil/rules.mk
@@ -1,9 +1,11 @@
SRC += muse.c
# Build Options
-AUDIO_ENABLE = yes
-CONSOLE_ENABLE = no
-EXTRAKEY_ENABLE = yes
-NKRO_ENABLE = yes
-
-DEFAULT_FOLDER = planck/rev6
+NKRO_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+LEADER_ENABLE = yes
+TAP_DANCE_ENABLE = yes
+AUDIO_ENABLE = yes
+COMMAND_ENABLE = no
+CONSOLE_ENABLE = no
+MOUSEKEY_ENABLE = no
diff --git a/keyboards/planck/keymaps/roguepullrequest/config.h b/keyboards/planck/keymaps/roguepullrequest/config.h
new file mode 100644
index 00000000000..13d3a6370f7
--- /dev/null
+++ b/keyboards/planck/keymaps/roguepullrequest/config.h
@@ -0,0 +1,8 @@
+#pragma once
+
+
+
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(RICK_ROLL)
+#endif
diff --git a/keyboards/planck/keymaps/roguepullrequest/keymap.c b/keyboards/planck/keymaps/roguepullrequest/keymap.c
new file mode 100644
index 00000000000..51c740dc4bc
--- /dev/null
+++ b/keyboards/planck/keymaps/roguepullrequest/keymap.c
@@ -0,0 +1,250 @@
+#include QMK_KEYBOARD_H
+
+#ifdef AUDIO_ENABLE
+ float mushroom[][2] = SONG(MARIO_MUSHROOM);
+#endif
+
+extern keymap_config_t keymap_config;
+
+// Complex Tapdance hoopla
+typedef struct {
+ bool is_press_action;
+ int state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD = 2,
+ DOUBLE_TAP = 3,
+ DOUBLE_HOLD = 4,
+ TRIPLE_TAP = 5,
+ TRIPLE_HOLD = 6,
+};
+
+// Tap dance enums
+enum {
+ X_AT_FUN = 0,
+ RSHIFT,
+ LSHIFT,
+ TD_S
+};
+
+int cur_dance (qk_tap_dance_state_t *state);
+
+void x_finished (qk_tap_dance_state_t *state, void *user_data);
+void x_reset (qk_tap_dance_state_t *state, void *user_data);
+void lshift_finished (qk_tap_dance_state_t *state, void *user_data);
+void lshift_reset(qk_tap_dance_state_t *state, void *user_data);
+
+
+bool is_alt_tab_active = false;
+uint16_t alt_tab_timer = 0;
+
+// Modified Programmer Dvorak enums
+
+enum planck_layers {
+ _PDVORAK,
+ _UPPER,
+ _LOWER,
+ _FUNCTION,
+};
+
+enum custom_keycodes {
+ PDVK = SAFE_RANGE,
+ KC_LAST,
+ ALT_TAB
+};
+
+// For getting the last arg in shell line (SUPER THANKS to Drashna over on Discord)
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint16_t macro_timer;
+
+ switch (keycode) {
+ case ALT_TAB:
+ if (record->event.pressed) {
+ if (!is_alt_tab_active) {
+ is_alt_tab_active = true;
+ register_code(KC_LALT);
+ }
+ alt_tab_timer = timer_read();
+ register_code(KC_TAB);
+ } else {
+ unregister_code(KC_TAB);
+ }
+ break;
+ }
+
+ switch (keycode){
+ case KC_LAST:
+ if(record->event.pressed){
+ macro_timer = timer_read();
+ register_mods(MOD_BIT(KC_LCTRL));
+ } else {
+ unregister_mods(MOD_BIT(KC_LCTRL));
+ if (timer_elapsed(macro_timer) < 150) {
+ SEND_STRING("!$");
+ }
+ }
+ return false;
+ }
+ return true;
+}
+
+void matrix_scan_user(void) {
+ if (is_alt_tab_active) {
+ if (timer_elapsed(alt_tab_timer) > 1000) {
+ unregister_code16(KC_LALT);
+ is_alt_tab_active = false;
+ }
+ }
+}
+
+#define PDVORAK MO(_PDVORAK)
+#define LOWER MO(_LOWER)
+#define UPPER MO(_UPPER)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+ /* Programmer Dvorak */
+ [_PDVORAK] = LAYOUT_planck_grid(
+ KC_GESC, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_LAST, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, TD(TD_S), KC_SLASH,
+ TD(LSHIFT), KC_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(RSHIFT),
+ TD(X_AT_FUN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ALT_TAB, KC_SPACE, KC_ENTER, MT(MOD_LCTL | MOD_LSFT, KC_LGUI), KC_PGUP, KC_PGDN, LT(_LOWER, KC_PLUS)
+ ),
+
+ [_UPPER] = LAYOUT_planck_grid(
+ KC_GRAVE, KC_AMPR, KC_PERC, KC_NO, KC_NO, KC_EQL, KC_ASTR, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_TRNS,
+ KC_PLUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
+ ),
+
+ [_LOWER] = LAYOUT_planck_grid(
+ KC_DLR, KC_7, KC_5, KC_3, KC_1, KC_9, KC_0, KC_2, KC_4, KC_6, KC_8, KC_TRNS,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, CK_DOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
+ ),
+
+ [_FUNCTION] = LAYOUT_planck_grid(
+ KC_F11, KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F12, KC_F2, KC_F4, KC_F6, KC_F8, 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, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS
+ ),
+};
+
+
+// Super crazy tap dancing stuff - see quad dance in feature_tap_dance.md
+
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ // key not interrupted, but still held sends 'HOLD'
+ else return SINGLE_HOLD;
+ }
+ else if (state->count == 2) {
+ if (state->interrupted || !state->pressed) return DOUBLE_TAP;
+ else return DOUBLE_HOLD;
+ }
+ else if (state->count == 3) {
+ if (state->interrupted || !state->pressed)return TRIPLE_TAP;
+ else return TRIPLE_HOLD;
+ }
+ else return 8; // magic number that i dont believe works.
+}
+
+// instance of tap for the 'X' dance.
+static tap xtap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+// registering keypresses
+void x_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code16(KC_AT); break;
+ case SINGLE_HOLD: set_oneshot_layer(_UPPER, ONESHOT_START); break;
+ case DOUBLE_TAP: set_oneshot_layer(_FUNCTION, ONESHOT_START); break;
+ case DOUBLE_HOLD: reset_keyboard(); break;
+ }
+}
+
+void lshift_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code16(KC_LSFT); register_code16(KC_9); break;
+ case SINGLE_HOLD: register_code16(KC_LSFT); break;
+ case DOUBLE_TAP: register_code16(KC_LBRC); break;
+ case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_LBRC); break;
+ }
+}
+void s_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code16(KC_S); break;
+ case DOUBLE_TAP: register_code16(KC_MINUS); break;
+ case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_MINUS); break;
+ }
+}
+
+void rshift_finished (qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code16(KC_LSFT); register_code16(KC_0); break;
+ case SINGLE_HOLD: register_code16(KC_RSFT); break;
+ case DOUBLE_TAP: register_code16(KC_RBRC); break;
+ case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_RBRC); break;
+ }
+}
+
+// forgetting keypresses
+
+void x_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code16(KC_AT); break;
+ case SINGLE_HOLD: clear_oneshot_layer_state(ONESHOT_PRESSED); break;
+ case DOUBLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); break;
+ case DOUBLE_HOLD: reset_keyboard(); break;
+ }
+ xtap_state.state = 0;
+}
+void lshift_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code16(KC_9); unregister_code16(KC_LSFT); break;
+ case SINGLE_HOLD: unregister_code16(KC_LSFT); break;
+ case DOUBLE_TAP: unregister_code16(KC_LBRC); break;
+ case TRIPLE_TAP: unregister_code16(KC_LBRC); unregister_code16(KC_LSFT); break;
+ }
+ xtap_state.state = 0;
+}
+
+void rshift_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code16(KC_0); unregister_code16(KC_LSFT); break;
+ case SINGLE_HOLD: unregister_code16(KC_RSFT); break;
+ case DOUBLE_TAP: unregister_code16(KC_RBRC); break;
+ case TRIPLE_TAP: unregister_code16(KC_RBRC); unregister_code16(KC_LSFT); break;
+ }
+ xtap_state.state = 0;
+}
+void s_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code16(KC_S); break;
+ case DOUBLE_TAP: unregister_code16(KC_MINUS); break;
+ case TRIPLE_TAP: unregister_code16(KC_MINUS); unregister_code16(KC_LSFT); break;
+ }
+ xtap_state.state = 0;
+}
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [X_AT_FUN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset),
+ [LSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lshift_finished, lshift_reset),
+ [RSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rshift_finished, rshift_reset),
+ [TD_S] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, s_finished, s_reset),
+};
+
+void shutdown_user(void) { clear_keyboard(); }
diff --git a/keyboards/planck/keymaps/roguepullrequest/readme.md b/keyboards/planck/keymaps/roguepullrequest/readme.md
new file mode 100644
index 00000000000..d3cae22fff0
--- /dev/null
+++ b/keyboards/planck/keymaps/roguepullrequest/readme.md
@@ -0,0 +1,15 @@
+# Programmer Dvorak for the Planck (Light)
+
+
+| Magic | | UPPER |
+|----------|---------|-------|
+| | DEFAULT | |
+| FUNCTION | | LOWER |
+
+# Layout notes
+- ALT_TAB = cycle through windows as long as you keep tapping it keeps alt tabbing
+- LAST = "!$" = is useful for using the last parm in bash/zsh
+- More to come
+
+
+# Dvorak base Layer
diff --git a/keyboards/planck/keymaps/roguepullrequest/rules.mk b/keyboards/planck/keymaps/roguepullrequest/rules.mk
new file mode 100644
index 00000000000..9394c96e5b7
--- /dev/null
+++ b/keyboards/planck/keymaps/roguepullrequest/rules.mk
@@ -0,0 +1,4 @@
+AUDIO_ENABLE = yes
+COMMAND_ENABLE = no
+TERMINAL_ENABLE = no
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h
index d908d80ec4a..4bc5e9c3f28 100644
--- a/keyboards/planck/planck.h
+++ b/keyboards/planck/planck.h
@@ -5,6 +5,10 @@
#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
+#ifdef KEYBOARD_planck_ez
+ #include "ez.h"
+#endif
+
#ifdef __AVR__
#define LAYOUT_planck_mit( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
@@ -50,7 +54,7 @@
#define LAYOUT_ortho_4x12 LAYOUT_planck_grid
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
-#else
+#elif KEYBOARD_planck_rev6
#define LAYOUT_planck_1x2uC( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk
index 60979023841..520a2d5c7ba 100644
--- a/keyboards/planck/rules.mk
+++ b/keyboards/planck/rules.mk
@@ -44,5 +44,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_4x12 planck_mit planck_grid
LAYOUTS_HAS_RGB = no
-
-DEFAULT_FOLDER = planck/rev5
diff --git a/keyboards/preonic/keymaps/xulkal/keymap.c b/keyboards/preonic/keymaps/xulkal/keymap.c
new file mode 100644
index 00000000000..967cd5a0aba
--- /dev/null
+++ b/keyboards/preonic/keymaps/xulkal/keymap.c
@@ -0,0 +1,148 @@
+#include QMK_KEYBOARD_H
+#include "xulkal.h"
+
+#include "muse.h"
+
+#define EXPAND_LAYOUT(...) LAYOUT_preonic_grid(__VA_ARGS__)
+
+// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Qwerty Layout
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp |
+ * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
+ * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------|
+ * |FN(CAPS)| A | S | D | F | G | ` | | ' | H | J | K | L | ; | Enter|
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------'
+ * | Space| DEL | | Enter| Space|
+ * `-------------' `-------------'
+ */
+ [_QWERTY] = EXPAND_LAYOUT( \
+ _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \
+ _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \
+ _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \
+ _________________QWERTY_L4_________________, _________________QWERTY_R4_________________, \
+ _________________QWERTY_L5_________________, _________________QWERTY_R5_________________ \
+ ),
+
+#ifndef GAMELAYER_DISABLE
+ [_GAME] = EXPAND_LAYOUT( \
+ ___________________GAME_L1_________________, ___________________GAME_R1_________________, \
+ ___________________GAME_L2_________________, ___________________GAME_R2_________________, \
+ ___________________GAME_L3_________________, ___________________GAME_R3_________________, \
+ ___________________GAME_L4_________________, ___________________GAME_R4_________________, \
+ ___________________GAME_L5_________________, ___________________GAME_R5_________________ \
+ ),
+#endif
+
+ [_LOWER] = EXPAND_LAYOUT( \
+ __________________LOWER_L1_________________, __________________LOWER_R1_________________, \
+ __________________LOWER_L2_________________, __________________LOWER_R2_________________, \
+ __________________LOWER_L3_________________, __________________LOWER_R3_________________, \
+ __________________LOWER_L4_________________, __________________LOWER_R4_________________, \
+ __________________LOWER_L5_________________, __________________LOWER_R5_________________ \
+ ),
+
+ [_RAISE] = EXPAND_LAYOUT( \
+ __________________RAISE_L1_________________, __________________RAISE_R1_________________, \
+ __________________RAISE_L2_________________, __________________RAISE_R2_________________, \
+ __________________RAISE_L3_________________, __________________RAISE_R3_________________, \
+ __________________RAISE_L4_________________, __________________RAISE_R4_________________, \
+ __________________RAISE_L5_________________, __________________RAISE_R5_________________ \
+ ),
+
+#ifdef TRILAYER_ENABLED
+ [_ADJUST] = EXPAND_LAYOUT( \
+ _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \
+ _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \
+ _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \
+ _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \
+ _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \
+ ),
+#endif
+};
+
+bool muse_mode = false;
+uint8_t last_muse_note = 0;
+uint16_t muse_counter = 0;
+uint8_t muse_offset = 70;
+uint16_t muse_tempo = 50;
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (muse_mode) {
+ if (IS_LAYER_ON(_RAISE)) {
+ if (clockwise) {
+ muse_offset++;
+ } else {
+ muse_offset--;
+ }
+ } else {
+ if (clockwise) {
+ muse_tempo+=1;
+ } else {
+ muse_tempo-=1;
+ }
+ }
+ } else {
+ if (clockwise) {
+ register_code(KC_PGDN);
+ unregister_code(KC_PGDN);
+ } else {
+ register_code(KC_PGUP);
+ unregister_code(KC_PGUP);
+ }
+ }
+}
+
+void dip_update(uint8_t index, bool active) {
+ switch (index) {
+ case 0:
+ if (active) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ break;
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ #endif
+ }
+ }
+}
+
+void matrix_scan_user(void) {
+ #ifdef AUDIO_ENABLE
+ if (muse_mode) {
+ if (muse_counter == 0) {
+ uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
+ if (muse_note != last_muse_note) {
+ stop_note(compute_freq_for_midi_note(last_muse_note));
+ play_note(compute_freq_for_midi_note(muse_note), 0xF);
+ last_muse_note = muse_note;
+ }
+ }
+ muse_counter = (muse_counter + 1) % muse_tempo;
+ }
+ #endif
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
diff --git a/keyboards/preonic/keymaps/xulkal/rules.mk b/keyboards/preonic/keymaps/xulkal/rules.mk
new file mode 100644
index 00000000000..f7e76252cd0
--- /dev/null
+++ b/keyboards/preonic/keymaps/xulkal/rules.mk
@@ -0,0 +1,6 @@
+SRC += muse.c
+
+ENCODER_ENABLE = no
+
+OPT_DEFS += -DTRILAYER_ENABLED
+OPT_DEFS += -DAUDIO_CLICKY
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk
index d5b21388af5..e646f2493f0 100644
--- a/keyboards/preonic/rules.mk
+++ b/keyboards/preonic/rules.mk
@@ -72,5 +72,3 @@ API_SYSEX_ENABLE = no
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
LAYOUTS = ortho_5x12
-
-DEFAULT_FOLDER = preonic/rev2
\ No newline at end of file
diff --git a/keyboards/primekb/prime_e/keymaps/default/keymap.c b/keyboards/primekb/prime_e/keymaps/default/keymap.c
index 0aab745cd58..5a09cb9694c 100644
--- a/keyboards/primekb/prime_e/keymaps/default/keymap.c
+++ b/keyboards/primekb/prime_e/keymaps/default/keymap.c
@@ -19,22 +19,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
- KC_LCTL, KC_LALT, KC_RBRC, MO(1), KC_SPC, KC_MINS, KC_LGUI, TO(1)
- )
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LALT, MO(2), MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+ LAYOUT(
+ KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU,
+ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_SCLN, KC_BSLS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+ LAYOUT(
+ KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_LBRC, KC_RBRC,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PENT, KC_PDOT, KC_TRNS, KC_TRNS
+ ),
+
+ LAYOUT(
+ KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
};
void matrix_init_user(void) {
// set CapsLock LED to output and low
setPinOutput(B1);
- writePinHigh(B1);
+ writePinLow(B1);
// set NumLock LED to output and low
setPinOutput(B2);
- writePinHigh(B2);
+ writePinLow(B2);
// set ScrollLock LED to output and low
setPinOutput(B3);
- writePinHigh(B3);
+ writePinLow(B3);
}
void matrix_scan_user(void) {
diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c
index 8b5b13866a6..5a09cb9694c 100644
--- a/keyboards/primekb/prime_e/keymaps/via/keymap.c
+++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c
@@ -19,21 +19,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
- KC_LCTL, KC_LALT, KC_RBRC, MO(1), KC_SPC, KC_MINS, KC_LGUI, TO(1)
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LALT, MO(2), MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ LAYOUT(
+ KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU,
+ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_SCLN, KC_BSLS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+ LAYOUT(
+ KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_LBRC, KC_RBRC,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PENT, KC_PDOT, KC_TRNS, KC_TRNS
+ ),
+
+ LAYOUT(
+ KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
void matrix_init_user(void) {
// set CapsLock LED to output and low
setPinOutput(B1);
- writePinHigh(B1);
+ writePinLow(B1);
// set NumLock LED to output and low
setPinOutput(B2);
- writePinHigh(B2);
+ writePinLow(B2);
// set ScrollLock LED to output and low
setPinOutput(B3);
- writePinHigh(B3);
+ writePinLow(B3);
}
void matrix_scan_user(void) {
diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md
deleted file mode 100644
index 8a558b15867..00000000000
--- a/keyboards/ps2avrGB/README.md
+++ /dev/null
@@ -1,78 +0,0 @@
-ps2avrGB keyboard firmware
-==========================
-
-This is a port of the QMK firmware for boards that are based on the
-ps2avrGB firmware, like the [ps2avrGB
-keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold
-by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/).
-
-Note that this is a complete replacement for the firmware, so you won't be
-using Bootmapper Client to change any keyboard settings, since not all the
-USB report options are supported.
-
-This is an example based on the b.mini keyboard for making other keyboards
-compatible with QMK; fully supported boards have their own directory.
-
-## Supported Boards
-
-- [b.fake](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake)
-- [b.mini](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bmini)
-- [b.face](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bface)
-- [pearl](https://github.com/qmk/qmk_firmware/tree/master/keyboards/pearl)
-
-## Installing
-
-First, install the requirements. These commands are for OSX, but all you
-need is the AVR toolchain and `bootloadHID` for flashing:
-
-```
-$ brew cask install crosspack-avr
-$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
-```
-
-In order to use the `./util/atmega32a_program.py` script, which can reboot the board into
-the bootloader, you'll need Python 2 with PyUSB installed:
-
-```
-$ pip install pyusb
-```
-
-Then, with the keyboard plugged in, simply run this command from the
-`qmk_firmware` directory:
-
-```
-$ make ps2avrGB:program
-```
-
-If you prefer, you can just build it and flash the firmware directly with
-`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
-in the bootloader:
-
-```
-$ make ps2avrGB
-$ bootloadHID -r ps2avrGB_default.hex
-```
-
-## Setting the board to bootloader mode
-
-If you're lucky, the programming script does this automagically for you. If
-however this doesn't work for you, you need to enter the bootloader mode manually
-by plugging the keyboard in while holding the bootloader key. If you did this
-correctly the LEDs will blink and you'll be able to flash your firmware.
-
-The bootloader key is the top left key of your matrix. For a standard board
-from winkeyless.kr this is `L_Ctrl`, but for some custom boards running ps2avrGB
-this might be different. For the Pearl it's `Esc`, for a b.fake it is `q`. If
-you're unsure you should be able to see the key in the bootmapper client.
-
-
-## Troubleshooting
-
-From my experience, it's really hard to brick these boards. But these
-tricks have been useful when it got stuck in a weird scenario.
-
-1. Try plugging the board in while holding the bootloader key. This will force
- it to boot only the bootloader without loading the firmware. Once this is
- done, just reflash the board with the original firmware.
-2. Sometimes USB hubs can act weird, so try connecting the board directly
- to your computer or plugging/unplugging the USB hub.
diff --git a/keyboards/ps2avrGB/bmini.h b/keyboards/ps2avrGB/bmini.h
deleted file mode 100644
index 65ffbe94797..00000000000
--- a/keyboards/ps2avrGB/bmini.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#ifndef BMINI_H
-#define BMINI_H
-
-#include "quantum.h"
-
-#define KEYMAP( \
- K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
- K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
- K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
- K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
- K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
- K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
-){ \
- { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \
- { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
- { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
- { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
- { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
- { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
- { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
- { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
-}
-
-#define KC_KEYMAP( \
- K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
- K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
- K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
- K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
- K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
- K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
-) \
-{ \
- { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \
- { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \
- { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \
- { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \
- { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \
- { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \
- { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \
- { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \
-}
-
-#endif
diff --git a/keyboards/ps2avrGB/i2c.c b/keyboards/ps2avrGB/i2c.c
deleted file mode 100644
index a4f95213524..00000000000
--- a/keyboards/ps2avrGB/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-// Please do not modify this file
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c
deleted file mode 100644
index 6b3403ed7c8..00000000000
--- a/keyboards/ps2avrGB/keymaps/default/keymap.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = KEYMAP(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_HOME,KC_END,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_DEL,
- 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_INS,
- MO(0), 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_PGUP,
- 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_UP, KC_PGDN,
- KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT
- ),
- [1] = KEYMAP(
- KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,
- KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_DEL,
- KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS,
- KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,
- KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,
- KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT
- ),
-};
diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c
deleted file mode 100644
index 245813dfd2d..00000000000
--- a/keyboards/ps2avrGB/matrix.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include
-#include
-
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_set_row_status(uint8_t row);
-uint8_t bit_reverse(uint8_t x);
-
-void matrix_init(void) {
- // all outputs for rows high
- DDRB = 0xFF;
- PORTB = 0xFF;
- // all inputs for columns
- DDRA = 0x00;
- DDRC &= ~(0x111111<<2);
- DDRD &= ~(1< 7
- (~PINA) & 0xFF
- ) | (
- // cols 8..13, PORTC 7 -> 0
- bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
- );
-
- if (matrix_debouncing[row] != cols) {
- matrix_debouncing[row] = cols;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-// declarations
-void matrix_set_row_status(uint8_t row) {
- DDRB = (1 << row);
- PORTB = ~(1 << row);
-}
-
-uint8_t bit_reverse(uint8_t x) {
- x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
- return x;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c
deleted file mode 100644
index 45ba37bffe7..00000000000
--- a/keyboards/ps2avrGB/ps2avrGB.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include "ps2avrGB.h"
-#include "rgblight.h"
-
-#include
-
-#include "action_layer.h"
-#include "i2c.h"
-#include "quantum.h"
-
-// for keyboard subdirectory level init functions
-// @Override
-void matrix_init_kb(void) {
- // call user level keymaps, if any
- matrix_init_user();
-}
-
-#ifdef RGBLIGHT_ENABLE
-extern rgblight_config_t rgblight_config;
-
-// custom RGB driver
-void rgblight_set(void) {
- if (!rgblight_config.enable) {
- for (uint8_t i=0; i
-
-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 .
-*/
-
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
-
-#include "quantum.h"
-#include "bmini.h"
-
-#endif
diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h
new file mode 100644
index 00000000000..655314985d7
--- /dev/null
+++ b/keyboards/quantrik/kyuu/config.h
@@ -0,0 +1,245 @@
+/*
+Copyright 2019 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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Quantrik
+#define PRODUCT Kyuu
+#define DESCRIPTION A 65% keyboard with blocker
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 }
+#define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C7, C6, F0, B7, D0, D5, D3, D2, D1, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * 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
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/quantrik/kyuu/info.json b/keyboards/quantrik/kyuu/info.json
new file mode 100644
index 00000000000..05c1b40b95b
--- /dev/null
+++ b/keyboards/quantrik/kyuu/info.json
@@ -0,0 +1,82 @@
+{
+ "keyboard_name": "Kyuu",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 67,
+ "layout": [
+ {"label":"K00 (B6,F1)", "x":0, "y":0},
+ {"label":"K01 (B6,F4)", "x":1, "y":0},
+ {"label":"K02 (B6,F5)", "x":2, "y":0},
+ {"label":"K03 (B6,F6)", "x":3, "y":0},
+ {"label":"K04 (B6,F7)", "x":4, "y":0},
+ {"label":"K05 (B6,C7)", "x":5, "y":0},
+ {"label":"K06 (B6,C6)", "x":6, "y":0},
+ {"label":"K07 (B6,F0)", "x":7, "y":0},
+ {"label":"K08 (B6,B7)", "x":8, "y":0},
+ {"label":"K09 (B6,D0)", "x":9, "y":0},
+ {"label":"K0A (B6,D5)", "x":10, "y":0},
+ {"label":"K0B (B6,D3)", "x":11, "y":0},
+ {"label":"K0C (B6,D2)", "x":12, "y":0},
+ {"label":"K0D (B6,D1)", "x":13, "y":0},
+ {"label":"K0E (B6,B3)", "x":14, "y":0},
+ {"label":"K2E (B4,B3)", "x":15, "y":0},
+ {"label":"K10 (B5,F1)", "x":0, "y":1, "w":1.5},
+ {"label":"K11 (B5,F4)", "x":1.5, "y":1},
+ {"label":"K12 (B5,F5)", "x":2.5, "y":1},
+ {"label":"K13 (B5,F6)", "x":3.5, "y":1},
+ {"label":"K14 (B5,F7)", "x":4.5, "y":1},
+ {"label":"K15 (B5,C7)", "x":5.5, "y":1},
+ {"label":"K16 (B5,C6)", "x":6.5, "y":1},
+ {"label":"K17 (B5,F0)", "x":7.5, "y":1},
+ {"label":"K18 (B5,B7)", "x":8.5, "y":1},
+ {"label":"K19 (B5,D0)", "x":9.5, "y":1},
+ {"label":"K1A (B5,D5)", "x":10.5, "y":1},
+ {"label":"K1B (B5,D3)", "x":11.5, "y":1},
+ {"label":"K1C (B5,D2)", "x":12.5, "y":1},
+ {"label":"K1D (B5,D1)", "x":13.5, "y":1, "w":1.5},
+ {"label":"K1E (B5,B3)", "x":15, "y":1},
+ {"label":"K20 (B4,F1)", "x":0, "y":2, "w":1.75},
+ {"label":"K21 (B4,F4)", "x":1.75, "y":2},
+ {"label":"K22 (B4,F5)", "x":2.75, "y":2},
+ {"label":"K23 (B4,F6)", "x":3.75, "y":2},
+ {"label":"K24 (B4,F7)", "x":4.75, "y":2},
+ {"label":"K25 (B4,C7)", "x":5.75, "y":2},
+ {"label":"K26 (B4,C6)", "x":6.75, "y":2},
+ {"label":"K27 (B4,F0)", "x":7.75, "y":2},
+ {"label":"K28 (B4,B7)", "x":8.75, "y":2},
+ {"label":"K29 (B4,D0)", "x":9.75, "y":2},
+ {"label":"K2A (B4,D5)", "x":10.75, "y":2},
+ {"label":"K2B (B4,D3)", "x":11.75, "y":2},
+ {"label":"K2C (B4,D2)", "x":12.75, "y":2, "w":2.25},
+ {"label":"K2D (B4,D1)", "x":15, "y":2},
+ {"label":"K30 (D7,F1)", "x":0, "y":3, "w":2.25},
+ {"label":"K31 (D7,F4)", "x":2.25, "y":3},
+ {"label":"K32 (D7,F5)", "x":3.25, "y":3},
+ {"label":"K33 (D7,F6)", "x":4.25, "y":3},
+ {"label":"K34 (D7,F7)", "x":5.25, "y":3},
+ {"label":"K35 (D7,C7)", "x":6.25, "y":3},
+ {"label":"K36 (D7,C6)", "x":7.25, "y":3},
+ {"label":"K37 (D7,F0)", "x":8.25, "y":3},
+ {"label":"K38 (D7,B7)", "x":9.25, "y":3},
+ {"label":"K39 (D7,D0)", "x":10.25, "y":3},
+ {"label":"K3A (D7,D5)", "x":11.25, "y":3},
+ {"label":"K3B (D7,D3)", "x":12.25, "y":3, "w":1.75},
+ {"label":"K3C (D7,D2)", "x":14, "y":3},
+ {"label":"K3D (D7,D1)", "x":15, "y":3},
+ {"label":"K40 (D6,F1)", "x":0, "y":4, "w":1.5},
+ {"label":"K41 (D6,F4)", "x":1.5, "y":4},
+ {"label":"K42 (D6,F5)", "x":2.5, "y":4, "w":1.5},
+ {"label":"K46 (D6,C6)", "x":4, "y":4, "w":7},
+ {"label":"K4A (D6,D5)", "x":11, "y":4, "w":1.5},
+ {"label":"K4B (D6,D3)", "x":13, "y":4},
+ {"label":"K4C (D6,D2)", "x":14, "y":4},
+ {"label":"K4D (D6,D1)", "x":15, "y":4}
+ ]
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/keyboards/quantrik/kyuu/keymaps/default/config.h b/keyboards/quantrik/kyuu/keymaps/default/config.h
new file mode 100644
index 00000000000..60dd02a9d0e
--- /dev/null
+++ b/keyboards/quantrik/kyuu/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/quantrik/kyuu/keymaps/default/keymap.c b/keyboards/quantrik/kyuu/keymaps/default/keymap.c
new file mode 100644
index 00000000000..077d7ac5a64
--- /dev/null
+++ b/keyboards/quantrik/kyuu/keymaps/default/keymap.c
@@ -0,0 +1,74 @@
+/* Copyright 2019 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 .
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = 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_HOME, \
+ 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_PGUP, \
+ 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_PGDN, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT( \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, QMKBEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/quantrik/kyuu/keymaps/default/readme.md b/keyboards/quantrik/kyuu/keymaps/default/readme.md
new file mode 100644
index 00000000000..f87ce36e38e
--- /dev/null
+++ b/keyboards/quantrik/kyuu/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for Kyuu
diff --git a/keyboards/quantrik/kyuu/kyuu.c b/keyboards/quantrik/kyuu/kyuu.c
new file mode 100644
index 00000000000..e9a72a5749a
--- /dev/null
+++ b/keyboards/quantrik/kyuu/kyuu.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 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 .
+ */
+#include "kyuu.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);
+}
diff --git a/keyboards/quantrik/kyuu/kyuu.h b/keyboards/quantrik/kyuu/kyuu.h
new file mode 100644
index 00000000000..25d9d86dd55
--- /dev/null
+++ b/keyboards/quantrik/kyuu/kyuu.h
@@ -0,0 +1,41 @@
+/* Copyright 2019 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k2E, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
+ k40, k41, k42, k46, k4A, k4B, k4C, k4D \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \
+ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, KC_NO }, \
+}
diff --git a/keyboards/quantrik/kyuu/readme.md b/keyboards/quantrik/kyuu/readme.md
new file mode 100644
index 00000000000..2b331409800
--- /dev/null
+++ b/keyboards/quantrik/kyuu/readme.md
@@ -0,0 +1,13 @@
+# kyuu
+
+Kyuu is a 65% keyboard inspired by the TGR 910's top right blocker.
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: Quantrik 65% PCB
+Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97810.0), [quantrik.com](https://www.quantrik.com/collections/frontpage/products/kyuu-keyboard)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make quantrik/kyuu:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk
new file mode 100644
index 00000000000..3229957d9cb
--- /dev/null
+++ b/keyboards/quantrik/kyuu/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+#MCU = at90usb1286
+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
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/qwertyydox/info.json b/keyboards/qwertyydox/info.json
index 0b762388ec5..3dd6b3ec738 100644
--- a/keyboards/qwertyydox/info.json
+++ b/keyboards/qwertyydox/info.json
@@ -5,8 +5,8 @@
"url": "",
"maintainer": "qmk",
"processor": "atmega32u4",
- "width": 14,
- "height": 4,
+ "width": 16,
+ "height": 5,
"layouts": {
"LAYOUT": {
"key_count": 53,
diff --git a/keyboards/rama/koyu/config.h b/keyboards/rama/koyu/config.h
index 12dc3d02b59..e7817e79a09 100644
--- a/keyboards/rama/koyu/config.h
+++ b/keyboards/rama/koyu/config.h
@@ -90,9 +90,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -104,6 +114,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
diff --git a/keyboards/rama/koyu/readme.md b/keyboards/rama/koyu/readme.md
index 0372747f580..c249bf11b62 100644
--- a/keyboards/rama/koyu/readme.md
+++ b/keyboards/rama/koyu/readme.md
@@ -2,13 +2,13 @@

-The wait for something isnt the most conscious desire, but that anticipation creates nostalgia.
+The 'wait' for something isn't the most conscious desire, but that anticipation creates nostalgia.
-At Rama Works, youve embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesnt just start when you receive it. If youve ever received a Rama Works product, you know that no detail is overlooked.
+At Rama Works, you've embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesn't just start when you receive it. If you've ever received a Rama Works product, you know that no detail is overlooked.
-Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works X element personifies the understanding that taking something away doesnt necessarily make it less.
+Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works 'X' element personifies the understanding that taking something away doesn't necessarily make it less.
-This is the sound of Rama Works. Never too busya feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity.
+This is the sound of Rama Works. Never too busy-a feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity.
[More info at RAMA WORKS](https://rama.works/koyu/)
diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h
index 2b54cda790d..1cbdee5ae35 100644
--- a/keyboards/rama/m60_a/config.h
+++ b/keyboards/rama/m60_a/config.h
@@ -87,9 +87,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -101,6 +111,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h
index c2a225d53aa..0d690bffafc 100644
--- a/keyboards/rama/m6_b/config.h
+++ b/keyboards/rama/m6_b/config.h
@@ -120,9 +120,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -134,6 +144,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/satan/keymaps/default/keymap.c
index 2dec5464ccf..77c1b5005c2 100644
--- a/keyboards/satan/keymaps/default/keymap.c
+++ b/keyboards/satan/keymaps/default/keymap.c
@@ -1,9 +1,5 @@
#include QMK_KEYBOARD_H
-enum custom_keycodes {
- SFT_ESC = SAFE_RANGE
-};
-
// 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
@@ -28,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[_BL] = LAYOUT_60_ansi(
- SFT_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_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
@@ -56,31 +52,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______
)
};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case SFT_ESC:
- if (record->event.pressed) {
- if (get_mods() & MOD_MASK_SHIFT) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- if (get_mods() & MOD_MASK_SHIFT) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
-
- return false;
-
- default:
- return true;
- }
-}
diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h
new file mode 100644
index 00000000000..3df07d17fcb
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/config.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xF1E7
+#define PRODUCT_ID 0x5163
+#define DEVICE_VER 0x0000
+#define MANUFACTURER troyfletcher
+#define PRODUCT Signum
+#define DESCRIPTION q.m.k. keyboard firmware for Signum 3.0
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D2, D1, F5, B5 }
+#define MATRIX_COL_PINS { B4, D7, D0, E6, D4, F6, F4, F7, B1, B3, C6, B2 }
+#define UNUSED_PINS
+
+/* 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
diff --git a/keyboards/signum/3_0/elitec/elitec.c b/keyboards/signum/3_0/elitec/elitec.c
new file mode 100644
index 00000000000..78195260b11
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/elitec.c
@@ -0,0 +1 @@
+#include "elitec.h"
diff --git a/keyboards/signum/3_0/elitec/elitec.h b/keyboards/signum/3_0/elitec/elitec.h
new file mode 100644
index 00000000000..d28d3d47697
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/elitec.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ortho_4x12( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \
+}
diff --git a/keyboards/signum/3_0/elitec/info.json b/keyboards/signum/3_0/elitec/info.json
new file mode 100644
index 00000000000..e414d15967b
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/info.json
@@ -0,0 +1,77 @@
+{
+ "keyboard_name": "Signum 3.0",
+ "url": "http://troyfletcher.net/",
+ "maintainer": "jceb",
+ "width": 17,
+ "height": 8,
+ "layouts": {
+ "LAYOUT_ortho_4x12": {
+ "key_count": 48,
+ "layout": [
+
+ { "x": 1.25, "y": 0.75, "r": 15 },
+ { "x": 1.25, "y": 1.75, "r": 15 },
+ { "x": 1.25, "y": 2.75, "r": 15 },
+ { "x": 1.25, "y": 4.25, "r": 15 },
+
+ { "x": 2.25, "y": 0.75, "r": 15 },
+ { "x": 2.25, "y": 1.75, "r": 15 },
+ { "x": 2.25, "y": 2.75, "r": 15 },
+ { "x": 2.25, "y": 3.75, "r": 15 },
+
+ { "x": 3.25, "y": 0.5, "r": 15 },
+ { "x": 3.25, "y": 1.5, "r": 15 },
+ { "x": 3.25, "y": 2.5, "r": 15 },
+ { "x": 3.25, "y": 3.5, "r": 15 },
+
+ { "x": 4.25, "y": 0.25, "r": 15 },
+ { "x": 4.25, "y": 1.25, "r": 15 },
+ { "x": 4.25, "y": 2.25, "r": 15 },
+
+ { "x": 5.25, "y": 0.5, "r": 15 },
+ { "x": 5.25, "y": 1.5, "r": 15 },
+ { "x": 5.25, "y": 2.5, "r": 15 },
+ { "x": 5.25, "y": 4.5, "r": 15, "h": 1.5 },
+
+ { "x": 6.25, "y": 0.75, "r": 15 },
+ { "x": 6.25, "y": 1.75, "r": 15 },
+ { "x": 6.25, "y": 2.75, "r": 15 },
+ { "x": 6.25, "y": 4.25, "r": 15, "h": 2 },
+
+ { "x": 7.25, "y": 4.5, "r": 15, "h": 1.5 },
+
+ { "x": 8.25, "y": 4.5, "r": -15, "h": 1.5 },
+
+ { "x": 9.25, "y": 0.75, "r": -15 },
+ { "x": 9.25, "y": 1.75, "r": -15 },
+ { "x": 9.25, "y": 2.75, "r": -15 },
+ { "x": 9.25, "y": 4.25, "r": -15, "h": 2 },
+
+ { "x": 10.25, "y": 0.5, "r": -15 },
+ { "x": 10.25, "y": 1.5, "r": -15 },
+ { "x": 10.25, "y": 2.5, "r": -15 },
+ { "x": 10.25, "y": 4.5, "r": -15, "h": 1.5 },
+
+ { "x": 11.25, "y": 0.25, "r": -15 },
+ { "x": 11.25, "y": 1.25, "r": -15 },
+ { "x": 11.25, "y": 2.25, "r": -15 },
+
+ { "x": 12.25, "y": 0.5, "r": -15 },
+ { "x": 12.25, "y": 1.5, "r": -15 },
+ { "x": 12.25, "y": 2.5, "r": -15 },
+ { "x": 12.25, "y": 3.5, "r": -15 },
+
+ { "x": 13.25, "y": 0.75, "r": -15 },
+ { "x": 13.25, "y": 1.75, "r": -15 },
+ { "x": 13.25, "y": 2.75, "r": -15 },
+ { "x": 13.25, "y": 3.75, "r": -15 },
+
+ { "x": 14.25, "y": 0.75, "r": -15 },
+ { "x": 14.25, "y": 1.75, "r": -15 },
+ { "x": 14.25, "y": 2.75, "r": -15 },
+ { "x": 14.25, "y": 4.25, "r": -15 }
+
+ ]
+ }
+ }
+}
diff --git a/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py b/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py
new file mode 100755
index 00000000000..7778da8f554
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py
@@ -0,0 +1,130 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+from sortedcontainers import SortedDict
+import layout
+import re
+
+# TODO: auto-generate mutex layers
+# TODO: auto-generate update_tri_layer (_state)
+
+
+def gen_uc_iter():
+ length = len(layout.uc_dict)
+ for key, value in layout.uc_dict.items():
+ length -= 1
+ if length:
+ yield (key, value, False)
+ else:
+ yield (key, value, True)
+
+
+def translate(s):
+ if re.match("^[0-9]$", s):
+ return ("KC_{0}".format(s), " {0} ".format(s))
+ elif re.match("^[a-z]$", s):
+ return ("KC_{0}".format(s.upper()), " {0} ".format(s))
+ elif re.match("^[A-Z]$", s):
+ return ("S(KC_{0})".format(s), " {0} ".format(s))
+ elif re.match("^F[0-9]{1,2}$", s): # Fn, works from F0 to F99
+ return ("KC_{0}".format(s), "{0:^7}".format(s))
+ elif re.match("^DF[0-9]{1,2}$", s): # DFn, works from DF0 to DF99
+ return ("DF({0})".format(s[2:]), "{0:^7}".format(s))
+ elif re.match("^MO[0-9]{1,2}$", s): # MOn, works from MO0 to MO99
+ return ("MO({0})".format(s[2:]), "{0:^7}".format(s))
+ elif re.match("^OSL[0-9]{1,2}$", s): # OSLn, works from OSL0 to OSL99
+ return ("OSL({0})".format(s[3:]), "{0:^7}".format(s))
+ elif re.match("^TG[0-9]{1,2}$", s): # TGn, works from TG0 to TG99
+ return ("TG({0})".format(s[2:]), "{0:^7}".format(s))
+ elif re.match("^TO[0-9]{1,2}$", s): # Tn, works from TO0 to TO99
+ return ("TO({0})".format(s[2:]), "{0:^7}".format(s))
+ elif re.match("^TT[0-9]{1,2}$", s): # Tn, works from TT0 to TT99
+ return ("TT({0})".format(s[2:]), "{0:^7}".format(s))
+ elif s in layout.uc_dict:
+ return ("X("+s+")", " {0} ".format(chr(int(layout.uc_dict[s], 0))))
+ elif s in layout.qmk_dict:
+ return (layout.qmk_dict[s], "{0:^7}".format(s))
+ elif s == s.upper() and s.startswith("KC_"):
+ return (s, "{0:^7}".format(s[2:]))
+ else:
+ return ("XXXXXXX", " {0} ".format(chr(128165)))
+
+
+def toKC(s):
+ (kc, lgd) = translate(s)
+ return kc
+
+
+def toLgd(s):
+ (kc, lgd) = translate(s)
+ return lgd
+
+
+if __name__ == "__main__":
+
+ template = open("km_template.txt", mode="r")
+ output = open("keymap.c", mode="w", encoding='utf-8')
+
+ doCopy = False
+
+ for line in template:
+ doCopy = True
+ if line.startswith("//"):
+ doCopy = False
+# output.write(str(layout.uc_dict))
+ for k, v, isLast in gen_uc_iter():
+ if isLast:
+ output.write(k + "\n")
+ else:
+ output.write(k + ",\n")
+ if line.startswith("//"):
+ doCopy = False
+ for k, v, isLast in gen_uc_iter():
+ if isLast:
+ output.write(u"\t[{0}] = {1} // {2}\n".format(k, v, chr(int(v, 0))))
+ else:
+ output.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0))))
+ if line.startswith("//"):
+ doCopy = False
+ counter = len(layout.layers)
+ layer = 0
+ S = layout.static
+ for L in layout.layers:
+ counter -= 1
+ r_counter = 4
+ output.write("/* Layer %d\n" % layer)
+ output.write(" * ------------------------------------------------- -------------------------------------------------\n")
+ output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[0][0]), toLgd(L[0][1]), toLgd(L[0][2]), toLgd(L[0][3]), toLgd(L[0][4]), toLgd(L[0][5]), toLgd(L[0][6]), toLgd(L[0][7]), toLgd(L[0][8]), toLgd(L[0][9]), toLgd(L[0][10]), toLgd(L[0][11])))
+ output.write(" * ------------------------------------------------- -------------------------------------------------\n")
+ output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[1][0]), toLgd(L[1][1]), toLgd(L[1][2]), toLgd(L[1][3]), toLgd(L[1][4]), toLgd(L[1][5]), toLgd(L[1][6]), toLgd(L[1][7]), toLgd(L[1][8]), toLgd(L[1][9]), toLgd(L[1][10]), toLgd(L[1][11])))
+ output.write(" * ------------------------------------------------- -------------------------------------------------\n")
+ output.write(" * |{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|\n".format(toLgd(L[2][0]), toLgd(L[2][1]), toLgd(L[2][2]), toLgd(L[2][3]), toLgd(L[2][4]), toLgd(L[2][5]), toLgd(L[2][6]), toLgd(L[2][7]), toLgd(L[2][8]), toLgd(L[2][9]), toLgd(L[2][10]), toLgd(L[2][11])))
+ output.write(" * -----------------------------------------------------------------------------------------------------------------\n")
+ output.write(" * {0} {1} {2} |{3}|{4}|{5}|{6}|{7}|{8}| {9} {10} {11}".format(toLgd(L[3][0]), toLgd(L[3][1]), toLgd(L[3][2]), toLgd(L[3][3]), toLgd(L[3][4]), toLgd(L[3][5]), toLgd(L[3][6]), toLgd(L[3][7]), toLgd(L[3][8]), toLgd(L[3][9]), toLgd(L[3][10]), toLgd(L[3][11])).rstrip()+"\n")
+ output.write(" * -------------------------------------------------\n")
+ output.write(" */\n")
+
+ l_code = '\tLAYOUT_ortho_4x12(\n'
+ for r in range(r_counter):
+ r_counter -= 1
+ c_counter = 12
+ l_code += '\t\t'
+ for c in range(c_counter):
+ c_counter -= 1
+ if c != 0:
+ l_code += " "
+ l_code += "%s" % toKC(L[r][c])
+ if r_counter or c_counter:
+ l_code += ","
+ l_code += '\n'
+ if counter:
+ l_code += "\t),\n\n"
+ else:
+ l_code += "\t)\n"
+ output.write(l_code)
+ layer += 1
+ if doCopy:
+ output.write(line)
+
+ template.close()
+ output.close()
diff --git a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c
new file mode 100644
index 00000000000..22d60085f4c
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c
@@ -0,0 +1,754 @@
+/* keymap.c is auto-generated, don't edit it directly.
+ * Further instructions are provided in readme.md */
+
+#include QMK_KEYBOARD_H
+
+enum unicode_name {
+AB_ARC,
+AB_LINE,
+AB_VEC,
+ACUTE,
+AE,
+ALEPH,
+ALLA_BR,
+ALPHA,
+AND,
+AND_,
+ANGLE,
+AST_MID,
+A_SET,
+BARLINE,
+BARLINE_D,
+BARLINE_FIN,
+BETA,
+BETH,
+BICOND,
+BIG_O,
+BISHOP_B,
+BISHOP_W,
+BITCOIN,
+BOTTOM,
+BOWTIE,
+BRA,
+BULLET,
+B_SET,
+CENT,
+CHI,
+CIRCLE,
+CIRC_MID,
+CLUBS_B,
+CLUBS_W,
+CODA,
+COMMON_T,
+COPYR,
+CORRESP,
+CROSS,
+CURRENCY,
+C_CLEF,
+C_SET,
+DACAPO,
+DALSEGNO,
+DEFINE,
+DEGREE,
+DELTA,
+DIAMS_B,
+DIAMS_W,
+DIGAMMA,
+DIVISION,
+DOTS,
+DOT_OP,
+DQT1,
+DQT2,
+DQT3,
+DQT4,
+DQT5,
+EIGHTH_N,
+EIGHTH_P,
+EJECT,
+EMBED,
+EMDASH,
+EMPTYSET,
+EPSILON,
+EQUIV,
+ETA,
+EURO,
+EXISTS,
+FEMALE,
+FLAG_B,
+FLAG_W,
+FLAT,
+FORALL,
+FORWARD,
+FOURIER,
+FULL_OUTER,
+F_CLEF,
+F_SET,
+GAMMA,
+GREAT_GREAT,
+GR_EQ,
+G_CLEF,
+HALF_N,
+HALF_P,
+HAMILTON,
+HEARTS_B,
+HEARTS_W,
+HETA,
+H_SET,
+IMAG_P,
+IMPL,
+IMPL_REV,
+IN,
+INDICATOR,
+INEQUAL,
+INFO,
+INFTY,
+INTEGRAL,
+INTERS,
+INTERS_,
+INV_EXCL,
+INV_QST,
+IOTA,
+ISOMORPH,
+KAPPA,
+KET,
+KEY,
+KING_B,
+KING_W,
+KNIGHT_B,
+KNIGHT_W,
+KOPPA,
+K_SET,
+LAMBDA,
+LAPLACE,
+LEFT_CEIL,
+LEFT_FLOOR,
+LEFT_OUTER,
+LENGTH,
+LESS_LESS,
+LETTER,
+LOCK,
+LOCK_OPEN,
+LS_EQ,
+LTIMES,
+MALE,
+MAPSTO,
+MDOT,
+MICRO,
+MINUS_OP,
+MINUS_PLUS,
+MINUTE,
+MODELS,
+MY,
+M_ANGLE,
+NABLA,
+NATURAL,
+NO,
+NOT,
+NOTIN,
+NOTSUBS,
+NOT_DIV,
+NOT_PARA,
+NY,
+N_SET,
+N_TILDE,
+OE,
+OHM,
+OMEGA,
+OMIKRON,
+OR,
+OR_,
+PARALLEL,
+PARTIAL,
+PAWN_B,
+PAWN_W,
+PEDAL,
+PEDAL_UP,
+PERMIL,
+PHI,
+PHONE,
+PI,
+PLAY,
+PLUS_MINUS,
+PLUS_OP,
+POUND,
+POWERSET,
+PRED,
+PROD_,
+PROP_TO,
+PR_SUBSET,
+PSI,
+QED,
+QUART_N,
+QUART_P,
+QUEEN_B,
+QUEEN_W,
+Q_SET,
+REAL_P,
+REGTM,
+REPEAT_E,
+REPEAT_S,
+REWIND,
+RHO,
+RIGHT_CEIL,
+RIGHT_FLOOR,
+RIGHT_OUTER,
+RIGHT_TACK,
+ROOK_B,
+ROOK_W,
+ROOT,
+ROUGHLY,
+RTIMES,
+R_SET,
+SAMPI,
+SAN,
+SCHO,
+SECOND,
+SECTION,
+SEGNO,
+SETMINUS,
+SHARP,
+SHOGI_B,
+SHOGI_BD,
+SHOGI_W,
+SHOGI_WD,
+SIGMA,
+SIXT_N,
+SIXT_P,
+SNEK,
+SPADES_B,
+SPADES_W,
+SPEAKER_DN,
+SPEAKER_TG,
+SPEAKER_UP,
+SQT1,
+SQT2,
+SQT3,
+SQT4,
+SQT5,
+SQUARE,
+SQ_LS,
+SQ_LS_EQ,
+STAFF,
+STIGMA,
+STOP,
+SUBSET,
+SUBSET_REV,
+SUCC,
+SUM_,
+SUP1,
+SUP2,
+SUP3,
+SUP_A,
+SUP_MIN,
+SUP_O,
+SZ,
+TAU,
+THETA,
+TIMES,
+TIMES_OP,
+TMARK,
+TO,
+TOP,
+TRIANGLE,
+UE,
+UNION,
+UNION_,
+U_SET,
+WHOLE_N,
+WHOLE_P,
+XI,
+YEN,
+YES,
+YPSI2,
+YPSILON,
+ZETA,
+Z_SET,
+ae,
+alpha,
+beta,
+beta2,
+chi,
+delta,
+digamma,
+e_FUN,
+epsi2,
+epsilon,
+eta,
+gamma,
+heta,
+i_UNIT,
+iota,
+kappa,
+kappa2,
+koppa,
+lambda,
+my,
+n_tilde,
+ny,
+oe,
+omega,
+omikron,
+phi,
+phi2,
+pi,
+pi2,
+psi,
+rho,
+rho2,
+sampi,
+san,
+scho,
+sigma,
+sigma2,
+sigma3,
+stigma,
+sz,
+tau,
+theta,
+theta2,
+ue,
+xi,
+ypsilon,
+zeta
+};
+
+const uint32_t PROGMEM unicode_map[] = {
+ [AB_ARC] = 0x0361, // ͡
+ [AB_LINE] = 0x0305, // ̅
+ [AB_VEC] = 0x20d7, // ⃗
+ [ACUTE] = 0x00b4, // ´
+ [AE] = 0x00c4, // Ä
+ [ALEPH] = 0x2135, // ℵ
+ [ALLA_BR] = 0x1d135, // 𝄵
+ [ALPHA] = 0x0391, // Α
+ [AND] = 0x2227, // ∧
+ [AND_] = 0x22c0, // ⋀
+ [ANGLE] = 0x2220, // ∠
+ [AST_MID] = 0x2217, // ∗
+ [A_SET] = 0x1d538, // 𝔸
+ [BARLINE] = 0x1d100, // 𝄀
+ [BARLINE_D] = 0x1d101, // 𝄁
+ [BARLINE_FIN] = 0x1d102, // 𝄂
+ [BETA] = 0x0392, // Β
+ [BETH] = 0x2136, // ℶ
+ [BICOND] = 0x21d4, // ⇔
+ [BIG_O] = 0x1d4aa, // 𝒪
+ [BISHOP_B] = 0x265d, // ♝
+ [BISHOP_W] = 0x2657, // ♗
+ [BITCOIN] = 0x20bf, // ₿
+ [BOTTOM] = 0x22a5, // ⊥
+ [BOWTIE] = 0x22c8, // ⋈
+ [BRA] = 0x27e8, // ⟨
+ [BULLET] = 0x2022, // •
+ [B_SET] = 0x1d539, // 𝔹
+ [CENT] = 0x00a2, // ¢
+ [CHI] = 0x03a7, // Χ
+ [CIRCLE] = 0x25cb, // ○
+ [CIRC_MID] = 0x2218, // ∘
+ [CLUBS_B] = 0x2663, // ♣
+ [CLUBS_W] = 0x2667, // ♧
+ [CODA] = 0x1d10c, // 𝄌
+ [COMMON_T] = 0x1d134, // 𝄴
+ [COPYR] = 0x00a9, // ©
+ [CORRESP] = 0x2259, // ≙
+ [CROSS] = 0x2020, // †
+ [CURRENCY] = 0x00a4, // ¤
+ [C_CLEF] = 0x1d121, // 𝄡
+ [C_SET] = 0x2102, // ℂ
+ [DACAPO] = 0x1d10a, // 𝄊
+ [DALSEGNO] = 0x1d109, // 𝄉
+ [DEFINE] = 0x2254, // ≔
+ [DEGREE] = 0x00b0, // °
+ [DELTA] = 0x0394, // Δ
+ [DIAMS_B] = 0x2666, // ♦
+ [DIAMS_W] = 0x2662, // ♢
+ [DIGAMMA] = 0x03dc, // Ϝ
+ [DIVISION] = 0x00f7, // ÷
+ [DOTS] = 0x2026, // …
+ [DOT_OP] = 0x2299, // ⊙
+ [DQT1] = 0x00bb, // »
+ [DQT2] = 0x201e, // „
+ [DQT3] = 0x201c, // “
+ [DQT4] = 0x201d, // ”
+ [DQT5] = 0x00ab, // «
+ [EIGHTH_N] = 0x1d160, // 𝅘𝅥𝅮
+ [EIGHTH_P] = 0x1d13e, // 𝄾
+ [EJECT] = 0x23cf, // ⏏
+ [EMBED] = 0x21aa, // ↪
+ [EMDASH] = 0x2014, // —
+ [EMPTYSET] = 0x2205, // ∅
+ [EPSILON] = 0x0395, // Ε
+ [EQUIV] = 0x2261, // ≡
+ [ETA] = 0x0397, // Η
+ [EURO] = 0x20ac, // €
+ [EXISTS] = 0x2203, // ∃
+ [FEMALE] = 0x2640, // ♀
+ [FLAG_B] = 0x2691, // ⚑
+ [FLAG_W] = 0x2690, // ⚐
+ [FLAT] = 0x266d, // ♭
+ [FORALL] = 0x2200, // ∀
+ [FORWARD] = 0x23ed, // ⏭
+ [FOURIER] = 0x2131, // ℱ
+ [FULL_OUTER] = 0x27d7, // ⟗
+ [F_CLEF] = 0x1d122, // 𝄢
+ [F_SET] = 0x1d53d, // 𝔽
+ [GAMMA] = 0x0393, // Γ
+ [GREAT_GREAT] = 0x226b, // ≫
+ [GR_EQ] = 0x2265, // ≥
+ [G_CLEF] = 0x1d11e, // 𝄞
+ [HALF_N] = 0x1d15e, // 𝅗𝅥
+ [HALF_P] = 0x1d13c, // 𝄼
+ [HAMILTON] = 0x210b, // ℋ
+ [HEARTS_B] = 0x2665, // ♥
+ [HEARTS_W] = 0x2661, // ♡
+ [HETA] = 0x0370, // Ͱ
+ [H_SET] = 0x210d, // ℍ
+ [IMAG_P] = 0x2111, // ℑ
+ [IMPL] = 0x21d2, // ⇒
+ [IMPL_REV] = 0x21d0, // ⇐
+ [IN] = 0x2208, // ∈
+ [INDICATOR] = 0x1d7cf, // 𝟏
+ [INEQUAL] = 0x2260, // ≠
+ [INFO] = 0x1f6c8, // 🛈
+ [INFTY] = 0x221e, // ∞
+ [INTEGRAL] = 0x222b, // ∫
+ [INTERS] = 0x2229, // ∩
+ [INTERS_] = 0x22c2, // ⋂
+ [INV_EXCL] = 0x00a1, // ¡
+ [INV_QST] = 0x00bf, // ¿
+ [IOTA] = 0x0399, // Ι
+ [ISOMORPH] = 0x2245, // ≅
+ [KAPPA] = 0x039a, // Κ
+ [KET] = 0x27e9, // ⟩
+ [KEY] = 0x1f511, // 🔑
+ [KING_B] = 0x265a, // ♚
+ [KING_W] = 0x2654, // ♔
+ [KNIGHT_B] = 0x265e, // ♞
+ [KNIGHT_W] = 0x2658, // ♘
+ [KOPPA] = 0x03d8, // Ϙ
+ [K_SET] = 0x1d542, // 𝕂
+ [LAMBDA] = 0x039b, // Λ
+ [LAPLACE] = 0x2112, // ℒ
+ [LEFT_CEIL] = 0x2308, // ⌈
+ [LEFT_FLOOR] = 0x230a, // ⌊
+ [LEFT_OUTER] = 0x27d5, // ⟕
+ [LENGTH] = 0x2113, // ℓ
+ [LESS_LESS] = 0x226a, // ≪
+ [LETTER] = 0x2709, // ✉
+ [LOCK] = 0x1f512, // 🔒
+ [LOCK_OPEN] = 0x1f513, // 🔓
+ [LS_EQ] = 0x2264, // ≤
+ [LTIMES] = 0x22c9, // ⋉
+ [MALE] = 0x2642, // ♂
+ [MAPSTO] = 0x27fc, // ⟼
+ [MDOT] = 0x22c5, // ⋅
+ [MICRO] = 0x00b5, // µ
+ [MINUS_OP] = 0x2296, // ⊖
+ [MINUS_PLUS] = 0x2213, // ∓
+ [MINUTE] = 0x02b9, // ʹ
+ [MODELS] = 0x22a7, // ⊧
+ [MY] = 0x039c, // Μ
+ [M_ANGLE] = 0x2221, // ∡
+ [NABLA] = 0x2207, // ∇
+ [NATURAL] = 0x266e, // ♮
+ [NO] = 0x2717, // ✗
+ [NOT] = 0x00ac, // ¬
+ [NOTIN] = 0x2209, // ∉
+ [NOTSUBS] = 0x2288, // ⊈
+ [NOT_DIV] = 0x2224, // ∤
+ [NOT_PARA] = 0x2226, // ∦
+ [NY] = 0x039d, // Ν
+ [N_SET] = 0x2115, // ℕ
+ [N_TILDE] = 0x00d1, // Ñ
+ [OE] = 0x00d6, // Ö
+ [OHM] = 0x2126, // Ω
+ [OMEGA] = 0x03a9, // Ω
+ [OMIKRON] = 0x039f, // Ο
+ [OR] = 0x2228, // ∨
+ [OR_] = 0x22c1, // ⋁
+ [PARALLEL] = 0x2225, // ∥
+ [PARTIAL] = 0x2202, // ∂
+ [PAWN_B] = 0x265f, // ♟
+ [PAWN_W] = 0x2659, // ♙
+ [PEDAL] = 0x1d1ae, // 𝆮
+ [PEDAL_UP] = 0x1d1af, // 𝆯
+ [PERMIL] = 0x2030, // ‰
+ [PHI] = 0x03a6, // Φ
+ [PHONE] = 0x2706, // ✆
+ [PI] = 0x03a0, // Π
+ [PLAY] = 0x23ef, // ⏯
+ [PLUS_MINUS] = 0x00b1, // ±
+ [PLUS_OP] = 0x2295, // ⊕
+ [POUND] = 0x00a3, // £
+ [POWERSET] = 0x1d4ab, // 𝒫
+ [PRED] = 0x227a, // ≺
+ [PROD_] = 0x220f, // ∏
+ [PROP_TO] = 0x221d, // ∝
+ [PR_SUBSET] = 0x2282, // ⊂
+ [PSI] = 0x03a8, // Ψ
+ [QED] = 0x220e, // ∎
+ [QUART_N] = 0x1d15f, // 𝅘𝅥
+ [QUART_P] = 0x1d13d, // 𝄽
+ [QUEEN_B] = 0x265b, // ♛
+ [QUEEN_W] = 0x2655, // ♕
+ [Q_SET] = 0x211a, // ℚ
+ [REAL_P] = 0x211c, // ℜ
+ [REGTM] = 0x00ae, // ®
+ [REPEAT_E] = 0x1d107, // 𝄇
+ [REPEAT_S] = 0x1d106, // 𝄆
+ [REWIND] = 0x23ee, // ⏮
+ [RHO] = 0x03a1, // Ρ
+ [RIGHT_CEIL] = 0x2309, // ⌉
+ [RIGHT_FLOOR] = 0x230b, // ⌋
+ [RIGHT_OUTER] = 0x27d6, // ⟖
+ [RIGHT_TACK] = 0x22a2, // ⊢
+ [ROOK_B] = 0x265c, // ♜
+ [ROOK_W] = 0x2656, // ♖
+ [ROOT] = 0x221a, // √
+ [ROUGHLY] = 0x2248, // ≈
+ [RTIMES] = 0x22ca, // ⋊
+ [R_SET] = 0x211d, // ℝ
+ [SAMPI] = 0x0372, // Ͳ
+ [SAN] = 0x03fa, // Ϻ
+ [SCHO] = 0x03f7, // Ϸ
+ [SECOND] = 0x02ba, // ʺ
+ [SECTION] = 0x00a7, // §
+ [SEGNO] = 0x1d10b, // 𝄋
+ [SETMINUS] = 0x2216, // ∖
+ [SHARP] = 0x266f, // ♯
+ [SHOGI_B] = 0x2617, // ☗
+ [SHOGI_BD] = 0x26ca, // ⛊
+ [SHOGI_W] = 0x2616, // ☖
+ [SHOGI_WD] = 0x26c9, // ⛉
+ [SIGMA] = 0x03a3, // Σ
+ [SIXT_N] = 0x1d161, // 𝅘𝅥𝅯
+ [SIXT_P] = 0x1d13f, // 𝄿
+ [SNEK] = 0x1f40d, // 🐍
+ [SPADES_B] = 0x2660, // ♠
+ [SPADES_W] = 0x2664, // ♤
+ [SPEAKER_DN] = 0x1f509, // 🔉
+ [SPEAKER_TG] = 0x1f507, // 🔇
+ [SPEAKER_UP] = 0x1f50a, // 🔊
+ [SQT1] = 0x203a, // ›
+ [SQT2] = 0x201a, // ‚
+ [SQT3] = 0x2018, // ‘
+ [SQT4] = 0x2019, // ’
+ [SQT5] = 0x2039, // ‹
+ [SQUARE] = 0x25a1, // □
+ [SQ_LS] = 0x228f, // ⊏
+ [SQ_LS_EQ] = 0x2291, // ⊑
+ [STAFF] = 0x1d11a, // 𝄚
+ [STIGMA] = 0x03da, // Ϛ
+ [STOP] = 0x25fc, // ◼
+ [SUBSET] = 0x2286, // ⊆
+ [SUBSET_REV] = 0x2287, // ⊇
+ [SUCC] = 0x227b, // ≻
+ [SUM_] = 0x2211, // ∑
+ [SUP1] = 0x00b9, // ¹
+ [SUP2] = 0x00b2, // ²
+ [SUP3] = 0x00b3, // ³
+ [SUP_A] = 0x00aa, // ª
+ [SUP_MIN] = 0x207b, // ⁻
+ [SUP_O] = 0x00ba, // º
+ [SZ] = 0x1e9e, // ẞ
+ [TAU] = 0x03a4, // Τ
+ [THETA] = 0x0398, // Θ
+ [TIMES] = 0x00d7, // ×
+ [TIMES_OP] = 0x2297, // ⊗
+ [TMARK] = 0x2122, // ™
+ [TO] = 0x27f6, // ⟶
+ [TOP] = 0x22a4, // ⊤
+ [TRIANGLE] = 0x25b3, // △
+ [UE] = 0x00dc, // Ü
+ [UNION] = 0x222a, // ∪
+ [UNION_] = 0x22c3, // ⋃
+ [U_SET] = 0x1d54c, // 𝕌
+ [WHOLE_N] = 0x1d15d, // 𝅝
+ [WHOLE_P] = 0x1d13b, // 𝄻
+ [XI] = 0x039e, // Ξ
+ [YEN] = 0x00a5, // ¥
+ [YES] = 0x2713, // ✓
+ [YPSI2] = 0x03d2, // ϒ
+ [YPSILON] = 0x03a5, // Υ
+ [ZETA] = 0x0396, // Ζ
+ [Z_SET] = 0x2124, // ℤ
+ [ae] = 0x00e4, // ä
+ [alpha] = 0x03b1, // α
+ [beta] = 0x03b2, // β
+ [beta2] = 0x03d0, // ϐ
+ [chi] = 0x03c7, // χ
+ [delta] = 0x03b4, // δ
+ [digamma] = 0x03dd, // ϝ
+ [e_FUN] = 0x0065, // e
+ [epsi2] = 0x03f5, // ϵ
+ [epsilon] = 0x03b5, // ε
+ [eta] = 0x03b7, // η
+ [gamma] = 0x03b3, // γ
+ [heta] = 0x0371, // ͱ
+ [i_UNIT] = 0x0069, // i
+ [iota] = 0x03b9, // ι
+ [kappa] = 0x03ba, // κ
+ [kappa2] = 0x03f0, // ϰ
+ [koppa] = 0x03d9, // ϙ
+ [lambda] = 0x03bb, // λ
+ [my] = 0x03bc, // μ
+ [n_tilde] = 0x00f1, // ñ
+ [ny] = 0x03bd, // ν
+ [oe] = 0x00f6, // ö
+ [omega] = 0x03c9, // ω
+ [omikron] = 0x03bf, // ο
+ [phi] = 0x03c6, // φ
+ [phi2] = 0x03d5, // ϕ
+ [pi] = 0x03c0, // π
+ [pi2] = 0x03d6, // ϖ
+ [psi] = 0x03c8, // ψ
+ [rho] = 0x03c1, // ρ
+ [rho2] = 0x03f1, // ϱ
+ [sampi] = 0x0373, // ͳ
+ [san] = 0x03fb, // ϻ
+ [scho] = 0x03f8, // ϸ
+ [sigma] = 0x03c3, // σ
+ [sigma2] = 0x03c2, // ς
+ [sigma3] = 0x03f2, // ϲ
+ [stigma] = 0x03db, // ϛ
+ [sz] = 0x00df, // ß
+ [tau] = 0x03c4, // τ
+ [theta] = 0x03b8, // θ
+ [theta2] = 0x03d1, // ϑ
+ [ue] = 0x00fc, // ü
+ [xi] = 0x03be, // ξ
+ [ypsilon] = 0x03c5, // υ
+ [zeta] = 0x03b6 // ζ
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Layer 0
+ * ------------------------------------------------- -------------------------------------------------
+ * | Tab | q | w | e | r | t | | y | u | i | o | p | [ |
+ * ------------------------------------------------- -------------------------------------------------
+ * | LCtrl | a | s | d | f | g | | h | j | k | l | ; | ' |
+ * ------------------------------------------------- -------------------------------------------------
+ * |LShift(| z | x | c | v | b | | n | m | , | . | / |RShift)|
+ * -----------------------------------------------------------------------------------------------------------------
+ * MO2 LGui LAlt | TT2 |LT6_SPC| TT4 | Enter | Space | TT2 | RAlt RGui RCtrl
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ 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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ MO(2), KC_LGUI, KC_LALT, TT(2), LT(6, KC_SPC), TT(4), KC_ENT, KC_SPC, TT(2), KC_RALT, KC_RGUI, KC_RCTRL
+ ),
+
+/* Layer 1
+ * ------------------------------------------------- -------------------------------------------------
+ * | Tab | q | w | f | p | g | | j | l | u | y | ; | [ |
+ * ------------------------------------------------- -------------------------------------------------
+ * | LCtrl | a | r | s | t | d | | h | n | e | i | o | ' |
+ * ------------------------------------------------- -------------------------------------------------
+ * |LShift(| z | x | c | v | b | | k | m | , | . | / |RShift)|
+ * -----------------------------------------------------------------------------------------------------------------
+ * MO2 LGui LAlt | TT2 |LT6_SPC| TT4 | Enter | Space | TT2 | RAlt RGui RCtrl
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC,
+ KC_LCTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ MO(2), KC_LGUI, KC_LALT, TT(2), LT(6, KC_SPC), TT(4), KC_ENT, KC_SPC, TT(2), KC_RALT, KC_RGUI, KC_RCTRL
+ ),
+
+/* Layer 2
+ * ------------------------------------------------- -------------------------------------------------
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ] |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | DF0 | DF1 | XXX | XXX | MO3 | | 4 | 4 | 5 | 6 | - | = |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX | XXX | XXX | XXX | MO5 | | 1 | 1 | 2 | 3 | \ | |
+ * -----------------------------------------------------------------------------------------------------------------
+ * TG2 | | Del | | |BSpace | 0 |
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC,
+ KC_TRNS, DF(0), DF(1), XXXXXXX, XXXXXXX, MO(3), KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL,
+ KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(5), KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
+ TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_0, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+/* Layer 3
+ * ------------------------------------------------- -------------------------------------------------
+ * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | XXX |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX | XXX | XXX | XXX | MO3 | | F4 | F4 | F5 | F6 | XXX | XXX |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX | XXX | XXX | XXX | XXX | | F1 | F1 | F2 | F3 | XXX | |
+ * -----------------------------------------------------------------------------------------------------------------
+ * TG3 | | | | F10 | F11 | F12 |
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
+ KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(3), KC_F4, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX,
+ KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_TRNS,
+ TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+/* Layer 4
+ * ------------------------------------------------- -------------------------------------------------
+ * | Esc | Esc | Tab x | Tab n |CPg Dn |CPg Dn | |Pg Down| Home |^ Arrow|Insert |SInsert| Esc |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | Caps | < Gui |Gui Tab| > Gui | > Gui | |< Arrow|< Arrow|v Arrow|> Arrow| End |Pr Scr |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX | XXX | XXX |CPg Up |CPg Up | | Pg Up | XXX |v Arrow| XXX | App | |
+ * -----------------------------------------------------------------------------------------------------------------
+ * TG4 | | Del | | |BSpace | |
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), CTL_T(KC_PGDN), CTL_T(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, SFT_T(KC_INS), KC_ESC,
+ KC_TRNS, KC_CAPS, LGUI_T(KC_LEFT), LGUI_T(KC_TAB), LGUI_T(KC_RIGHT), LGUI_T(KC_RIGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, KC_PSCR,
+ KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, CTL_T(KC_PGUP), CTL_T(KC_PGUP), KC_PGUP, XXXXXXX, KC_DOWN, XXXXXXX, KC_APP, KC_TRNS,
+ TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+/* Layer 5
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX |play/ps| Vol + | Vol + | XXX | | XXX | XXX | XXX | XXX |_reset | Power |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX | |<< | Vol 0 | >>| | XXX | | XXX | XXX | XXX | XXX | XXX | Sleep |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | XXX | XXX | Vol - | Vol - | MO5 | | XXX | XXX | XXX | XXX | XXX | XXX |
+ * -----------------------------------------------------------------------------------------------------------------
+ * TG5 | | | | | | |
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ KC_TRNS, XXXXXXX, KC_MPLY, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_PWR,
+ KC_TRNS, XXXXXXX, KC_MPRV, KC_MUTE, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP,
+ KC_TRNS, XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLD, MO(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ TG(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+/* Layer 6
+ * ------------------------------------------------- -------------------------------------------------
+ * | | acc1 | XXX | XXX | XXX | XXX | |^ Wheel|< Wheel|^ Mouse|> Wheel| XXX | XXX |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | acc2 |Mouse 3|Mouse 2|Mouse 1|Mouse 1| |< Mouse|< Mouse|v Mouse|> Mouse| XXX | XXX |
+ * ------------------------------------------------- -------------------------------------------------
+ * | | acc0 | XXX | XXX | XXX | XXX | |v Wheel| XXX |v Mouse| XXX | XXX | |
+ * -----------------------------------------------------------------------------------------------------------------
+ * TG6 | | | | | | |
+ * -------------------------------------------------
+ */
+ LAYOUT_ortho_4x12(
+ KC_TRNS, KC_ACL1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX,
+ KC_TRNS, KC_ACL2, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_MS_L, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX,
+ KC_TRNS, KC_ACL0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, KC_TRNS,
+ TG(6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
+};
+
+/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et
+ */
diff --git a/keyboards/signum/3_0/elitec/keymaps/default/km_template.txt b/keyboards/signum/3_0/elitec/keymaps/default/km_template.txt
new file mode 100644
index 00000000000..47b35ee5149
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/keymaps/default/km_template.txt
@@ -0,0 +1,20 @@
+/* keymap.c is auto-generated, don't edit it directly.
+ * Further instructions are provided in readme.md */
+
+#include QMK_KEYBOARD_H
+
+enum unicode_name {
+//
+};
+
+const uint32_t PROGMEM unicode_map[] = {
+//
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+//
+};
+
+/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et
+ */
diff --git a/keyboards/signum/3_0/elitec/keymaps/default/layout.py b/keyboards/signum/3_0/elitec/keymaps/default/layout.py
new file mode 100644
index 00000000000..323a5832126
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/keymaps/default/layout.py
@@ -0,0 +1,493 @@
+from sortedcontainers import SortedDict
+
+# Add all used Unicode symbols to this list.
+# The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name.
+# The key is also used in this file to define the layout, so use recognizeable names.
+# The value (e.g. "0x1f40d") is used in keymap.c for "unicode_map" and to automatically generate the "ASCII"-art comments.
+# When adding new Unicode names, use "0x1f40d" until you looked up the correct Unicode code point.
+uc_dict = SortedDict({
+ "SNEK": "0x1f40d", ## Error
+ ## qwertz
+ "ACUTE": "0x00b4",
+ ## QWERTZ
+ "INV_EXCL": "0x00a1",
+ "INV_QST": "0x00bf",
+ ## numpad
+ "SUP1": "0x00b9",
+ "SUP2": "0x00b2",
+ "SUP3": "0x00b3",
+ "SUP_MIN": "0x207b",
+ "ROOT": "0x221a",
+ "DEGREE": "0x00b0",
+ "MINUTE": "0x02b9",
+ "SECOND": "0x02ba",
+ "CURRENCY": "0x00a4",
+ "CENT": "0x00a2",
+ "YEN": "0x00a5",
+ "POUND": "0x00a3",
+ "EURO": "0x20ac",
+ "DIVISION": "0x00f7",
+ "MICRO": "0x00b5",
+ "OHM": "0x2126",
+ "BITCOIN": "0x20bf",
+ "SECTION": "0x00a7",
+ ## NAV_TYPO
+ "SQT1": "0x203a",
+ "SQT2": "0x201a",
+ "SQT3": "0x2018",
+ "SQT4": "0x2019",
+ "SQT5": "0x2039",
+ "SUP_A": "0x00aa",
+ "SUP_O": "0x00ba",
+ "TMARK": "0x2122",
+ "COPYR": "0x00a9",
+ "REGTM": "0x00ae",
+ "DOTS": "0x2026",
+ "CROSS": "0x2020",
+ "BULLET": "0x2022",
+ "EMDASH": "0x2014",
+ "PERMIL": "0x2030",
+ "DQT1": "0x00bb",
+ "DQT2": "0x201e",
+ "DQT3": "0x201c",
+ "DQT4": "0x201d",
+ "DQT5": "0x00ab",
+ ## lang
+ "ae": "0x00e4",
+ "oe": "0x00f6",
+ "ue": "0x00fc",
+ "sz": "0x00df",
+ "n_tilde": "0x00f1",
+ ## LANG
+ "AE": "0x00c4",
+ "OE": "0x00d6",
+ "UE": "0x00dc",
+ "SZ": "0x1e9e",
+ "N_TILDE": "0x00d1",
+ ## greek
+ "alpha": "0x03b1",
+ "beta": "0x03b2",
+ "gamma": "0x03b3",
+ "delta": "0x03b4",
+ "epsilon": "0x03b5",
+ "zeta": "0x03b6",
+ "eta": "0x03b7",
+ "theta": "0x03b8",
+ "iota": "0x03b9",
+ "kappa": "0x03ba",
+ "lambda": "0x03bb",
+ "my": "0x03bc",
+ "ny": "0x03bd",
+ "xi": "0x03be",
+ "omikron": "0x03bf",
+ "pi": "0x03c0",
+ "rho": "0x03c1",
+ "sigma": "0x03c3",
+ "tau": "0x03c4",
+ "ypsilon": "0x03c5",
+ "phi": "0x03c6",
+ "chi": "0x03c7",
+ "psi": "0x03c8",
+ "omega": "0x03c9",
+ # variants
+ "beta2": "0x03d0",
+ "epsi2": "0x03f5",
+ "theta2": "0x03d1",
+ "kappa2": "0x03f0",
+ "pi2": "0x03d6",
+ "rho2": "0x03f1",
+ "sigma2": "0x03c2",
+ "sigma3": "0x03f2",
+ "phi2": "0x03d5",
+ # non-standard
+ "digamma": "0x03dd",
+ "stigma": "0x03db",
+ "heta": "0x0371",
+ "san": "0x03fb",
+ "koppa": "0x03d9",
+ "sampi": "0x0373",
+ "scho": "0x03f8",
+ ## GREEK
+ "ALPHA": "0x0391",
+ "BETA": "0x0392",
+ "GAMMA": "0x0393",
+ "DELTA": "0x0394",
+ "EPSILON": "0x0395",
+ "ZETA": "0x0396",
+ "ETA": "0x0397",
+ "THETA": "0x0398",
+ "IOTA": "0x0399",
+ "KAPPA": "0x039a",
+ "LAMBDA": "0x039b",
+ "MY": "0x039c",
+ "NY": "0x039d",
+ "XI": "0x039e",
+ "OMIKRON": "0x039f",
+ "PI": "0x03a0",
+ "RHO": "0x03a1",
+ "SIGMA": "0x03a3",
+ "TAU": "0x03a4",
+ "YPSILON": "0x03a5",
+ "PHI": "0x03a6",
+ "CHI": "0x03a7",
+ "PSI": "0x03a8",
+ "OMEGA": "0x03a9",
+ # variants
+ "YPSI2": "0x03d2",
+ # non-standard
+ "DIGAMMA": "0x03dc",
+ "STIGMA": "0x03da",
+ "HETA": "0x0370",
+ "SAN": "0x03fa",
+ "KOPPA": "0x03d8",
+ "SAMPI": "0x0372",
+ "SCHO": "0x03f7",
+ ## symbol
+ "SHOGI_WD": "0x26c9",
+ "FLAG_W": "0x2690",
+ "LETTER": "0x2709",
+ "PHONE": "0x2706",
+ "INFO": "0x1f6c8",
+ "REWIND": "0x23ee",
+ "PLAY": "0x23ef",
+ "FORWARD": "0x23ed",
+ "STOP": "0x25fc",
+ "EJECT": "0x23cf",
+ "SHOGI_W": "0x2616",
+ "FEMALE": "0x2640",
+ "MALE": "0x2642",
+ "NO": "0x2717",
+ "YES": "0x2713",
+ "FLAT": "0x266d",
+ "NATURAL": "0x266e",
+ "SHARP": "0x266f",
+ "COMMON_T": "0x1d134",
+ "ALLA_BR": "0x1d135",
+ "PAWN_W": "0x2659",
+ "DIAMS_W": "0x2662",
+ "HEARTS_W": "0x2661",
+ "SPADES_W": "0x2664",
+ "CLUBS_W": "0x2667",
+ "WHOLE_N": "0x1d15d",
+ "HALF_N": "0x1d15e",
+ "QUART_N": "0x1d15f",
+ "EIGHTH_N": "0x1d160",
+ "SIXT_N": "0x1d161",
+ "ROOK_W": "0x2656",
+ "KNIGHT_W": "0x2658",
+ "BISHOP_W": "0x2657",
+ "QUEEN_W": "0x2655",
+ "KING_W": "0x2654",
+ "C_CLEF": "0x1d121",
+ "G_CLEF": "0x1d11e",
+ "F_CLEF": "0x1d122",
+ "PEDAL": "0x1d1ae",
+ "PEDAL_UP": "0x1d1af",
+ ## SYMBOL
+ "SHOGI_BD": "0x26ca",
+ "FLAG_B": "0x2691",
+ "SPEAKER_UP": "0x1f50a",
+ "SPEAKER_TG": "0x1f507",
+ "SPEAKER_DN": "0x1f509",
+ "SHOGI_B": "0x2617",
+ "KEY": "0x1f511",
+ "LOCK": "0x1f512",
+ "LOCK_OPEN": "0x1f513",
+ "STAFF": "0x1d11a",
+ "BARLINE": "0x1d100",
+ "BARLINE_D": "0x1d101",
+ "BARLINE_FIN": "0x1d102",
+ "CODA": "0x1d10c",
+ "PAWN_B": "0x265f",
+ "DIAMS_B": "0x2666",
+ "HEARTS_B": "0x2665",
+ "SPADES_B": "0x2660",
+ "CLUBS_B": "0x2663",
+ "WHOLE_P": "0x1d13b",
+ "HALF_P": "0x1d13c",
+ "QUART_P": "0x1d13d",
+ "EIGHTH_P": "0x1d13e",
+ "SIXT_P": "0x1d13f",
+ "ROOK_B": "0x265c",
+ "KNIGHT_B": "0x265e",
+ "BISHOP_B": "0x265d",
+ "QUEEN_B": "0x265b",
+ "KING_B": "0x265a",
+ "REPEAT_S": "0x1d106",
+ "REPEAT_E": "0x1d107",
+ "SEGNO": "0x1d10b",
+ "DALSEGNO": "0x1d109",
+ "DACAPO": "0x1d10a",
+ ## math
+ "EXISTS": "0x2203",
+ "FORALL": "0x2200",
+ "EQUIV": "0x2261",
+ "CORRESP": "0x2259",
+ "INEQUAL": "0x2260",
+ "DEFINE": "0x2254",
+ "TO": "0x27f6",
+ "MAPSTO": "0x27fc",
+ "SETMINUS": "0x2216",
+ "QED": "0x220e",
+ "OR_": "0x22c1",
+ "AND_": "0x22c0",
+ "OR": "0x2228",
+ "AND": "0x2227",
+ "NOT": "0x00ac",
+ "BICOND": "0x21d4",
+ "IMPL_REV": "0x21d0",
+ "IMPL": "0x21d2",
+ "TOP": "0x22a4",
+ "BOTTOM": "0x22a5",
+ "SUM_": "0x2211",
+ "PROD_": "0x220f",
+ "MDOT": "0x22c5",
+ "NOTIN": "0x2209",
+ "IN": "0x2208",
+ "LS_EQ": "0x2264",
+ "GR_EQ": "0x2265",
+ "INFTY": "0x221e",
+ "UNION_": "0x22c3",
+ "INTERS_": "0x22c2",
+ "UNION": "0x222a",
+ "INTERS": "0x2229",
+ "NOTSUBS": "0x2288",
+ "PR_SUBSET": "0x2282",
+ "SUBSET": "0x2286",
+ "SUBSET_REV": "0x2287",
+ "EMPTYSET": "0x2205",
+ ## MATHSCRIPT
+ "LEFT_CEIL": "0x2308",
+ "REAL_P": "0x211c",
+ "NABLA": "0x2207",
+ "RIGHT_CEIL": "0x2309",
+ "LEFT_FLOOR": "0x230a",
+ "BRA": "0x27e8",
+ "IMAG_P": "0x2111",
+ "KET": "0x27e9",
+ "RIGHT_FLOOR": "0x230b",
+ "Q_SET": "0x211a",
+ "e_FUN": "0x0065",
+ "R_SET": "0x211d",
+ "Z_SET": "0x2124",
+ "U_SET": "0x1d54c",
+ "i_UNIT": "0x0069",
+ "BIG_O": "0x1d4aa",
+ "POWERSET": "0x1d4ab",
+ "A_SET": "0x1d538",
+ "INTEGRAL": "0x222b",
+ "PARTIAL": "0x2202",
+ "F_SET": "0x1d53d",
+ "H_SET": "0x210d",
+ "K_SET": "0x1d542",
+ "LENGTH": "0x2113",
+ "ALEPH": "0x2135",
+ "BETH": "0x2136",
+ "C_SET": "0x2102",
+ "B_SET": "0x1d539",
+ "N_SET": "0x2115",
+ "INDICATOR": "0x1d7cf",
+ "FOURIER": "0x2131",
+ "HAMILTON": "0x210b",
+ "LAPLACE": "0x2112",
+ ## MATHEXT
+ "RIGHT_TACK": "0x22a2",
+ "MODELS": "0x22a7",
+ "AB_VEC": "0x20d7",
+ "AB_LINE": "0x0305",
+ "AB_ARC": "0x0361",
+ "LESS_LESS": "0x226a",
+ "PRED": "0x227a",
+ "EMBED": "0x21aa",
+ "SUCC": "0x227b",
+ "GREAT_GREAT": "0x226b",
+ "TRIANGLE": "0x25b3",
+ "SQUARE": "0x25a1",
+ "CIRCLE": "0x25cb",
+ "DOT_OP": "0x2299",
+ "PLUS_OP": "0x2295",
+ "MINUS_OP": "0x2296",
+ "ROUGHLY": "0x2248",
+ "ISOMORPH": "0x2245",
+ "LTIMES": "0x22c9",
+ "RTIMES": "0x22ca",
+ "BOWTIE": "0x22c8",
+ "M_ANGLE": "0x2221",
+ "ANGLE": "0x2220",
+ "CIRC_MID": "0x2218",
+ "AST_MID": "0x2217",
+ "TIMES": "0x00d7",
+ "PLUS_MINUS": "0x00b1",
+ "MINUS_PLUS": "0x2213",
+ "LEFT_OUTER": "0x27d5",
+ "RIGHT_OUTER": "0x27d6",
+ "FULL_OUTER": "0x27d7",
+ "SQ_LS": "0x228f",
+ "SQ_LS_EQ": "0x2291",
+ "PROP_TO": "0x221d",
+ "PARALLEL": "0x2225",
+ "NOT_PARA": "0x2226",
+ "TIMES_OP": "0x2297",
+ "NOT_DIV": "0x2224"
+})
+
+# Add all used Keycodes to this list.
+# The key (e.g. "a") is used in keymap.c to automatically generate the comments. The first 7 chars will show as a keycap legend.
+qmk_dict = {
+ # test cases (These are handled in generate_km.py within toKC() and toLgd(), so these definitions will be ignored.
+ # If you find "BAD" in your keymaps, then something went wrong.)
+ "a": "BAD", "A": "BAD", "0": "BAD",
+ # Basic Keycodes
+ "XXX": "XXXXXXX", "": "KC_TRNS",
+ "!": "S(KC_1)", "@": "S(KC_2)", "#": "S(KC_3)", "$": "S(KC_4)", "%": "S(KC_5)",
+ "^": "S(KC_6)", "&": "S(KC_7)", "*": "S(KC_8)", "(": "S(KC_9)", ")": "S(KC_0)",
+ "Enter": "KC_ENT", "Esc": "KC_ESC", "BSpace": "KC_BSPC", "Tab": "KC_TAB",
+ "Space": "KC_SPC", "-": "KC_MINS", "_": "S(KC_MINS)", "=": "KC_EQL",
+ "+": "S(KC_EQL)", "[": "KC_LBRC", "{": "S(KC_LBRC)", "]": "KC_RBRC",
+ "}": "S(KC_RBRC)", "\\": "KC_BSLS", "|": "S(KC_BSLS)", ";": "KC_SCLN",
+ ":": "S(KC_SCLN)", "'": "KC_QUOT", "\"": "S(KC_QUOT)", "`": "KC_GRV",
+ "~": "S(KC_GRV)", ",": "KC_COMM", "<": "S(KC_COMM)", ".": "KC_DOT",
+ ">": "S(KC_DOT)", "/": "KC_SLSH", "?": "S(KC_SLSH)", "Caps": "KC_CAPS",
+ "Pr Scr": "KC_PSCR", "Scr Lck": "KC_SLCK", "Pause": "KC_BRK", "Insert": "KC_INS", "SInsert": "SFT_T(KC_INS)",
+ "Home": "KC_HOME", "Pg Up": "KC_PGUP", "Del": "KC_DEL", "End": "KC_END",
+ "Pg Down": "KC_PGDN", "> Arrow": "KC_RIGHT", "< Arrow": "KC_LEFT",
+ "v Arrow": "KC_DOWN", "^ Arrow": "KC_UP",
+ # Keypad keycodes missing
+ "App": "KC_APP", "Menu": "KC_MENU",
+ # Command keycodes missing (Execute, Help, ..., Find)
+ # Basic Keycodes missing from Print Screen onwards, included as fallback
+ # random Keycodes
+ "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTRL", "RCtrl": "KC_RCTRL",
+ "LShift(": "KC_LSPO", "RShift)": "KC_RSPC",
+ "L1_ENT": "LT(1, KC_ENT)", "LT6_SPC": "LT(6, KC_SPC)",
+ "CPg Dn": "CTL_T(KC_PGDN)", "CPg Up": "CTL_T(KC_PGUP)",
+ "S_Enter": "S(KC_ENT)", "S_Tab": "S(KC_TAB)", "Compose": "KC_ALGR",
+ "RShift": "KC_RSFT",
+ "Vol 0": "KC_MUTE", "Vol +": "KC_VOLU", "Vol -": "KC_VOLD",
+ ">>|": "KC_MNXT", "|<<": "KC_MPRV", "play/ps": "KC_MPLY",
+ "Bri +": "KC_BRIU", "Bri -": "KC_BRID",
+ # Quantum Keycodes
+ "_reset": "RESET", "_debug": "DEBUG", "_eep_re": "EEP_RST",
+ # Audio Keys missing
+ # Backlighting
+ "Led 0": "BL_TOGG", "Led +": "BL_INC", "Led -": "BL_DEC", "Led ~": "BL_BRTG",
+ # Bootmagic missing
+ # Bluetooth
+ "OUT_AUTO": "OUT_AUTO", "OUT_USB": "OUT_USB", "OUT_BT": "OUT_BT",
+ # Layer Switching missing, Lx -> MO(x), Tx -> TG(x)
+ "qwertz": "DF(0)", "neo": "DF(2)",
+ # Mouse Keys
+ "^ Mouse": "KC_MS_U", "v Mouse": "KC_MS_D", "< Mouse": "KC_MS_L",
+ "> Mouse": "KC_MS_R", "Mouse 1": "KC_BTN1", "Mouse 2": "KC_BTN2",
+ "Mouse 3": "KC_BTN3", "Mouse 4": "KC_BTN4", "Mouse 5": "KC_BTN5",
+ "^ Wheel": "KC_WH_U", "v Wheel": "KC_WH_D", "< Wheel": "KC_WH_L",
+ "> Wheel": "KC_WH_R", "acc0": "KC_ACL0", "acc1": "KC_ACL1",
+ "acc2": "KC_ACL2",
+ # Modifiers missinng, add entry for each specific application
+ # Mod-Tap Keys missing, add entry for each specific application
+ "_Sh_swp": "LSFT_T(SH_TG)",
+ # RGB Lighting missing
+ # RGB Matrix Lighting missing
+ # Thermal Printer missing
+ # US ANSI Shifted Symbols done via S(), don't add KC_entries
+ # One Shot Keys missing
+ # Swap Hands
+ "_sp_swp": "SHT(KC_SPC)",
+ # Unicode support (via X()) included implicitly
+ # Switching Unicode Input Modes
+ "UC_win": "UC_M_WC", "UC_lnx": "UC_M_LN", "UC_osx": "UC_M_OS",
+
+ # custom keys
+ "altF4": "LALT(KC_F4)",
+ "Undo": "LCTL(KC_Z)", "Cut": "LCTL(KC_X)", "Copy": "LCTL(KC_C)", "Paste": "LCTL(KC_V)",
+ "< Tab": "LCTL(S(KC_TAB))", "> Tab": "LCTL(KC_TAB)",
+ "Tab x": "LCTL(KC_W)", "Tab n": "LCTL(KC_T)",
+ "Gui Tab": "LGUI_T(KC_TAB)", "< Gui": "LGUI_T(KC_LEFT)", "> Gui": "LGUI_T(KC_RIGHT)",
+ "C+A+Del": "LCTL(LALT(KC_DEL))", "Mic 0": "LCTL(KC_M)",
+ "Power": "KC_PWR", "Sleep": "KC_SLEP",
+
+ # macros
+ "Macro 1": "KC_1", "Macro 2": "KC_2", "Macro 3": "KC_3", "Macro 4": "KC_4", "Macro 5": "KC_5",
+
+ # custom layers
+ "GREEK": "GREEK",
+ "SYMBOL": "SYMBOL",
+ "MATH": "MATH",
+ "GAME": "GAME",
+ "MOUSE": "MOUSE",
+ "NEO": "TG(2)"
+}
+
+# These keys are repeated in all layers.
+# Generate a keymap.c with the python script and refer to the "ASCII"-art comments, to see which positions this concerns.
+# If you want to put different keycodes in these positions for different layers, you need to modify the python script by yourself.
+static = ["NEO", "GREEK", "GREEK", "GREEK", "GREEK", "MOUSE"]
+
+# mutex_layers = {"GREEK": 8, "GAME": 10, "MOUSE": 11}
+# layer_graph = ...
+
+# 0
+qwerty = [
+ ["Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "["],
+ ["LCtrl", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'"],
+ ["LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)"],
+ ["MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl"],
+ ]
+
+# 1
+colemak = [
+ ["Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "["],
+ ["LCtrl", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'"],
+ ["LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)"],
+ ["MO2", "LGui", "LAlt", "TT2", "LT6_SPC", "TT4", "Enter", "Space", "TT2", "RAlt", "RGui", "RCtrl"],
+ ]
+
+# 2
+numpad = [
+ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]"],
+ ["", "DF0", "DF1", "XXX", "XXX", "MO3", "4", "4", "5", "6", "-", "="],
+ ["", "XXX", "XXX", "XXX", "XXX", "MO5", "1", "1", "2", "3", "\\", ""],
+ ["TG2", "", "", "", "Del", "", "", "BSpace", "0", "", "", ""],
+ ]
+
+# 3
+fpad = [
+ ["", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX"],
+ ["", "XXX", "XXX", "XXX", "XXX", "MO3", "F4", "F4", "F5", "F6", "XXX", "XXX"],
+ ["", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "XXX", ""],
+ ["TG3", "", "", "", "", "", "F10", "F11", "F12", "", "", ""],
+ ]
+
+# 4
+movement = [
+ ["Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc"],
+ ["", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr"],
+ ["", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "XXX", "v Arrow", "XXX", "App", ""],
+ ["TG4", "", "", "", "Del", "", "", "BSpace", "", "", "", ""],
+ ]
+
+# 5
+media = [
+ ["", "XXX", "play/ps", "Vol +", "Vol +", "XXX", "XXX", "XXX", "XXX", "XXX", "_reset", "Power"],
+ ["", "XXX", "|<<", "Vol 0", ">>|", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "Sleep"],
+ ["", "XXX", "XXX", "Vol -", "Vol -", "MO5", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX"],
+ ["TG5", "", "", "", "", "", "", "", "", "", "", ""],
+ ]
+
+# 6
+mouse = [
+ ["", "acc1", "XXX", "XXX", "XXX", "XXX", "^ Wheel", "< Wheel", "^ Mouse", "> Wheel", "XXX", "XXX"],
+ ["", "acc2", "Mouse 3", "Mouse 2", "Mouse 1", "Mouse 1", "< Mouse", "< Mouse", "v Mouse", "> Mouse", "XXX", "XXX"],
+ ["", "acc0", "XXX", "XXX", "XXX", "XXX", "v Wheel", "XXX", "v Mouse", "XXX", "XXX", ""],
+ ["TG6", "", "", "", "", "", "", "", "", "", "", ""],
+ ]
+
+layers = [
+ qwerty,
+ colemak,
+ numpad,
+ fpad,
+ movement,
+ media,
+ mouse
+ ]
diff --git a/keyboards/signum/3_0/elitec/keymaps/default/readme.md b/keyboards/signum/3_0/elitec/keymaps/default/readme.md
new file mode 100644
index 00000000000..efd43a9bf9e
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/keymaps/default/readme.md
@@ -0,0 +1,27 @@
+# Default layout
+
+Layout created by: [Jan Christoph Ebersbach](https://github.com/jceb)
+
+The `generate_km.py` file automatically generates `keymap.c` with
+additional comments that visually represent the layout.
+
+This layout is maintained as I am using it. You can also use it as a
+starting point to create your own layouts for the Signum 3.0 with
+`km_template.txt` and `generate_km.py`.
+
+# Customization
+
+- Install `python3` and [Sorted Containers
+ Library](http://www.grantjenks.com/docs/sortedcontainers/), `pip
+ install sortedcontainers`.
+
+- Customize `layout.py` to your liking.
+ - Attention 1: keycodes are either translated into symbols and
+ function calls via the `translate()` function in `generate_km.py`
+ or via user-defined mappings in the dictionary `qmk_dict` in
+ `layout.py`. Especially the latter might require adjustment for
+ uncommon qmk features
+ - Attention 2: additional C functions need to be put into
+ `km_template.txt`
+
+Run `./generate_km.py` to regenerate `keymap.c`.
diff --git a/keyboards/signum/3_0/elitec/keymaps/default/rules.mk b/keyboards/signum/3_0/elitec/keymaps/default/rules.mk
new file mode 100644
index 00000000000..502b2def762
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/keymaps/default/rules.mk
@@ -0,0 +1 @@
+UNICODEMAP_ENABLE = yes
diff --git a/keyboards/signum/3_0/elitec/readme.md b/keyboards/signum/3_0/elitec/readme.md
new file mode 100644
index 00000000000..f60023f6d57
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/readme.md
@@ -0,0 +1,14 @@
+# Signum 3.0
+
+
+
+An ergonomic 40% PCB.
+
+Keyboard Maintainer: [Troy Fletcher](http://troyfletcher.net/)
+Hardware available here: [Troy Fletcher](http://troyfletcher.net/keyboard_sales.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make signum/3_0/elitec:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/signum/3_0/elitec/rules.mk b/keyboards/signum/3_0/elitec/rules.mk
new file mode 100644
index 00000000000..6a68eb443bc
--- /dev/null
+++ b/keyboards/signum/3_0/elitec/rules.mk
@@ -0,0 +1,64 @@
+# 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
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = lite # 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 = no
+
+UNICODEMAP_ENABLE = no
+
+LAYOUTS = ortho_4x12
diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h
index 54cacee2e90..aca1153d714 100644
--- a/keyboards/singa/config.h
+++ b/keyboards/singa/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -25,7 +24,7 @@ along with this program. If not, see .
#define MANUFACTURER Singa Keyboards
#define PRODUCT Singa
-#define RGBLED_NUM 16
+#define RGBLED_NUM 18
#define MATRIX_ROWS 7
#define MATRIX_COLS 15
@@ -40,7 +39,3 @@ along with this program. If not, see .
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-
-#endif
diff --git a/keyboards/singa/i2c.c b/keyboards/singa/i2c.c
deleted file mode 100644
index e8c4455ad1b..00000000000
--- a/keyboards/singa/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro
-
-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 .
-*/
-
-// Please do not modify this file
-
-#include
-#include
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<
-
-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 .
-*/
-
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/singa/keymaps/amnesia0287/config.h b/keyboards/singa/keymaps/amnesia0287/config.h
index 0f756350514..e176ed34798 100644
--- a/keyboards/singa/keymaps/amnesia0287/config.h
+++ b/keyboards/singa/keymaps/amnesia0287/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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
diff --git a/keyboards/singa/keymaps/amnesia0287/keymap.c b/keyboards/singa/keymaps/amnesia0287/keymap.c
index cb0ceac1a81..dc52122db6b 100644
--- a/keyboards/singa/keymaps/amnesia0287/keymap.c
+++ b/keyboards/singa/keymaps/amnesia0287/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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
diff --git a/keyboards/singa/keymaps/default/config.h b/keyboards/singa/keymaps/default/config.h
index 4496c591006..93b81b57ba4 100644
--- a/keyboards/singa/keymaps/default/config.h
+++ b/keyboards/singa/keymaps/default/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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
diff --git a/keyboards/singa/keymaps/default/keymap.c b/keyboards/singa/keymaps/default/keymap.c
index d201f413b77..7beef8a64d8 100644
--- a/keyboards/singa/keymaps/default/keymap.c
+++ b/keyboards/singa/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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
diff --git a/keyboards/singa/keymaps/test/config.h b/keyboards/singa/keymaps/test/config.h
index 0f756350514..e176ed34798 100644
--- a/keyboards/singa/keymaps/test/config.h
+++ b/keyboards/singa/keymaps/test/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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
diff --git a/keyboards/singa/keymaps/test/keymap.c b/keyboards/singa/keymaps/test/keymap.c
index 30f8de3b3de..a8f31b49c19 100644
--- a/keyboards/singa/keymaps/test/keymap.c
+++ b/keyboards/singa/keymaps/test/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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
diff --git a/keyboards/singa/matrix.c b/keyboards/singa/matrix.c
deleted file mode 100644
index 245813dfd2d..00000000000
--- a/keyboards/singa/matrix.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro
-
-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 .
-*/
-
-#include
-#include
-
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_set_row_status(uint8_t row);
-uint8_t bit_reverse(uint8_t x);
-
-void matrix_init(void) {
- // all outputs for rows high
- DDRB = 0xFF;
- PORTB = 0xFF;
- // all inputs for columns
- DDRA = 0x00;
- DDRC &= ~(0x111111<<2);
- DDRD &= ~(1< 7
- (~PINA) & 0xFF
- ) | (
- // cols 8..13, PORTC 7 -> 0
- bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
- );
-
- if (matrix_debouncing[row] != cols) {
- matrix_debouncing[row] = cols;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-// declarations
-void matrix_set_row_status(uint8_t row) {
- DDRB = (1 << row);
- PORTB = ~(1 << row);
-}
-
-uint8_t bit_reverse(uint8_t x) {
- x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
- return x;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/keyboards/singa/readme.md b/keyboards/singa/readme.md
index bdde361a8e7..4400717c800 100644
--- a/keyboards/singa/readme.md
+++ b/keyboards/singa/readme.md
@@ -4,7 +4,7 @@

-A short description of the keyboard/project
+75% Custom Keyboard.
Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287)
@@ -38,9 +38,9 @@ macOS:
```
3. Install the following packages:
```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
diff --git a/keyboards/singa/rules.mk b/keyboards/singa/rules.mk
index 68d50aec67a..7e46696891c 100644
--- a/keyboards/singa/rules.mk
+++ b/keyboards/singa/rules.mk
@@ -31,20 +31,18 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = yes
+BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
-BACKLIGHT_ENABLE = no
-RGBLIGHT_ENABLE = no
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c
index 0f5ec471a8e..26a7e463751 100644
--- a/keyboards/singa/singa.c
+++ b/keyboards/singa/singa.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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,32 +13,57 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include QMK_KEYBOARD_H
-
-#include
-#include "action_layer.h"
-#include "i2c.h"
+#include "rgblight.h"
+#include "i2c_master.h"
#include "quantum.h"
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
-// for keyboard subdirectory level init functions
-// @Override
-void matrix_init_kb(void) {
- // call user level keymaps, if any
- matrix_init_user();
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ }
+ }
+
+ i2c_init();
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
+#endif
-void matrix_scan_kb(void) {
- matrix_scan_user();
- /* Nothing else for now. */
-}
-
-__attribute__((weak)) // overridable
-void matrix_init_user(void) {
-
-}
-
-__attribute__((weak)) // overridable
+__attribute__ ((weak))
void matrix_scan_user(void) {
-
+}
+
+void backlight_init_ports(void) {
+ // initialize pins D0, D1, D4 and D6 as output
+ setPinOutput(D0);
+ setPinOutput(D1);
+ setPinOutput(D4);
+ setPinOutput(D6);
+
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+}
+
+void backlight_set(uint8_t level) {
+ if (level == 0) {
+ // turn RGB LEDs off
+ writePinLow(D0);
+ writePinLow(D1);
+ writePinLow(D4);
+ writePinLow(D6);
+ } else {
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+ }
}
diff --git a/keyboards/singa/singa.h b/keyboards/singa/singa.h
index 8221176c156..03b68488860 100644
--- a/keyboards/singa/singa.h
+++ b/keyboards/singa/singa.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+/* Copyright 2018 amnesia0287
*
* 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,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef SINGA_H
-#define SINGA_H
+#pragma once
#include "quantum.h"
@@ -139,5 +138,3 @@
{ k74, k81, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, k82, KC_NO, k78, k79, k80 }, \
{ 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, k15, k30 } \
}
-
-#endif
diff --git a/keyboards/singa/usbconfig.h b/keyboards/singa/usbconfig.h
index d2d848fcdc8..54a7d20f142 100644
--- a/keyboards/singa/usbconfig.h
+++ b/keyboards/singa/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/sol/common/glcdfont.c b/keyboards/sol/common/glcdfont.c
index df55fa69d47..f772e31811b 100644
--- a/keyboards/sol/common/glcdfont.c
+++ b/keyboards/sol/common/glcdfont.c
@@ -1,8 +1,4 @@
-// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
-// See gfxfont.h for newer custom bitmap font info.
-
-#ifndef FONT5X7_H
-#define FONT5X7_H
+#pragma once
#ifdef __AVR__
#include
@@ -13,7 +9,8 @@
#define PROGMEM
#endif
-// Standard ASCII 5x7 font
+// Helidox 8x6 font with RGBKB SOL Logo
+// Online editor: http://teripom.x0.com/
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -144,27 +141,27 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
- 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x0C, 0x90,
0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE,
0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC,
0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4,
0xC4, 0x70, 0x10, 0x10, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0xC0, 0xC0, 0x80, 0x80, 0x02,
- 0x85, 0x85, 0x87, 0x85, 0x89, 0x89,
- 0x92, 0xEA, 0xC6, 0xC4, 0x48, 0x50,
- 0x60, 0x40, 0x40, 0x40, 0x40, 0xC0,
- 0xE0, 0x50, 0x28, 0x10, 0x10, 0x60,
- 0xC0, 0x40, 0x40, 0x40, 0x40, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0xE0, 0xF8,
- 0xFC, 0xF8, 0xF0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
+ 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85,
+ 0x85, 0x87, 0x85, 0x89, 0x89, 0x92,
+ 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60,
+ 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0,
+ 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0,
+ 0x40, 0x40, 0x40, 0x40, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC,
+ 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
@@ -173,15 +170,15 @@ static const unsigned char font[] PROGMEM = {
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
+ 0x00, 0x00, 0x00, 0xE0, 0xEC, 0xDF,
+ 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x7F, 0x80, 0x80, 0x80, 0x70, 0x0F,
- 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00,
- 0x7F, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x7F, 0x00, 0x00, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80,
+ 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80,
+ 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F,
+ 0x00, 0x00, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B,
0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF,
@@ -189,14 +186,14 @@ static const unsigned char font[] PROGMEM = {
0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01,
0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x01, 0x7F,
- 0x80, 0x80, 0xBE, 0xBE, 0x80, 0x80,
- 0x80, 0xC1, 0xFF, 0x80, 0x04, 0x32,
- 0x5E, 0x1C, 0x3D, 0x26, 0x10, 0xC1,
- 0xFF, 0x3E, 0x00, 0x00, 0x08, 0x36,
- 0xC1, 0x08, 0x08, 0x14, 0x77, 0x94,
- 0x94, 0x94, 0xF7, 0x94, 0xF7, 0x9C,
- 0x9C, 0xFF, 0xFF, 0x1E, 0x00, 0x00,
+ 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80,
+ 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80,
+ 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E,
+ 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF,
+ 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1,
+ 0x08, 0x08, 0x14, 0x77, 0x94, 0x94,
+ 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C,
+ 0xFF, 0xFF, 0x1E, 0x00, 0x00, 0x00,
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
@@ -205,8 +202,8 @@ static const unsigned char font[] PROGMEM = {
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x7C, 0x3F, 0x3F, 0x23, 0x01,
+ 0x23, 0x3F, 0x37, 0x6C, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -221,14 +218,14 @@ static const unsigned char font[] PROGMEM = {
0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F,
0x31, 0x20, 0x21, 0x02, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
- 0xE0, 0xA0, 0xA0, 0xD0, 0x90, 0x48,
- 0x48, 0x25, 0x2B, 0x11, 0x09, 0x05,
- 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x03, 0x02, 0x04, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0,
+ 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48,
+ 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F,
- 0x1F, 0x0F, 0x03, 0x00, 0x00, 0x00,
+ 0x01, 0x03, 0x02, 0x04, 0x03, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F,
+ 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -241,4 +238,3 @@ static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-#endif // FONT5X7_H
diff --git a/keyboards/sol/keymaps/brianweyer/config.h b/keyboards/sol/keymaps/brianweyer/config.h
index 87b7dd2ac0b..452cdda8235 100755
--- a/keyboards/sol/keymaps/brianweyer/config.h
+++ b/keyboards/sol/keymaps/brianweyer/config.h
@@ -20,8 +20,6 @@ along with this program. If not, see .
#pragma once
-#define SSD1306OLED
-
// place overrides here
diff --git a/keyboards/sol/keymaps/brianweyer/keymap.c b/keyboards/sol/keymaps/brianweyer/keymap.c
index 2259e246d26..87d603d8178 100755
--- a/keyboards/sol/keymaps/brianweyer/keymap.c
+++ b/keyboards/sol/keymaps/brianweyer/keymap.c
@@ -3,9 +3,6 @@
#include "lufa.h"
#include "split_util.h"
#endif
-#ifdef SSD1306OLED
- #include "common/ssd1306.h"
-#endif
extern keymap_config_t keymap_config;
@@ -175,38 +172,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
void matrix_init_user(void) {
- #ifdef RGBLIGHT_ENABLE
- RGB_current_mode = rgblight_config.mode;
- #endif
- //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
- #ifdef SSD1306OLED
- iota_gfx_init(!has_usb()); // turns on the display
- #endif
-}
-
-void matrix_scan_user(void) {
- #ifdef SSD1306OLED
- // led_test_init();
- iota_gfx_task(); // this is what updates the display continuously
- #endif
+#ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+#endif
}
-//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
-#ifdef SSD1306OLED
+// OLED Driver Logic
+#ifdef OLED_DRIVER_ENABLE
-// hook point for 'led_test' keymap
-// 'default' keymap's led_test_init() is empty function, do nothing
-// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35);
-__attribute__ ((weak))
-void led_test_init(void) {}
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ if (!has_usb())
+ return OLED_ROTATION_180; // flip 180 for offhand
+ return rotation;
+}
-void matrix_update(struct CharacterMatrix *dest,
- const struct CharacterMatrix *source) {
- if (memcmp(dest->display, source->display, sizeof(dest->display))) {
- memcpy(dest->display, source->display, sizeof(dest->display));
- dest->dirty = true;
- }
+static void render_logo(void) {
+ static const char PROGMEM sol_logo[] = {
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
+ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+ 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
+
+ oled_write_P(sol_logo, false);
}
//assign the right code to your layers for OLED display
@@ -215,77 +202,52 @@ void matrix_update(struct CharacterMatrix *dest,
#define L_ADJ (1<<_ADJ)
#define L_ADJ_TRI (L_ADJ|L_FN)
-static void render_logo(struct CharacterMatrix *matrix) {
-
- static char logo[]={
- 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
- 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
- 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
- 0};
- matrix_write(matrix, logo);
-}
-
-
-
-void render_status(struct CharacterMatrix *matrix) {
-
+static void render_status(void) {
// Render to mode icon
- static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
- if(keymap_config.swap_lalt_lgui==false){
- matrix_write(matrix, logo[0][0]);
- matrix_write_P(matrix, PSTR("\n"));
- matrix_write(matrix, logo[0][1]);
- }else{
- matrix_write(matrix, logo[1][0]);
- matrix_write_P(matrix, PSTR("\n"));
- matrix_write(matrix, logo[1][1]);
+ static const char PROGMEM mode_logo[4][4] = {
+ {0x95,0x96,0x0a,0},
+ {0xb5,0xb6,0x0a,0},
+ {0x97,0x98,0x0a,0},
+ {0xb7,0xb8,0x0a,0} };
+
+ if (keymap_config.swap_lalt_lgui != false) {
+ oled_write_P(mode_logo[0], false);
+ oled_write_P(mode_logo[1], false);
+ } else {
+ oled_write_P(mode_logo[2], false);
+ oled_write_P(mode_logo[3], false);
}
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
- char buf[40];
- snprintf(buf,sizeof(buf), "Undef-%ld", layer_state);
- matrix_write_P(matrix, PSTR("\nLayer: "));
- switch (layer_state) {
- case L_BASE:
- matrix_write_P(matrix, PSTR("Laser"));
- break;
- case L_FN:
- matrix_write_P(matrix, PSTR("Function"));
- break;
- case L_ADJ:
- case L_ADJ_TRI:
- matrix_write_P(matrix, PSTR("Adjustment"));
- break;
- default:
- matrix_write(matrix, buf);
- }
+
+ oled_write_P(PSTR("Layer: "), false);
+ switch (layer_state) {
+ case L_BASE:
+ oled_write_P(PSTR("Laser \n"), false);
+ break;
+ case L_FN:
+ oled_write_P(PSTR("Function \n"), false);
+ break;
+ case L_ADJ:
+ case L_ADJ_TRI:
+ oled_write_P(PSTR("Adjustment\n"), false);
+ break;
+ default:
+ oled_write_P(PSTR("Undefined \n"), false);
+ }
// Host Keyboard LED Status
- char led[40];
- snprintf(led, sizeof(led), "\n%s %s %s",
- (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) {
- memcpy(dest->display, source->display, sizeof(dest->display));
- dest->dirty = true;
- }
+static void render_logo(void) {
+ static const char PROGMEM sol_logo[] = {
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
+ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+ 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
+
+ oled_write_P(sol_logo, false);
}
//assign the right code to your layers for OLED display
#define L_BASE 0
#define L_FN (1<<_FN)
#define L_ADJ (1<<_ADJ)
+#define L_ADJ_TRI (L_ADJ|L_FN)
-static void render_logo(struct CharacterMatrix *matrix) {
-
- static char logo[]={
- 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
- 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
- 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
- 0};
- matrix_write(matrix, logo);
- //matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
-}
-
-
-
-void render_status(struct CharacterMatrix *matrix) {
-
+static void render_status(void) {
// Render to mode icon
- static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
- if(keymap_config.swap_lalt_lgui==false){
- matrix_write(matrix, logo[0][0]);
- matrix_write_P(matrix, PSTR("\n"));
- matrix_write(matrix, logo[0][1]);
- }else{
- matrix_write(matrix, logo[1][0]);
- matrix_write_P(matrix, PSTR("\n"));
- matrix_write(matrix, logo[1][1]);
+ static const char PROGMEM mode_logo[4][4] = {
+ {0x95,0x96,0x0a,0},
+ {0xb5,0xb6,0x0a,0},
+ {0x97,0x98,0x0a,0},
+ {0xb7,0xb8,0x0a,0} };
+
+ if (keymap_config.swap_lalt_lgui != false) {
+ oled_write_P(mode_logo[0], false);
+ oled_write_P(mode_logo[1], false);
+ } else {
+ oled_write_P(mode_logo[2], false);
+ oled_write_P(mode_logo[3], false);
}
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
- char buf[40];
- snprintf(buf,sizeof(buf), "Undef-%ld", layer_state);
- matrix_write_P(matrix, PSTR("\nLayer: "));
- switch (layer_state) {
- case L_BASE:
- matrix_write_P(matrix, PSTR("Default"));
- break;
- case L_FN:
- matrix_write_P(matrix, PSTR("FN"));
- break;
- case L_ADJ:
- case L_ADJ_TRI:
- matrix_write_P(matrix, PSTR("ADJ"));
- break;
- default:
- matrix_write(matrix, buf);
- }
+ oled_write_P(PSTR("Layer: "), false);
+ switch (layer_state) {
+ case L_BASE:
+ oled_write_P(PSTR("Default\n"), false);
+ break;
+ case L_FN:
+ oled_write_P(PSTR("FN \n"), false);
+ break;
+ case L_ADJ:
+ case L_ADJ_TRI:
+ oled_write_P(PSTR("ADJ \n"), false);
+ break;
+ default:
+ oled_write_P(PSTR("UNDEF \n"), false);
+ }
// Host Keyboard LED Status
- char led[40];
- snprintf(led, sizeof(led), "\n%s %s %s",
- (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) {
- memcpy(dest->display, source->display, sizeof(dest->display));
- dest->dirty = true;
- }
+static void render_logo(void) {
+ static const char PROGMEM sol_logo[] = {
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
+ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+ 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
+
+ oled_write_P(sol_logo, false);
}
//assign the right code to your layers for OLED display
#define L_BASE 0
#define L_FN (1<<_FN)
#define L_ADJ (1<<_ADJ)
+#define L_ADJ_TRI (L_ADJ|L_FN)
-static void render_logo(struct CharacterMatrix *matrix) {
-
- static char logo[]={
- 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
- 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
- 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
- 0};
- matrix_write(matrix, logo);
- //matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
-}
-
-
-
-void render_status(struct CharacterMatrix *matrix) {
-
+static void render_status(void) {
// Render to mode icon
- static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
- if(keymap_config.swap_lalt_lgui==false){
- matrix_write(matrix, logo[0][0]);
- matrix_write_P(matrix, PSTR("\n"));
- matrix_write(matrix, logo[0][1]);
- }else{
- matrix_write(matrix, logo[1][0]);
- matrix_write_P(matrix, PSTR("\n"));
- matrix_write(matrix, logo[1][1]);
+ static const char PROGMEM mode_logo[4][4] = {
+ {0x95,0x96,0x0a,0},
+ {0xb5,0xb6,0x0a,0},
+ {0x97,0x98,0x0a,0},
+ {0xb7,0xb8,0x0a,0} };
+
+ if (keymap_config.swap_lalt_lgui != false) {
+ oled_write_P(mode_logo[0], false);
+ oled_write_P(mode_logo[1], false);
+ } else {
+ oled_write_P(mode_logo[2], false);
+ oled_write_P(mode_logo[3], false);
}
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
- char buf[40];
- snprintf(buf,sizeof(buf), "Undef-%ld", layer_state);
- matrix_write_P(matrix, PSTR("\nLayer: "));
- switch (layer_state) {
- case L_BASE:
- matrix_write_P(matrix, PSTR("Default"));
- break;
- case L_FN:
- matrix_write_P(matrix, PSTR("FN"));
- break;
- case L_ADJ:
- case L_ADJ_TRI:
- matrix_write_P(matrix, PSTR("ADJ"));
- break;
- default:
- matrix_write(matrix, buf);
- }
+ oled_write_P(PSTR("Layer: "), false);
+ switch (layer_state) {
+ case L_BASE:
+ oled_write_P(PSTR("Default\n"), false);
+ break;
+ case L_FN:
+ oled_write_P(PSTR("FN \n"), false);
+ break;
+ case L_ADJ:
+ case L_ADJ_TRI:
+ oled_write_P(PSTR("ADJ \n"), false);
+ break;
+ default:
+ oled_write_P(PSTR("UNDEF \n"), false);
+ }
// Host Keyboard LED Status
- char led[40];
- snprintf(led, sizeof(led), "\n%s %s %s",
- (host_keyboard_leds() & (1<.
// #define MASTER_RIGHT
// #define EE_HANDS
-// Helix keyboard OLED support
-// see ./rules.mk: OLED_ENABLE=yes or no
-#ifdef OLED_ENABLE
- #define SSD1306OLED
-#endif
-
/* Select rows configuration */
// Rows are 4 or 5
// #define HELIX_ROWS 5 see ./rules.mk
@@ -81,8 +75,7 @@ along with this program. If not, see .
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
-#define DRIVER_COUNT 2
-#define DRIVER_LED_TOTAL 70
+#define DRIVER_COUNT 1
// #define RGB_MATRIX_KEYPRESSES
#define BACKLIGHT_PIN B7
#define BACKLIGHT_LEVELS 5
@@ -92,6 +85,7 @@ along with this program. If not, see .
#else
#define RGBLED_NUM 70
#endif
+#define DRIVER_LED_TOTAL RGBLED_NUM
#define RGBLIGHT_RAINBOW_SWIRL_RANGE 1950
@@ -112,6 +106,8 @@ along with this program. If not, see .
#define RGBLIGHT_ANIMATIONS
+#define LED_HITS_TO_REMEMBER 5
+
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
// 120 RGBoff, OLEDoff
diff --git a/keyboards/sol/rev1/rev1.c b/keyboards/sol/rev1/rev1.c
index 01ab577d457..049b5c21869 100644
--- a/keyboards/sol/rev1/rev1.c
+++ b/keyboards/sol/rev1/rev1.c
@@ -1,15 +1,87 @@
#include "sol.h"
-
-#ifdef SSD1306OLED
-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);
-}
+#ifdef RGB_MATRIX_ENABLE
+ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ // Left Hand Mapped Left to Right
+ { { 0 | (0 << 4) }, { 0, 0 }, 1},
+ { { 0 | (1 << 4) }, { 22, 0 }, 0},
+ { { 0 | (2 << 4) }, { 37, 0 }, 0},
+ { { 0 | (3 << 4) }, { 37, 0 }, 0},
+ { { 0 | (4 << 4) }, { 67, 0 }, 0},
+ { { 0 | (5 << 4) }, { 82, 0 }, 0},
+ { { 0 | (6 << 4) }, { 104, 0 }, 1},
+ { { 1 | (0 << 4) }, { 0, 16 }, 1},
+ { { 1 | (1 << 4) }, { 22, 16 }, 0},
+ { { 1 | (2 << 4) }, { 37, 16 }, 0},
+ { { 1 | (3 << 4) }, { 37, 16 }, 0},
+ { { 1 | (4 << 4) }, { 67, 16 }, 0},
+ { { 1 | (5 << 4) }, { 82, 16 }, 0},
+ { { 1 | (6 << 4) }, { 104, 16 }, 1},
+ { { 2 | (0 << 4) }, { 0, 32 }, 1},
+ { { 2 | (1 << 4) }, { 22, 32 }, 0},
+ { { 2 | (2 << 4) }, { 37, 32 }, 0},
+ { { 2 | (3 << 4) }, { 37, 32 }, 0},
+ { { 2 | (4 << 4) }, { 67, 32 }, 0},
+ { { 2 | (5 << 4) }, { 82, 32 }, 0},
+ { { 2 | (6 << 4) }, { 104, 32 }, 1},
+ { { 3 | (0 << 4) }, { 0, 48 }, 1},
+ { { 3 | (1 << 4) }, { 22, 48 }, 0},
+ { { 3 | (2 << 4) }, { 37, 48 }, 0},
+ { { 3 | (3 << 4) }, { 37, 48 }, 0},
+ { { 3 | (4 << 4) }, { 67, 48 }, 0},
+ { { 3 | (5 << 4) }, { 82, 48 }, 0},
+ { { 3 | (6 << 4) }, { 104, 48 }, 1},
+ { { 4 | (0 << 4) }, { 0, 64 }, 1},
+ { { 4 | (1 << 4) }, { 22, 64 }, 1},
+ { { 4 | (2 << 4) }, { 37, 64 }, 1},
+ { { 4 | (3 << 4) }, { 37, 64 }, 1},
+ { { 4 | (4 << 4) }, { 67, 64 }, 1},
+ // These two control the 4 LEDs in the thumb cluster
+ // Top keys are { 4 | (5 << 4) & { 4 | (6 << 4)
+ { { 5 | (5 << 4) }, { 89, 45 }, 1},
+ { { 5 | (6 << 4) }, { 97, 55 }, 1},
+ // Left Hand Mapped Right to Left
+ { { 6 | (0 << 4) }, { 224, 0 }, 1},
+ { { 6 | (1 << 4) }, { 202, 0 }, 0},
+ { { 6 | (2 << 4) }, { 187, 0 }, 0},
+ { { 6 | (3 << 4) }, { 172, 0 }, 0},
+ { { 6 | (4 << 4) }, { 157, 0 }, 0},
+ { { 6 | (5 << 4) }, { 142, 0 }, 0},
+ { { 6 | (6 << 4) }, { 120, 0 }, 1},
+ { { 7 | (0 << 4) }, { 224, 16 }, 1},
+ { { 7 | (1 << 4) }, { 202, 16 }, 0},
+ { { 7 | (2 << 4) }, { 187, 16 }, 0},
+ { { 7 | (3 << 4) }, { 172, 16 }, 0},
+ { { 7 | (4 << 4) }, { 157, 16 }, 0},
+ { { 7 | (5 << 4) }, { 142, 16 }, 0},
+ { { 7 | (6 << 4) }, { 120, 16 }, 1},
+ { { 8 | (0 << 4) }, { 224, 32 }, 1},
+ { { 8 | (1 << 4) }, { 202, 32 }, 0},
+ { { 8 | (2 << 4) }, { 187, 32 }, 0},
+ { { 8 | (3 << 4) }, { 172, 32 }, 0},
+ { { 8 | (4 << 4) }, { 157, 32 }, 0},
+ { { 8 | (5 << 4) }, { 142, 32 }, 0},
+ { { 8 | (6 << 4) }, { 120, 32 }, 1},
+ { { 9 | (0 << 4) }, { 224, 48 }, 1},
+ { { 9 | (1 << 4) }, { 202, 48 }, 0},
+ { { 9 | (2 << 4) }, { 187, 48 }, 0},
+ { { 9 | (3 << 4) }, { 172, 48 }, 0},
+ { { 9 | (4 << 4) }, { 157, 48 }, 0},
+ { { 9 | (5 << 4) }, { 142, 48 }, 0},
+ { { 9 | (6 << 4) }, { 120, 48 }, 1},
+ { { 10 | (0 << 4) }, { 224, 64 }, 1},
+ { { 10 | (1 << 4) }, { 202, 64 }, 1},
+ { { 10 | (2 << 4) }, { 187, 64 }, 1},
+ { { 10 | (3 << 4) }, { 172, 64 }, 1},
+ { { 10 | (4 << 4) }, { 157, 64 }, 1},
+ // These two control the 4 LEDs in the thumb cluster
+ // Top keys are { 10 | (5 << 4) & { 10 | (6 << 4)
+ { { 11 | (5 << 4) }, { 135, 45 }, 1},
+ { { 11 | (6 << 4) }, { 127, 55 }, 1}
+ };
#endif
void matrix_init_kb(void) {
-
matrix_init_user();
};
diff --git a/keyboards/sol/rev1/split_util.h b/keyboards/sol/rev1/split_util.h
index 59b36241529..4421638969b 100644
--- a/keyboards/sol/rev1/split_util.h
+++ b/keyboards/sol/rev1/split_util.h
@@ -12,6 +12,4 @@ void matrix_slave_scan(void);
void split_keyboard_setup(void);
bool has_usb(void);
-void matrix_master_OLED_init (void);
-
#endif
diff --git a/keyboards/sol/rules.mk b/keyboards/sol/rules.mk
index aa18721b6ce..bafdd9c52da 100644
--- a/keyboards/sol/rules.mk
+++ b/keyboards/sol/rules.mk
@@ -1,6 +1,4 @@
-SRC += i2c.c \
- serial.c \
- common/ssd1306.c
+SRC += serial.c
# MCU name
#MCU = at90usb1287
@@ -47,6 +45,9 @@ BOOTLOADER = qmk-dfu
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+# Custom local font file
+OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
+
# 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
diff --git a/keyboards/speedo/info.json b/keyboards/speedo/info.json
index b0bb87b6e48..3f4b7b27997 100644
--- a/keyboards/speedo/info.json
+++ b/keyboards/speedo/info.json
@@ -4,7 +4,7 @@
"maintainer": "qmk",
"bootloader": "",
"width": 15,
- "height": 6,
+ "height": 6.5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"k00", "x":0, "y":0.375}, {"label":"k01", "x":1, "y":0.375}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.25}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":9, "y":0.5}, {"label":"k07", "x":10, "y":0.25}, {"label":"k08", "x":11, "y":0}, {"label":"k09", "x":12, "y":0.25}, {"label":"k10", "x":13, "y":0.375}, {"label":"k11", "x":14, "y":0.375}, {"label":"k12", "x":0, "y":1.375}, {"label":"k13", "x":1, "y":1.375}, {"label":"k14", "x":2, "y":1.25}, {"label":"k15", "x":3, "y":1}, {"label":"k16", "x":4, "y":1.25}, {"label":"k17", "x":5, "y":1.5}, {"label":"k18", "x":7, "y":2}, {"label":"k19", "x":9, "y":1.5}, {"label":"k20", "x":10, "y":1.25}, {"label":"k21", "x":11, "y":1}, {"label":"k22", "x":12, "y":1.25}, {"label":"k23", "x":13, "y":1.375}, {"label":"k24", "x":14, "y":1.375}, {"label":"k25", "x":0, "y":2.375}, {"label":"k26", "x":1, "y":2.375}, {"label":"k27", "x":2, "y":2.25}, {"label":"k28", "x":3, "y":2}, {"label":"k29", "x":4, "y":2.25}, {"label":"k30", "x":5, "y":2.5}, {"label":"k31", "x":7, "y":3}, {"label":"k32", "x":9, "y":2.5}, {"label":"k33", "x":10, "y":2.25}, {"label":"k34", "x":11, "y":2}, {"label":"k35", "x":12, "y":2.25}, {"label":"k36", "x":13, "y":2.375}, {"label":"k37", "x":14, "y":2.375}, {"label":"k38", "x":0, "y":3.375}, {"label":"k39", "x":1, "y":3.375}, {"label":"k40", "x":2, "y":3.25}, {"label":"k41", "x":3, "y":3}, {"label":"k42", "x":4, "y":3.25}, {"label":"k43", "x":5, "y":3.5}, {"label":"k44", "x":6.5, "y":4}, {"label":"k45", "x":7.5, "y":4}, {"label":"k46", "x":9, "y":3.5}, {"label":"k47", "x":10, "y":3.25}, {"label":"k48", "x":11, "y":3}, {"label":"k49", "x":12, "y":3.25}, {"label":"k50", "x":13, "y":3.375}, {"label":"k51", "x":14, "y":3.375}, {"label":"k52", "x":0, "y":4.375}, {"label":"k53", "x":1, "y":4.375}, {"label":"k54", "x":2, "y":4.25}, {"label":"k55", "x":3, "y":4}, {"label":"k56", "x":4, "y":4.25}, {"label":"k57", "x":5.5, "y":5}, {"label":"k58", "x":6.5, "y":5.5}, {"label":"k59", "x":7.5, "y":5.5}, {"label":"k60", "x":8.5, "y":5}, {"label":"k61", "x":10, "y":4.25}, {"label":"k62", "x":11, "y":4}, {"label":"k63", "x":12, "y":4.25}, {"label":"k64", "x":13, "y":4.375}, {"label":"k65", "x":14, "y":4.375}]
diff --git a/keyboards/tada68/keymaps/kbp-v60/keymap.c b/keyboards/tada68/keymaps/kbp-v60/keymap.c
new file mode 100755
index 00000000000..e7eef901978
--- /dev/null
+++ b/keyboards/tada68/keymaps/kbp-v60/keymap.c
@@ -0,0 +1,53 @@
+#include QMK_KEYBOARD_H
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+
+// Tilde is shift-grave
+#define KC_TLDE S(KC_GRV)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap _BL: (Base Layer) Default Layer
+ * ,----------------------------------------------------------------.
+ * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Del |
+ * |----------------------------------------------------------------|
+ * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Home|
+ * |----------------------------------------------------------------|
+ * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
+ * |----------------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
+ * |----------------------------------------------------------------|
+ * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
+ * `----------------------------------------------------------------'
+ */
+[_BL] = LAYOUT_ansi(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
+ 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_HOME,\
+ MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
+ 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_UP, KC_PGDN,\
+ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(_FL), KC_ALGR, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ /* Keymap _FL: Function Layer
+ * ,----------------------------------------------------------------.
+ * | ` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins |
+ * |----------------------------------------------------------------|
+ * | | |Up | |Prt|Bks|PgU|Hom|End|Pau| Up| | | |end |
+ * |----------------------------------------------------------------|
+ * | |Lef|Dow|Rig|Scl|Del|PgD| ~ |Ins|Lef|Dow|Rig| |Prt |
+ * |----------------------------------------------------------------|
+ * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR |
+ * |----------------------------------------------------------------|
+ * | | | | | | | |MsL|MsD|MsR |
+ * `----------------------------------------------------------------'
+ */
+[_FL] = LAYOUT_ansi(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, \
+ KC_CAPS, _______, KC_UP, _______, KC_BSPC, KC_PSCR, KC_PGUP, KC_HOME, KC_END, KC_PAUS, KC_UP, _______, _______, _______, KC_END, \
+ _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_SLCK, KC_PGDN, KC_TLDE, KC_INS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_PSCR,\
+ _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_BTN1, KC_MS_U, KC_BTN2,\
+ _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R),
+};
diff --git a/keyboards/tada68/keymaps/kbp-v60/readme.md b/keyboards/tada68/keymaps/kbp-v60/readme.md
new file mode 100755
index 00000000000..f15b2781999
--- /dev/null
+++ b/keyboards/tada68/keymaps/kbp-v60/readme.md
@@ -0,0 +1,3 @@
+# KBP V60 like TADA68 layout
+
+This layout resembles the KBParadise V60 FN layer and moves around some keys.
diff --git a/keyboards/tada68/keymaps/kbp-v60/rules.mk b/keyboards/tada68/keymaps/kbp-v60/rules.mk
new file mode 100644
index 00000000000..53644093d6c
--- /dev/null
+++ b/keyboards/tada68/keymaps/kbp-v60/rules.mk
@@ -0,0 +1,18 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = 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.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
diff --git a/keyboards/tada68/keymaps/mattgemmell/config.h b/keyboards/tada68/keymaps/mattgemmell/config.h
new file mode 100644
index 00000000000..f4b045cd32e
--- /dev/null
+++ b/keyboards/tada68/keymaps/mattgemmell/config.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#define GRAVE_ESC_GUI_OVERRIDE
diff --git a/keyboards/tada68/keymaps/mattgemmell/keymap.c b/keyboards/tada68/keymaps/mattgemmell/keymap.c
index f446ddc5d2d..f2afd3cd48d 100644
--- a/keyboards/tada68/keymaps/mattgemmell/keymap.c
+++ b/keyboards/tada68/keymaps/mattgemmell/keymap.c
@@ -6,43 +6,43 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,----------------------------------------------------------------.
- * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
+ * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | § |
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del |
* |------------------------------------------------------- -----|
- * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgUp|
+ * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| \ |Entr|PgUp|
* |----------------------------------------------------------------|
- * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn|
+ * |Shift| ` | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn|
* |----------------------------------------------------------------|
* |Ctrl|Alt |LGUI| Space |Alt| FN|Ctrl|Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[_BL] = LAYOUT_iso(
- 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_GRV, \
+ KC_GESC, 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_NUBS, \
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_DEL, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, \
- KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
+ KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _FL1: Function Layer 1
* ,----------------------------------------------------------------.
- * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | :D |
+ * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |BR↑ |
* |----------------------------------------------------------------|
- * | |LMB| Up|RMB| | | | | | | | | | | |
+ * | | | | | | | | |Prn|Scl|Pau|Up | | |BR↓ |
* |------------------------------------------------------- -----|
- * | |Lef|Dow|Rig| | | | | | | | | | |Home|
+ * | | V+| V-|Mut| | | | |Hom|PgU|Lft|Rig| | |Home|
* |----------------------------------------------------------------|
- * | | | | | L+|LED| L-| | V+| V-|Mut| | MsBtn|↑ | End|
+ * | | | | | L+|LED| L-| | |End|PgDn|Dow| | ↑ | End|
* |----------------------------------------------------------------|
- * | | | | Reset | | | | ← | ↓ | → |
+ * | | | | | | | | ← | ↓ | → |
* `----------------------------------------------------------------'
*/
[_FL] = LAYOUT_iso(
- _______, 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_BTN1, KC_UP, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, \
- _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_MS_U, KC_END, \
+ _______, 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_BRMU, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BRMD, \
+ _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, KC_HOME, \
+ _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_MS_U, KC_END, \
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
),
};
diff --git a/keyboards/tada68/keymaps/mattgemmell/readme.md b/keyboards/tada68/keymaps/mattgemmell/readme.md
index a67e25ae27b..de8e0c4980a 100644
--- a/keyboards/tada68/keymaps/mattgemmell/readme.md
+++ b/keyboards/tada68/keymaps/mattgemmell/readme.md
@@ -1,9 +1,8 @@
-# Custom Tada68 layout for ISO UK with Apple-y tweaks
+# Custom TADA68 layout for ISO UK with Apple-specific tweaks
-This layout is based on the [ISO UK](../iso-uk) layout, with the following
-changes:
+This layout is based on the [ISO UK](../iso-uk) layout, with changes to make it
+more user friendly when used on Apple devices, like iPads and the Mac.
-Swap Win and Alt on the left side (Option and Command on macOS)
## Installation
diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h
old mode 100644
new mode 100755
index 20ec2e655a7..2cc7d2951d9
--- a/keyboards/tetris/config.h
+++ b/keyboards/tetris/config.h
@@ -10,17 +10,12 @@
#define PRODUCT Tetris
#define DESCRIPTION Planck mit
-#define QMK_ESC_OUTPUT B0
-#define QMK_ESC_INPUT D7
-#define QMK_LED B7
-#define QMK_SPEAKER B5
-
/* key matrix size */
-#define MATRIX_ROWS 4
+#define MATRIX_ROWS 5
#define MATRIX_COLS 12
/* key matrix pins */
-#define MATRIX_ROW_PINS { B3, B2, B1, B0 }
+#define MATRIX_ROW_PINS { B3, B2, B1, B0, E6 }
#define MATRIX_COL_PINS { D7, B4, B6, C6, C7, F6, F7, D4, D2, D3, D5, D6 }
#define UNUSED_PINS
@@ -39,19 +34,22 @@
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
-#define TAPPING_TERM 200
-
#ifdef AUDIO_ENABLE
#define B5_AUDIO
#define STARTUP_SONG SONG(ONE_UP_SOUND)
#define NO_MUSIC_MODE
#endif
-#if RGBLIGHT_ENABLE
+#define NUMBER_OF_ENCODERS 2
+#define ENCODERS_PAD_A { D1,F1 }
+#define ENCODERS_PAD_B { D0,F0 }
+
#define RGB_DI_PIN F5
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_SLEEP
#define RGBLED_NUM 47
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12
-//#define RGBLIGHT_LIMIT_VAL 128
-#endif
+
diff --git a/keyboards/tetris/info.json b/keyboards/tetris/info.json
index b21a46d632b..c58e9be52f4 100644
--- a/keyboards/tetris/info.json
+++ b/keyboards/tetris/info.json
@@ -3,10 +3,10 @@
"url": "",
"maintainer": "qmk",
"width": 12,
- "height": 4,
+ "height": 5,
"layouts": {
"LAYOUT_planck_mit": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}]
+ }
}
- }
}
diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c
old mode 100644
new mode 100755
index 0ec12435e78..c1b5ad2b1f3
--- a/keyboards/tetris/keymaps/default/keymap.c
+++ b/keyboards/tetris/keymaps/default/keymap.c
@@ -1,828 +1,186 @@
#include QMK_KEYBOARD_H
-#ifdef AUDIO_ENABLE
- float tone_caps[][2] = SONG( CAPS_LOCK_ON_SOUND );
- float tone_taps[][2] = SONG( E__NOTE( _A6 ) );
-#endif
-
-#define _BASE 0
-#define _CODE 1
-#define _NAVI 2
-#define _FUNC 3
-#define _SYMB 4
-#define _NUMB 5
-#define _MARO 6
-#define _RGB 7
-#define _ADJUST 8
-#define _GAME 9
-
-/* RGB colors */
-#define RGB_Layer_1_Base_Color 0, 128, 0
-#define RGB_Layer_2_Base_Color 0,0,0
-#define RGB_Layer_3_Base_Color 0,0,0
-#define RGB_Layer_4_Base_Color 0,0,0
-#define RGB_Layer_5_Base_Color 0,0,0
-#define RGB_Layer_6_Base_Color 64, 0, 64
-#define RGB_Layer_7_Base_Color 0, 0,0
-#define RGB_Layer_8_Base_Color 0,0,0
-#define RGB_Layer_9_Base_Color 0,0,0
-#define RGB_Caps_Color 6,50,50
-#define RGB_TAP_On_Color 0,128,0
-#define RGB_TAP_Off_Color 128,0,0
-#define RGB_TAP_Base_Color 0,0,0
-
-extern rgblight_config_t rgblight_config;
-bool NUMLAY_STATUS = false;
-int RGB_LAYER0_mode = 6;
-bool RGB_TAP_STATE = false;
-static uint8_t current_layer = 0;
-static bool has_layer_changed = true;
-static bool save_rgbmode = true;
-static bool caps = false;
-
-/* Tap Dance function */
-void dance_cln_finished( qk_tap_dance_state_t* state, void* user_data )
-{
- if ( state->count == 1 )
- {
- register_code( KC_LSFT );
- } else {
- layer_on( _SYMB );
- #ifdef AUDIO_ENABLE
- PLAY_SONG( tone_taps );
- #endif
- }
-}
-
-
-void dance_cln_reset( qk_tap_dance_state_t* state, void* user_data )
-{
- if ( state->count == 1 )
- {
- unregister_code( KC_LSFT );
- }else {
- uint8_t layer = biton32( layer_state );
- if ( layer == _SYMB )
- {
- layer_off( _SYMB );
- rgblight_mode( RGB_LAYER0_mode );
- }
- }
-}
-
-enum my_keycodes {
- RGB_TAP = SAFE_RANGE,
- KC_00
-};
-
-/* Tap Dance Declarations */
-enum {
- TD_Mute_Next = 0,
- TD_SFT,
- TD_LBRC,
- TD_RBRC
-};
-
-/* Tap Dance Definitions */
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_Mute_Next] = ACTION_TAP_DANCE_DOUBLE( KC_MUTE, KC_MNXT )
- ,[TD_SFT] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, dance_cln_finished, dance_cln_reset )
- ,[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE( KC_LBRC, KC_LCBR )
- ,[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE( KC_RBRC, KC_RCBR )
-};
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* BASE - QWERTY
- * ,-----------------------------------------------------------------------------------.
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | BS |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * shift + Esc = ~ --> | Esc | A | S | D | F | G | H | J | K | L | ; | Enter| <-- shift + Enter = "
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | N | M | , | . | / | Mute |
- * |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next
- * | Ctrl | GUI | Alt | [ | - | Space | = | ] | Fx | \ | Del |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_BASE] = LAYOUT_planck_mit(
- LT( _ADJUST,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- LT( _NUMB,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT( _RGB, KC_L ), KC_SCLN, KC_ENT,
- TD( TD_SFT ), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, TD( TD_Mute_Next ),
- KC_LCTL, KC_LGUI, KC_LALT, TD( TD_LBRC ), LT( _NAVI, KC_MINS ), LT( _CODE, KC_SPC ), LT( _FUNC, KC_EQL ), TD( TD_RBRC ), KC_LEFT, KC_DOWN, KC_RGHT ),
-
-/* Code
- * ,-----------------------------------------------------------------------------------.
- * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | ` | < | [ | { | ( | & | Left | Down | Up | Down | ; | ' |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | > | ] | } | ) | | | | | , | . | / | Play |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | [ | BkSp | ======= | Del | ] | | \ | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_CODE] = LAYOUT_planck_mit( /* 1 - Code */
- _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
- KC_GRV, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_AMPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_QUOT,
- _______, KC_RABK, KC_RBRC, KC_RCBR, KC_RPRN, KC_PIPE, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, KC_MPLY,
- _______, _______, _______, KC_LBRC, KC_BSPC, _______, KC_DEL, KC_RBRC, _______, KC_BSLS, _______ ),
-
-/* Navi
- * ,-----------------------------------------------------------------------------------.
- * | | | | PgUp | | | | |Insert| |Prtsc | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | ~ | | Home | PgDn | End | | | | |SrcLck| | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | Break| | | | | PgUp | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | Home | PgDn | End |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_NAVI] = LAYOUT_planck_mit(
- _______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, _______,
- KC_TILD, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, _______, _______,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ),
-
-/* Func
- * ,-----------------------------------------------------------------------------------.
- * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | F11 | F12 | | | | | | | | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_FUNC] = LAYOUT_planck_mit(
- _______ , KC_F1, KC_F2 , KC_F3, KC_F4, KC_F5, KC_F6 , KC_F7, KC_F8, KC_F9, KC_F10, _______,
- _______ , KC_F12, KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
- _______ , XXXXXXX, XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
- _______ , _______, _______ , _______, _______, _______, _______ , _______, _______, _______, _______ ),
-
-
-/* Symb - double tap shift
- * ,-----------------------------------------------------------------------------------.
- * | | | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | | | | | | | | | : | " |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | < | > | ? | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | { | _ | | + | } | | | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_SYMB] = LAYOUT_planck_mit(
- KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
- KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COLN, KC_DQUO,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_QUES, _______,
- _______, _______, _______, KC_LCBR, KC_UNDS, _______, KC_PLUS, KC_RCBR, _______, KC_PIPE, _______ ),
-
-/* Number
- * ,-----------------------------------------------------------------------------------.
- * | | + | - | | | | | 7 | 8 | 9 | | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | * | / | = | | | | 4 | 5 | 6 | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | 1 | 2 | 3 | |Layer0|
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | 0 | 00 | . | | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_NUMB] = LAYOUT_planck_mit( /* 5 - Numpad */
- _______, KC_PPLS, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, _______,
- _______, KC_PAST, KC_PSLS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, _______,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ),
- _______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ),
-
-/* MARO Empty
- * ,-----------------------------------------------------------------------------------.
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_MARO] = LAYOUT_planck_mit(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ),
-
-/* RGB
- * ,-----------------------------------------------------------------------------------.
- * | | | | | | _TAP | | | | | | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | MOD | M_R | M_SW | M_K | M_X | M_G | | | | | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | HUI | SAI | VAI | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | HUD | SAD | VAD | | | RGB_TOG | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_RGB] = LAYOUT_planck_mit(
- _______, _______, _______, _______, _______, RGB_TAP, _______, _______, _______, _______, _______, _______,
- RGB_MOD, RGB_M_R, RGB_M_SW, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______,
- RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, RGB_TOG, _______, _______, _______, _______, _______ ),
-
-/* Func
- * ,-----------------------------------------------------------------------------------.
- * | | | | | | | | | | |Layer0| Rest |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Caps | | | | | Game | | | | | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | Numb | Music| | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
-
-[_ADJUST] = LAYOUT_planck_mit(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO( 0 ), RESET ,
- KC_CAPS, _______, _______, _______, _______, TO(_GAME), _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, TO(_NUMB), MU_TOG, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ),
-
-[_GAME] = LAYOUT_planck_mit(
- XXXXXXX,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX,
- XXXXXXX,KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX,KC_LCTL, KC_A, KC_S, KC_D, KC_B, KC_N, KC_M, XXXXXXX, XXXXXXX, KC_UP, TO( 0 ),
- XXXXXXX,KC_LSFT, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ),
+ [0] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, KC_MINS, LT(1, KC_SPC), KC_EQL, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT,
+ KC_VOLD, KC_VOLU, KC_PGDN, KC_PGUP),
+ [1] = LAYOUT_planck_mit(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-/* Encoder */
-static uint8_t encoder_state = 0;
-static int8_t encoder_value = 0;
-static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
-
-/* Timer */
-static uint16_t TAP_RGB_timer;
+extern rgblight_config_t rgblight_config;
+int RGB_LAYER0_mode = 6;
+static uint8_t current_layer = 0;
+static bool has_layer_changed = true;
+uint16_t i = 0;
+uint16_t j = 0;
static uint16_t RGB_encoder_timer;
+static uint16_t RGB_encoder_timer2;
+static uint8_t RGB_encoder_dir = 0;
-/* Encoder state RGB_display */
-static uint8_t RGB_encoder_count=6;
-static bool RGB_encoder_bool = false;
+const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {
+ 30,
+ 5,
+ -5
+};
-/* RGB tap HUE */
-static uint16_t Type_Hue=270;
-
-void matrix_init_user( void )
-{
- wait_ms( 200 );
-
- /* Encoder init */
- encoder_state = PIND & 0x3;
-
- /* Timer init */
- RGB_encoder_timer= timer_read();
- TAP_RGB_timer= timer_read();
+void matrix_init_user(void) {
+ RGB_encoder_timer = timer_read();
+ RGB_encoder_timer2 = timer_read();
}
+void matrix_scan_user(void) {
+ uint8_t layer = biton32(layer_state);
-void matrix_scan_user( void )
-{
-/* Layer */
- uint8_t layer = biton32( layer_state );
-
-/* Encoder */
- encoder_state <<= 2;
- encoder_state |= (PIND & 0x3);
- encoder_value += encoder_LUT[encoder_state & 0xF];
-
-/* Encoder state RGB display */
- if (RGB_encoder_bool){
- if (timer_elapsed(RGB_encoder_timer) > 2500) {
- RGB_encoder_bool=false;
- if (RGB_TAP_STATE) {
- rgblight_mode( 1 );
- rgblight_setrgb( RGB_TAP_Base_Color );
- }else{
- rgblight_mode( RGB_LAYER0_mode );
- }
- }
- }
-
-/* Display the Caps state */
- if (caps==true){
- rgblight_setrgb_at(RGB_Caps_Color,12);
- }
-
-/* Start of Encoder clockwise */
- if ( encoder_value >= 4 ) {
-
- /* Start of Encoder state RGB_display */
- if (!RGB_encoder_bool){
- RGB_encoder_timer=timer_read();
- RGB_encoder_bool=true;
- RGB_encoder_count=5;
- rgblight_mode(1);
- rgblight_setrgb( 0,0,0 );
- }else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) {
- RGB_encoder_timer=timer_read();
- RGB_encoder_count-=1;
- if (RGB_encoder_count>5 || RGB_encoder_count<1){
- RGB_encoder_count=5;
+ if (RGB_encoder_dir != 0) {
+ if (timer_elapsed(RGB_encoder_timer) > 1400) {
+ RGB_encoder_dir = 0;
+ rgblight_mode(RGB_LAYER0_mode);
+ } else {
+ if (timer_elapsed(RGB_encoder_timer2) > 700) {
rgblight_setrgb(0, 0, 0);
+ RGB_encoder_timer2 = timer_read();
+ }
+ if (timer_elapsed(RGB_encoder_timer2) > 80) {
+ if (RGB_encoder_dir == 1) {
+ rgblight_setrgb_at(128, 128, 0, 19);
+ } else {
+ rgblight_setrgb_at(128, 128, 0, 16);
+ }
+ }
+ if (timer_elapsed(RGB_encoder_timer2) > 180) {
+ if (RGB_encoder_dir == 1) {
+ rgblight_setrgb_at(160, 160, 0, 8);
+ } else {
+ rgblight_setrgb_at(160, 160, 0, 3);
+ }
+ }
+ if (timer_elapsed(RGB_encoder_timer2) > 280) {
+ if (RGB_encoder_dir == 1) {
+ rgblight_setrgb_at(192, 192, 0, 9);
+ } else {
+ rgblight_setrgb_at(192, 192, 0, 2);
+ }
+ }
+ if (timer_elapsed(RGB_encoder_timer2) > 400) {
+ if (RGB_encoder_dir == 1) {
+ rgblight_setrgb_at(224, 224, 0, 10);
+ } else {
+ rgblight_setrgb_at(224, 224, 0, 1);
+ }
}
}
- rgblight_setrgb_at(0,255,0,5);
- if (RGB_encoder_count<1) {RGB_encoder_count=1;}
- switch (RGB_encoder_count) {
- case 5:
- rgblight_setrgb_at(0, 255, 0,4);
- break;
- case 4:
- rgblight_setrgb_at(0, 255, 0,3);
- break;
- case 3:
- rgblight_setrgb_at(0, 255, 0,2);
- break;
- case 2:
- rgblight_setrgb_at(0, 255, 0,1);
- break;
- case 1:
- rgblight_setrgb_at(0, 255, 0,0);
- break;
- }
- /* End of Encoder state RGB_display */
-
- /* Start of Set Encoder Keycode */
- switch ( layer )
- {
- case 0:
- tap_code( KC_VOLD );
- break;
- case _CODE:
- tap_code( KC_LEFT );
- break;
- case _RGB:
- rgblight_decrease_val();
- break;
- case _NUMB:
- tap_code( KC_LEFT );
- break;
- case _MARO:
- tap_code( KC_UP );
- break;
- default:
- tap_code( KC_VOLD );
- }
- /* End of Set Encoder Keycode */
-
}
-/* End of Encoder clockwise */
-
-/* Start of Encoder anti-clockwise */
- if ( encoder_value <= -4 )
- {
- /* Start of Encoder state RGB_display */
- if (!RGB_encoder_bool){
- RGB_encoder_timer=timer_read();
- RGB_encoder_bool=true;
- RGB_encoder_count=6;
+ /* layer rgb */
+ if (layer != current_layer) {
+ has_layer_changed = true;
+ current_layer = layer;
+ }
+ if (has_layer_changed) {
+ if (layer == 0) {
+ rgblight_mode(RGB_LAYER0_mode);
+ } else {
rgblight_mode(1);
- rgblight_setrgb( 0,0,0 );
- }else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) {
- RGB_encoder_timer=timer_read();
- RGB_encoder_count+=1;
- if (RGB_encoder_count<6 || RGB_encoder_count> 10){
- RGB_encoder_count=6;
- rgblight_setrgb(0, 0, 0);
+ for (i = 0; i < 48; i++) {
+ (i > 41) ? (j = i - 1) : (j = i);
+ uint16_t kc = keymap_key_to_keycode(layer, (keypos_t) {.row = 0, .col = i
+ });
+ if (kc == KC_TRNS) {
+ setrgb(5, 5, 5, (LED_TYPE * ) & led[j]); /* TRNS color 0-255*/
+ } else if (kc == KC_NO) {
+ setrgb(0, 0, 0, (LED_TYPE * ) & led[j]); /* NO color 0-255*/
+ } else {
+ if (layer == 1) {
+ setrgb(128, 64, 0, (LED_TYPE * ) & led[j]); /* 1 layer 0-255*/
+ } else if (layer == 2) {
+ setrgb(0, 64, 128, (LED_TYPE * ) & led[j]); /* 2*/
+ } else if (layer == 3) {
+ setrgb(64, 128, 0, (LED_TYPE * ) & led[j]); /* 3*/
+ } else if (layer == 4) {
+ setrgb(0, 128, 64, (LED_TYPE * ) & led[j]); /* 4*/
+ } else if (layer == 5) {
+ setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 5*/
+ } else if (layer == 6) {
+ setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 6*/
+ } else if (layer == 7) {
+ setrgb(128, 128, 0, (LED_TYPE * ) & led[j]); /* 7*/
+ } else if (layer == 8) {
+ setrgb(0, 128, 128, (LED_TYPE * ) & led[j]); /* 8*/
+ } else if (layer == 9) {
+ setrgb(128, 192, 64, (LED_TYPE * ) & led[j]); /* 9*/
+ } else if (layer == 10) {
+ setrgb(64, 192, 128, (LED_TYPE * ) & led[j]); /* 10*/
+ } else if (layer == 11) {
+ setrgb(128, 64, 192, (LED_TYPE * ) & led[j]); /* 11*/
+ } else if (layer == 12) {
+ setrgb(64, 128, 192, (LED_TYPE * ) & led[j]); /* 12*/
+ } else if (layer == 13) {
+ setrgb(128, 192, 0, (LED_TYPE * ) & led[j]); /* 13*/
+ } else if (layer == 14) {
+ setrgb(192, 0, 128, (LED_TYPE * ) & led[j]); /* 14*/
+ } else if (layer == 15) {
+ setrgb(0, 192, 128, (LED_TYPE * ) & led[j]); /* 15*/
+ }
+ }
}
- }
- rgblight_setrgb_at(0, 0,255,6);
- if (RGB_encoder_count>11) {
- RGB_encoder_count=11;
- }
- switch (RGB_encoder_count) {
- case 6:
- rgblight_setrgb_at(0, 0,255,7);
- break;
- case 7:
- rgblight_setrgb_at(0, 0,255,8);
- break;
- case 8:
- rgblight_setrgb_at(0, 0,255,9);
- break;
- case 9:
- rgblight_setrgb_at(0, 0,255,10);
- break;
- case 10:
- rgblight_setrgb_at(0, 0,128,11);
- break;
- }
- /* End of Encoder state RGB_display */
-
- /* Start of Set Encoder Keycode */
- switch ( layer )
- {
- case 0:
- tap_code( KC_VOLU );
- break;
- case _CODE:
- tap_code( KC_RGHT );
- break;
- case _RGB:
- rgblight_increase_val();
- break;
- case _NUMB:
- tap_code( KC_RGHT );
- break;
- case _MARO:
- tap_code( KC_DOWN );
- break;
- default:
- tap_code( KC_VOLU );
- }
- /* End of Set Encoder Keycode */
-
-}
-
-/* End of Encoder anti-clockwise */
-
- encoder_value %= 4;
-
-/* Start of RGB with Layer change */
-
- /* Save the Layer0 RGB state */
- if ( save_rgbmode == true ) {
- if (RGB_TAP_STATE==false)
- {
- RGB_LAYER0_mode = rgblight_config.mode;
- }
- }
- save_rgbmode = false;
-
- /* When the layer is changed */
- if ( layer != current_layer && caps == false) {
- has_layer_changed = true;
- current_layer = layer; /* update layer information */
- }
- /* Check for layer change, and apply color if its changed since last check */
- if ( has_layer_changed )
- {
- /* change backlight based on layer. These should be numbers or whatever you defined the layers as */
- switch ( layer )
- {
- case 0:
-
- /* if the key tap RGB effect is enable */
- if (RGB_TAP_STATE==true){
- rgblight_mode(1);
- rgblight_setrgb( RGB_TAP_Base_Color );
- }
- else{
- rgblight_mode( RGB_LAYER0_mode );
- }
- break;
-
- case _CODE: //1
-/* Save Layer0 RGB state */
- RGB_LAYER0_mode = rgblight_config.mode;
-
-/* set all the RGB color under the switch */
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_1_Base_Color);
-
- /* set each of the RGB led color under the switch */
- rgblight_setrgb_at(64, 64, 64,1); // Q
- rgblight_setrgb_at(64, 64, 64,2); // W
- rgblight_setrgb_at(64, 64, 64,3); // E
- rgblight_setrgb_at(64, 64, 64,4); // R
- rgblight_setrgb_at(64, 64, 64,5); // T
- rgblight_setrgb_at(64, 64, 64,6); // Y
- rgblight_setrgb_at(64, 64, 64,7); // U
- rgblight_setrgb_at(64, 64, 64,8); // I
- rgblight_setrgb_at(64, 64, 64,9); // O
- rgblight_setrgb_at(64, 64, 64,10); // P
- rgblight_setrgb_at(64, 0, 0,40); // -
- rgblight_setrgb_at(64, 0, 0,42); // =
- break;
-
- case _NAVI: //2
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_2_Base_Color);
-
- rgblight_setrgb_at(64, 0, 64,3);
- rgblight_setrgb_at(64, 0, 64,14);
- rgblight_setrgb_at(64, 0, 64,15);
- rgblight_setrgb_at(64, 0, 64,16);
- rgblight_setrgb_at(64, 64, 0,8);
- rgblight_setrgb_at(64, 64, 0,10);
- rgblight_setrgb_at(64, 64, 0,21);
- rgblight_setrgb_at(64, 64, 0,29);
- rgblight_setrgb_at(64, 0, 0,11);
- rgblight_setrgb_at(0, 0, 64,34);
- rgblight_setrgb_at(0, 0, 64,44);
- rgblight_setrgb_at(0, 0, 64,45);
- rgblight_setrgb_at(0, 0, 64,46);
- break;
- case _FUNC: //3
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_3_Base_Color);
-
- rgblight_setrgb_at(0, 0, 64,1);
- rgblight_setrgb_at(0, 0, 64,2);
- rgblight_setrgb_at(0, 0, 64,3);
- rgblight_setrgb_at(0, 0, 64,4);
- rgblight_setrgb_at(0, 0, 64,5);
- rgblight_setrgb_at(0, 0, 64,6);
- rgblight_setrgb_at(0, 0, 64,7);
- rgblight_setrgb_at(0, 0, 64,8);
- rgblight_setrgb_at(0, 0, 64,9);
- rgblight_setrgb_at(0, 0, 64,10);
- rgblight_setrgb_at(0, 0, 64,13);
- rgblight_setrgb_at(0, 0, 64,14);
- break;
-
- case _SYMB: //4
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_4_Base_Color);
-
- rgblight_setrgb_at(0, 64, 64,1);
- rgblight_setrgb_at(0, 64, 64,2);
- rgblight_setrgb_at(0, 64, 64,3);
- rgblight_setrgb_at(0, 64, 64,4);
- rgblight_setrgb_at(0, 64, 64,5);
- rgblight_setrgb_at(0, 64, 64,6);
- rgblight_setrgb_at(0, 64, 64,7);
- rgblight_setrgb_at(0, 64, 64,8);
- rgblight_setrgb_at(0, 64, 64,9);
- rgblight_setrgb_at(0, 64, 64,10);
- rgblight_setrgb_at(0, 64, 64,12);
- rgblight_setrgb_at(0, 64, 64,22);
- rgblight_setrgb_at(0, 64, 64,23);
- rgblight_setrgb_at(0, 64, 64,32);
- rgblight_setrgb_at(0, 64, 64,33);
- rgblight_setrgb_at(0, 64, 64,34);
- rgblight_setrgb_at(0, 64, 64,39);
- rgblight_setrgb_at(0, 64, 64,40);
- rgblight_setrgb_at(0, 64, 64,42);
- rgblight_setrgb_at(0, 64, 64,43);
- break;
-
- case _NUMB: //5
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_5_Base_Color);
-
- rgblight_setrgb_at(0,64,0,1);
- rgblight_setrgb_at(0,64,0,2);
- rgblight_setrgb_at(0,64,0,13);
- rgblight_setrgb_at(0,64,0,14);
- rgblight_setrgb_at(0,64,64,15);
- rgblight_setrgb_at(64,64,64,7);
- rgblight_setrgb_at(64,64,64,8);
- rgblight_setrgb_at(64,64,64,9);
- rgblight_setrgb_at(64,64,64,19);
- rgblight_setrgb_at(64,64,64,20);
- rgblight_setrgb_at(64,64,64,21);
- rgblight_setrgb_at(64,64,64,31);
- rgblight_setrgb_at(64,64,64,32);
- rgblight_setrgb_at(64,64,64,33);
- rgblight_setrgb_at(64,64,64,42);
- rgblight_setrgb_at(64,64,64,43);
- rgblight_setrgb_at(0,128,0,44);
- break;
- case _MARO: //6
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_6_Base_Color);
- break;
-
- case _RGB: //7
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_7_Base_Color);
-
- rgblight_setrgb_at(1,143,225,0);
- rgblight_setrgb_at(39,21,107,1);
- rgblight_setrgb_at(208,0,0,2);
- rgblight_setrgb_at(64,64,64,21);
- break;
- case _ADJUST: //8
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_8_Base_Color);
-
- rgblight_setrgb_at(0,64,0,10);
- rgblight_setrgb_at(64,0,0,11);
- rgblight_setrgb_at(0,64,0,17);
- rgblight_setrgb_at(0,64,0,30);
- rgblight_setrgb_at(6,50,50,12);
- break;
-
- case _GAME: //9
- RGB_LAYER0_mode = rgblight_config.mode;
-
- rgblight_mode( 1 );
- rgblight_setrgb(RGB_Layer_9_Base_Color);
-
- rgblight_setrgb_at(0,0,64,15);
- rgblight_setrgb_at(0,0,64,26);
- rgblight_setrgb_at(0,0,64,27);
- rgblight_setrgb_at(0,0,64,28);
- rgblight_setrgb_at(64,0,0,35);
- break;
-
- default:
- rgblight_mode( RGB_LAYER0_mode );
+ rgblight_set();
}
has_layer_changed = false;
}
-/* End of RGB with Layer change */
+ /* end of layer rgb */
+}
-} // End of matrix_scan_user
-
-
-
-/* shift + enter = " from:https://github.com/qmk/qmk_firmware/blob/e899cb8940da04fa2610604f0aab417db7fac119/keyboards/mitosis/keymaps/datagrok/keymap.c */
-
-bool comm_shifted = false;
-bool ques_shifted = false;
-static uint8_t key_index = 0;
-uint8_t shifted;
-uint16_t s_keycode;
-bool *k_shifted;
-
-bool process_record_user( uint16_t keycode, keyrecord_t *record ){
-
-/* Start of key tap RGB effect */
- if ( RGB_TAP_STATE ==true ) {
- key_index=(record->event.key.col)+(record->event.key.row)*12;
-
-/* Change the Hue of the RGB color with the type speed */
- if (timer_elapsed(TAP_RGB_timer) >10000){
- TAP_RGB_timer=timer_read();
- Type_Hue=270;
- }else if (timer_elapsed(TAP_RGB_timer) >1000){
- Type_Hue+=30;
- if (Type_Hue>270) {
- Type_Hue=270;}
- }else{
- TAP_RGB_timer=timer_read();
- Type_Hue-=10;
- if (Type_Hue<10) {
- Type_Hue=10;}
- }
- if (key_index>42){ //fix the RGB index of the MIT layout position
- key_index=key_index-1;
- }
- if ( record->event.pressed ) {
- rgblight_sethsv_at(Type_Hue,255,255,key_index);
- } else {
- rgblight_setrgb_at(RGB_TAP_Base_Color,key_index);
- }
- }
-/* End of key tap RGB effect */
-
- switch ( keycode )
- {
- /* save the RGB state when set the new */
- case RGB_M_R:
- save_rgbmode = true;
- break;
- case RGB_M_SW:
- save_rgbmode = true;
- break;
- case RGB_M_X:
- save_rgbmode = true;
- break;
- case RGB_M_G:
- save_rgbmode = true;
- break;
- case RGB_MODE_KNIGHT:
- save_rgbmode = true;
- break;
-
-/* Define a New Keycode: double zero */
- case KC_00:
- if (record->event.pressed) {
- // Do something when pressed
- } else {
- tap_code( KC_0 ); // send 0
- tap_code( KC_0 ); // send 0 twice without macro
- }
- return false; // Skip all further processing of this key
-
- /* when the REST key is pressed the 'R' key will RED,the "Bottom Left"(esc of qmk-dfu) will be GREEN */
- case RESET:
- rgblight_mode( 1 );
- rgblight_setrgb( 0, 0, 0 );
- rgblight_setrgb_at(128, 0, 0,4); // R
- rgblight_setrgb_at(6, 128, 24,36); // Bottom Left key
- break;
-
-/* Define a New Keycode: key tap RGB effect toggle */
- case RGB_TAP:
- if ( !(record->event.pressed)) {
- /* If enable,the 'On' key will be green */
- if (RGB_TAP_STATE) {
- RGB_TAP_STATE=false;
- rgblight_mode( 1 );
- rgblight_setrgb( RGB_TAP_Base_Color );
- rgblight_setrgb_at(RGB_TAP_Off_Color,16); // O - on
- }else{
- /* If disenable,the 'oFf' key will be red */
- RGB_TAP_STATE=true;
- rgblight_mode( 1 );
- rgblight_setrgb( RGB_TAP_Base_Color );
- rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off
- }
- }
- break;
-
-/* special shift keys */
- case KC_ENT:
- s_keycode = KC_QUOT;
- k_shifted = &ques_shifted;
- break;
- case KC_UP:
- s_keycode = KC_SLSH;
- k_shifted = &ques_shifted;
- break;
- case KC_DOWN:
- s_keycode = KC_BSLS;
- k_shifted = &ques_shifted;
+bool process_record_user(uint16_t keycode, keyrecord_t * record) {
+ switch (keycode) {
+ case RGB_MOD:
+ RGB_LAYER0_mode = rgblight_config.mode;
break;
default:
- return(true);
+ return (true);
}
+ return (true);
+}
- shifted = get_mods() & (MOD_BIT( KC_LSHIFT ) | MOD_BIT( KC_RSHIFT ) );
-
- /* Keydown. If shift is currently pressed, register its alternate keycode. */
- if ( record->event.pressed && shifted )
- {
- *k_shifted = true;
- register_code( s_keycode );
- return(false);
- /*
- * Keyup. If shift was pressed back when the key was pressed, unregister
- * its alternate keycode.
- */
- } else if ( !(record->event.pressed) && *k_shifted ) {
- *k_shifted = false;
- unregister_code( s_keycode );
- return(false);
- /* Otherwise, behave as normal. */
+void encoder_update_user(uint8_t index, bool clockwise) {
+ RGB_encoder_timer = timer_read();
+ RGB_encoder_timer2 = timer_read();
+ uint8_t layer = biton32(layer_state);
+ if (clockwise) {
+ RGB_encoder_dir = 1;
} else {
- return(true);
+ RGB_encoder_dir = -1;
}
-
-} // End ofprocess_record_user
-
-
-void led_set_user( uint8_t usb_led )
-{
- static uint8_t old_usb_led = 0;
- wait_ms( 10 ); /* gets rid of tick */
-
- if ( (usb_led & (1 << USB_LED_CAPS_LOCK) ) && !(old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) {
-/* CAPS on */
- caps= true;
- rgblight_setrgb( 0,0,0 );
- rgblight_setrgb_at(RGB_Caps_Color,12); // caps key
- #ifdef AUDIO_ENABLE
- PLAY_SONG( tone_caps );
- #endif
- }else if ( !(usb_led & (1 << USB_LED_CAPS_LOCK) ) && (old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) {
-
-/* CAPS off */
- caps= false;
- if (RGB_TAP_STATE==false){
- rgblight_mode( RGB_LAYER0_mode );
- }else{
- rgblight_mode(1);
- rgblight_setrgb( 0,0,0 );
+ if (index == 0) /* Right encoder */ {
+ if (clockwise) {
+ register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 11
+ }));
+ unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 11
+ }));
+ } else {
+ register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 10
+ }));
+ unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 10
+ }));
+ }
+ } else if (index == 1) /* Left encoder */ {
+ if (clockwise) {
+ register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 1
+ }));
+ unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 1
+ }));
+ } else {
+ register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 0
+ }));
+ unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 0
+ }));
}
- #ifdef AUDIO_ENABLE
- PLAY_SONG( tone_caps );
- #endif
}
- old_usb_led = usb_led;
-} // End of led_set_user
+}
diff --git a/keyboards/tetris/readme.md b/keyboards/tetris/readme.md
index b2741caf1c0..260d453a84c 100644
--- a/keyboards/tetris/readme.md
+++ b/keyboards/tetris/readme.md
@@ -2,6 +2,8 @@ Tetris
===
A compact 40% (12x4) ortholinear keyboard (Planck Mit layout) with per switch RGB and encoder made by Fengz.
+Fake keys on the 5th row are for configuring the encoder's keycode.
+

More: [Imgur](https://imgur.com/gallery/Azq2zUm).
@@ -12,4 +14,4 @@ Make example for this keyboard (after setting up your build environment):
make tetris:default
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
\ No newline at end of file
+See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk
old mode 100644
new mode 100755
index 64c43455434..c3e641c8f21
--- a/keyboards/tetris/rules.mk
+++ b/keyboards/tetris/rules.mk
@@ -36,26 +36,25 @@ 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
BOOTLOADER =qmk-dfu
+
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+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
+AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = yes
-TAP_DANCE_ENABLE = no
-
-EXTRAFLAGS += -flto # Make the hex smaller
-
-LAYOUTS = planck_mit
+EXTRAFLAGS = -flto
+ENCODER_ENABLE = yes
diff --git a/keyboards/tetris/tetris.c b/keyboards/tetris/tetris.c
old mode 100644
new mode 100755
index 8d494c17f3e..f78de2f7be6
--- a/keyboards/tetris/tetris.c
+++ b/keyboards/tetris/tetris.c
@@ -1 +1 @@
-#include "tetris.h"
+#include QMK_KEYBOARD_H
diff --git a/keyboards/tetris/tetris.h b/keyboards/tetris/tetris.h
old mode 100644
new mode 100755
index 0a036ec3b33..f5d13e5c2f8
--- a/keyboards/tetris/tetris.h
+++ b/keyboards/tetris/tetris.h
@@ -7,12 +7,14 @@
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
- K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \
+ K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, \
+ K400, K401, K410, K411 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
- { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \
+ { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 }, \
+ { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411 } \
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/touchpad/info.json b/keyboards/touchpad/info.json
new file mode 100644
index 00000000000..625bbffd8e0
--- /dev/null
+++ b/keyboards/touchpad/info.json
@@ -0,0 +1,19 @@
+{
+ "keyboard_name": "touchpad",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 6,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_ortho_6x6": {
+ "layout": [
+ {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
+ {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1},
+ {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2},
+ {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3},
+ {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4},
+ {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}, {"x":4, "y":5}, {"x":5, "y":5}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/touchpad/keymaps/default/keymap.c b/keyboards/touchpad/keymaps/default/keymap.c
index 92f772aaa8c..7fcaa70c5d4 100644
--- a/keyboards/touchpad/keymaps/default/keymap.c
+++ b/keyboards/touchpad/keymaps/default/keymap.c
@@ -18,13 +18,13 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = {
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F },
- { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }
-}
+ [0] = LAYOUT_ortho_6x6(
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
+ KC_A, KC_B, KC_C, KC_D, KC_E, KC_F
+ )
};
diff --git a/keyboards/touchpad/touchpad.h b/keyboards/touchpad/touchpad.h
index 010d4b1383a..97b59a033c4 100644
--- a/keyboards/touchpad/touchpad.h
+++ b/keyboards/touchpad/touchpad.h
@@ -1,2 +1,19 @@
#pragma once
#include "quantum.h"
+
+#define LAYOUT_ortho_6x6( \
+ K00, K01, K02, K03, K04, K05, \
+ K10, K11, K12, K13, K14, K15, \
+ K20, K21, K22, K23, K24, K25, \
+ K30, K31, K32, K33, K34, K35, \
+ K40, K41, K42, K43, K44, K45, \
+ K50, K51, K52, K53, K54, K55 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05 }, \
+ { K10, K11, K12, K13, K14, K15 }, \
+ { K20, K21, K22, K23, K24, K25 }, \
+ { K30, K31, K32, K33, K34, K35 }, \
+ { K40, K41, K42, K43, K44, K45 }, \
+ { K50, K51, K52, K53, K54, K55 } \
+}
diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c
new file mode 100644
index 00000000000..32c688e2bb3
--- /dev/null
+++ b/keyboards/treadstone48/common/glcdfont.c
@@ -0,0 +1,244 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+
+#ifndef FONT5X7_H
+#define FONT5X7_H
+
+#ifdef __AVR__
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else
+ #define PROGMEM
+#endif
+
+// Standard ASCII 5x7 font
+
+static const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+ 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+ 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+ 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+ 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+ 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+ 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+ 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+ 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+ 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+ 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+ 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+ 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+ 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+ 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+ 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+ 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+ 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+ 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+ 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+ 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+ 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+ 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+ 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+ 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+ 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+ 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+ 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+ 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+ 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+ 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+ 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+ 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+ 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+ 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+ 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+ 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+ 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+ 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+ 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+ 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+ 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+ 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+ 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+ 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+ 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+ 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+ 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+ 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+ 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+ 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+ 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+ 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+ 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+ 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+ 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+ 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+ 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+ 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+ 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+ 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+ 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+ 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+ 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+ 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+ 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+ 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+ 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+ 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+ 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+ 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
+ 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+ 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+ 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+ 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+ 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
+ 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+ 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+ 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+ 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+ 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+ 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+ 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+ 0x4C, 0x10, 0x10, 0x10, 0x7C, 0x00,
+ 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+ 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+ 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+ 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+ 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+#endif // FONT5X7_H
diff --git a/keyboards/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c
new file mode 100644
index 00000000000..500d3c0dc10
--- /dev/null
+++ b/keyboards/treadstone48/common/oled_helper.c
@@ -0,0 +1,83 @@
+#ifdef SSD1306OLED
+#include QMK_KEYBOARD_H
+#include "ssd1306.h"
+
+void render_logo(struct CharacterMatrix *matrix) {
+
+ const char logo_buf[]={
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
+ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+ 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
+ 0};
+
+ matrix_write(matrix, logo_buf);
+}
+
+static char keylog_buf[24] = "Key state ready.";
+const char code_to_name[60] = {
+ ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+ 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+ '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
+ 'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ',
+ ' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '};
+
+void update_key_status(uint16_t keycode, keyrecord_t *record) {
+
+ if (!record->event.pressed) return;
+
+ char name = (keycode < 60) ? code_to_name[keycode] : ' ';
+ snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c",
+ record->event.key.row, record->event.key.col,
+ (uint16_t)keycode, name);
+}
+
+void render_key_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, keylog_buf);
+}
+
+static char lock_buf[24] = "Lock state ready.\n";
+void update_lock_status(void) {
+
+ uint8_t leds = host_keyboard_leds();
+ char *num_lock = (leds & (1<
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+// GCC include 'config.h" sequence in qmk_firmware/keyboards/treadstone48/
+// -include keyboards/treadstone48/config.h
+// -include keyboards/treadstone48/rev?/config.h
+// -include keyboards/treadstone48/rev?/keymaps/MAPNAME/config.h
+// XXXX.c
+
+#include
+
+// GCC include search path in qmk_firmare/keyboards/treadstone48/
+// #include "..." search starts here:
+// #include <...> search starts here:
+// keyboards/treadstone48/rev?/keymaps/MAPNAME
+// keyboards/treadstone48
+// keyboards/treadstone48/rev?
+// .
+// ./tmk_core
+// ......
+
+// MACRO and FUNCTION are features that are depreciated.
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/sol/i2c.c b/keyboards/treadstone48/i2c.c
similarity index 100%
rename from keyboards/sol/i2c.c
rename to keyboards/treadstone48/i2c.c
diff --git a/keyboards/sol/i2c.h b/keyboards/treadstone48/i2c.h
similarity index 96%
rename from keyboards/sol/i2c.h
rename to keyboards/treadstone48/i2c.h
index 47cf6bd1b2c..710662c7abd 100644
--- a/keyboards/sol/i2c.h
+++ b/keyboards/treadstone48/i2c.h
@@ -1,5 +1,4 @@
-#ifndef I2C_H
-#define I2C_H
+#pragma once
#include
@@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void);
extern unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
-
-#endif
diff --git a/keyboards/treadstone48/keymaps/default/config.h b/keyboards/treadstone48/keymaps/default/config.h
new file mode 100644
index 00000000000..3f63a0cfbbd
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/config.h
@@ -0,0 +1,60 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+// place overrides here
+
+#ifdef TAPPING_TERM
+#undef TAPPING_TERM
+#endif
+#define TAPPING_TERM 225
+// #define PREVENT_STUCK_MODIFIERS
+// #define IGNORE_MOD_TAP_INTERRUPT
+
+#ifdef MOUSEKEY_ENABLE
+ #undef MOUSEKEY_INTERVAL
+ #define MOUSEKEY_INTERVAL 1
+
+ #undef MOUSEKEY_TIME_TO_MAX
+ #define MOUSEKEY_TIME_TO_MAX 150
+
+ #undef MOUSEKEY_MAX_SPEED
+ #define MOUSEKEY_MAX_SPEED 3
+
+ #undef MOUSEKEY_MOVE_DELTA
+ #define MOUSEKEY_MOVE_DELTA 4
+
+ #undef MOUSEKEY_DELAY
+ #define MOUSEKEY_DELAY 0
+#endif
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ //#define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ //#define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ //#define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c
new file mode 100644
index 00000000000..406f1129212
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/keymap.c
@@ -0,0 +1,278 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include "../common/oled_helper.h"
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ LOWER = SAFE_RANGE,
+ RAISE,
+ ADJUST,
+ KANJI,
+ RGBRST
+};
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_SLRO,
+};
+
+// Layer Mode aliases
+#define _____ KC_TRNS
+#define XXXXX KC_NO
+
+#define KC_TBSF LSFT_T(KC_TAB)
+// #define KC_SPSF LSFT_T(KC_SPC)
+#define KC_ALAP LALT_T(KC_APP)
+#define KC_JEQL LSFT(KC_MINS)
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_SLRO TD(TD_SLRO)
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWER] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, KC_SCLN, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, XXXXX, KC_COMM, KC_DOT, KC_GRV, KC_PGUP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_RAISE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_ADJUST] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ )
+};
+
+#define L_BASE _BASE
+#define L_LOWER (1<<_LOWER)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+#ifdef SSD1306OLED
+typedef struct {
+ uint8_t state;
+ char name[8];
+}LAYER_DISPLAY_NAME;
+
+#define LAYER_DISPLAY_MAX 5
+const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
+ {L_BASE, "Base"},
+ {L_BASE + 1, "Base"},
+ {L_LOWER, "Lower"},
+ {L_RAISE, "Raise"},
+ {L_ADJUST_TRI, "Adjust"}
+};
+
+static inline const char* get_leyer_status(void) {
+
+ for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
+ if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
+
+ return layer_display_name[i].name;
+ } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
+
+ return layer_display_name[i].name;
+ }
+ }
+
+ return "?";
+}
+
+static char layer_status_buf[24] = "Layer state ready.\n";
+static inline void update_keymap_status(void) {
+
+ snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
+ keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
+}
+
+static inline void render_keymap_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, layer_status_buf);
+}
+
+#define UPDATE_KEYMAP_STATUS() update_keymap_status()
+#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
+
+#else
+
+#define UPDATE_KEYMAP_STATUS()
+#define RENDER_KEYMAP_STATUS(a)
+
+#endif
+
+static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+
+ pressed ? layer_on(layer1) : layer_off(layer1);
+ IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
+}
+
+int RGB_current_mode;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ UPDATE_KEY_STATUS(keycode, record);
+
+ bool result = false;
+ switch (keycode) {
+ case LOWER:
+ update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
+ break;
+ case RAISE:
+ update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
+ break;
+ case KANJI:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui == false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ case RGBRST:
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ #endif
+ default:
+ result = true;
+ break;
+ }
+
+ UPDATE_KEYMAP_STATUS();
+ return result;
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+static inline void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+static inline void render_status(struct CharacterMatrix *matrix) {
+
+ UPDATE_LED_STATUS();
+ RENDER_LED_STATUS(matrix);
+ RENDER_KEYMAP_STATUS(matrix);
+ UPDATE_LOCK_STATUS();
+ RENDER_LOCK_STATUS(matrix);
+ RENDER_KEY_STATUS(matrix);
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+ #if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+ #endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/treadstone48/keymaps/default/readme.md b/keyboards/treadstone48/keymaps/default/readme.md
new file mode 100644
index 00000000000..bb835d169c1
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# Default keymap for treadstone48
+
+## Description
+
+## How to use
diff --git a/keyboards/treadstone48/keymaps/default/readme_jp.md b/keyboards/treadstone48/keymaps/default/readme_jp.md
new file mode 100644
index 00000000000..6043c93cbce
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/readme_jp.md
@@ -0,0 +1,80 @@
+# US配列ライクデフォルトキーマップ
+
+## 概要
+
+ US配列ライクなデフォルトキーマップです。
+
+## キーマップの見かた
+
+qmk_firmware\tmk_core\common\keycode.h
+に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
+キーマップに書くときは「KC_」を省略して書いています。
+例:KC_A → A
+
+Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。
+
+Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
+例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
+
+Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
+例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
+
+Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。
+例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT
+
+もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
+
+## 機能
+
+ QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+ DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。
+ Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。
+ マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。
+
+## 48キー目について
+
+ このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。
+
+ 各レイヤーの最下段の
+
+```c
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+```
+
+ のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。
+
+## OS切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
+- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
+
+## NUMPADモードについて
+
+ Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。
+
+## IME切り替え方法
+
+ Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
+
+## ソフトウェアリセットについて
+
+ キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。
+
+## LEDの点灯切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- RGBRST: LEDのリセット
+- RGB_TOG: LEDのON/OFF切り替え
+- RGB_MOD: LEDの光り方の変更
+- RGB_HUI: Hue+ 色合いを変更
+- RGB_HUD: Hue- 色合いを変更
+- RGB_SAI: Saturation+ 色の濃さを変更
+- RGB_SAD: Saturation- 色の濃さを変更
+- RGB_VAI: Value+ 明るさを変更
+- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk
new file mode 100644
index 00000000000..c53226431d3
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/rules.mk
@@ -0,0 +1,67 @@
+
+# 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 = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+TAP_DANCE_ENABLE = yes
+
+# If your custom treadstone48 pcb, you can rewrite to yes.
+OLED_ENABLE = no # OLED_ENABLE
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+
+# Other selectable option
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c"
+# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes.
+ANGELINA_KEYMAP = no # If Alfa verstion use set to yes.
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+ OPT_DEFS += -DLED_ANIMATIONS
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes)
+# OPT_DEFS += -DRHYMESTONE_RIGHTHAND
+# endif
+
+ifeq ($(strip $(ANGELINA_KEYMAP)), yes)
+ OPT_DEFS += -DANGELINA_KEYMAP
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./common/oled_helper.c \
diff --git a/keyboards/treadstone48/keymaps/like_jis/config.h b/keyboards/treadstone48/keymaps/like_jis/config.h
new file mode 100644
index 00000000000..3f63a0cfbbd
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/config.h
@@ -0,0 +1,60 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+// place overrides here
+
+#ifdef TAPPING_TERM
+#undef TAPPING_TERM
+#endif
+#define TAPPING_TERM 225
+// #define PREVENT_STUCK_MODIFIERS
+// #define IGNORE_MOD_TAP_INTERRUPT
+
+#ifdef MOUSEKEY_ENABLE
+ #undef MOUSEKEY_INTERVAL
+ #define MOUSEKEY_INTERVAL 1
+
+ #undef MOUSEKEY_TIME_TO_MAX
+ #define MOUSEKEY_TIME_TO_MAX 150
+
+ #undef MOUSEKEY_MAX_SPEED
+ #define MOUSEKEY_MAX_SPEED 3
+
+ #undef MOUSEKEY_MOVE_DELTA
+ #define MOUSEKEY_MOVE_DELTA 4
+
+ #undef MOUSEKEY_DELAY
+ #define MOUSEKEY_DELAY 0
+#endif
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ //#define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ //#define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ //#define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c
new file mode 100644
index 00000000000..b63b0c9f495
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c
@@ -0,0 +1,278 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include "../common/oled_helper.h"
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ LOWER = SAFE_RANGE,
+ RAISE,
+ ADJUST,
+ KANJI,
+ RGBRST
+};
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_SLRO,
+};
+
+// Layer Mode aliases
+#define _____ KC_TRNS
+#define XXXXX KC_NO
+
+#define KC_TBSF LSFT_T(KC_TAB)
+// #define KC_SPSF LSFT_T(KC_SPC)
+#define KC_ALAP LALT_T(KC_APP)
+#define KC_JEQL LSFT(KC_MINS)
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_SLRO TD(TD_SLRO)
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWER] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_RAISE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_ADJUST] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ )
+};
+
+#define L_BASE _BASE
+#define L_LOWER (1<<_LOWER)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+#ifdef SSD1306OLED
+typedef struct {
+ uint8_t state;
+ char name[8];
+}LAYER_DISPLAY_NAME;
+
+#define LAYER_DISPLAY_MAX 5
+const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
+ {L_BASE, "Base"},
+ {L_BASE + 1, "Base"},
+ {L_LOWER, "Lower"},
+ {L_RAISE, "Raise"},
+ {L_ADJUST_TRI, "Adjust"}
+};
+
+static inline const char* get_leyer_status(void) {
+
+ for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
+ if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
+
+ return layer_display_name[i].name;
+ } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
+
+ return layer_display_name[i].name;
+ }
+ }
+
+ return "?";
+}
+
+static char layer_status_buf[24] = "Layer state ready.\n";
+static inline void update_keymap_status(void) {
+
+ snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
+ keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
+}
+
+static inline void render_keymap_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, layer_status_buf);
+}
+
+#define UPDATE_KEYMAP_STATUS() update_keymap_status()
+#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
+
+#else
+
+#define UPDATE_KEYMAP_STATUS()
+#define RENDER_KEYMAP_STATUS(a)
+
+#endif
+
+static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+
+ pressed ? layer_on(layer1) : layer_off(layer1);
+ IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
+}
+
+int RGB_current_mode;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ UPDATE_KEY_STATUS(keycode, record);
+
+ bool result = false;
+ switch (keycode) {
+ case LOWER:
+ update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
+ break;
+ case RAISE:
+ update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
+ break;
+ case KANJI:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui == false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ case RGBRST:
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ #endif
+ default:
+ result = true;
+ break;
+ }
+
+ UPDATE_KEYMAP_STATUS();
+ return result;
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+static inline void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+static inline void render_status(struct CharacterMatrix *matrix) {
+
+ UPDATE_LED_STATUS();
+ RENDER_LED_STATUS(matrix);
+ RENDER_KEYMAP_STATUS(matrix);
+ UPDATE_LOCK_STATUS();
+ RENDER_LOCK_STATUS(matrix);
+ RENDER_KEY_STATUS(matrix);
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+ #if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+ #endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis/readme.md b/keyboards/treadstone48/keymaps/like_jis/readme.md
new file mode 100644
index 00000000000..796df6c4cd7
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/readme.md
@@ -0,0 +1,5 @@
+# The like jis type keyboard keymap for treadstone48
+
+## Description
+
+## How to use
diff --git a/keyboards/treadstone48/keymaps/like_jis/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md
new file mode 100644
index 00000000000..305ded471da
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md
@@ -0,0 +1,80 @@
+# JISキーボードライクなキーマップ
+
+## 概要
+
+ デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。
+
+## キーマップの見かた
+
+qmk_firmware\tmk_core\common\keycode.h
+に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
+キーマップに書くときは「KC_」を省略して書いています。
+例:KC_A → A
+
+Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。
+
+Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
+例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
+
+Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
+例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
+
+Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。
+例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT
+
+もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
+
+## 機能
+
+ QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+ DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。
+ Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。
+ マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。
+
+## 48キー目について
+
+ このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。
+
+ 各レイヤーの最下段の
+
+```c
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+```
+
+ のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。
+
+## OS切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
+- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
+
+## NUMPADモードについて
+
+ Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。
+
+## IME切り替え方法
+
+ Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
+
+## ソフトウェアリセットについて
+
+ キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。
+
+## LEDの点灯切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- RGBRST: LEDのリセット
+- RGB_TOG: LEDのON/OFF切り替え
+- RGB_MOD: LEDの光り方の変更
+- RGB_HUI: Hue+ 色合いを変更
+- RGB_HUD: Hue- 色合いを変更
+- RGB_SAI: Saturation+ 色の濃さを変更
+- RGB_SAD: Saturation- 色の濃さを変更
+- RGB_VAI: Value+ 明るさを変更
+- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk
new file mode 100644
index 00000000000..c53226431d3
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk
@@ -0,0 +1,67 @@
+
+# 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 = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+TAP_DANCE_ENABLE = yes
+
+# If your custom treadstone48 pcb, you can rewrite to yes.
+OLED_ENABLE = no # OLED_ENABLE
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+
+# Other selectable option
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c"
+# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes.
+ANGELINA_KEYMAP = no # If Alfa verstion use set to yes.
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+ OPT_DEFS += -DLED_ANIMATIONS
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes)
+# OPT_DEFS += -DRHYMESTONE_RIGHTHAND
+# endif
+
+ifeq ($(strip $(ANGELINA_KEYMAP)), yes)
+ OPT_DEFS += -DANGELINA_KEYMAP
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./common/oled_helper.c \
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/config.h b/keyboards/treadstone48/keymaps/like_jis_rs/config.h
new file mode 100644
index 00000000000..e8acd5c76d4
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/config.h
@@ -0,0 +1,60 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+// place overrides here
+
+#ifdef TAPPING_TERM
+#undef TAPPING_TERM
+#endif
+#define TAPPING_TERM 225
+#define PREVENT_STUCK_MODIFIERS
+#define IGNORE_MOD_TAP_INTERRUPT
+
+#ifdef MOUSEKEY_ENABLE
+ #undef MOUSEKEY_INTERVAL
+ #define MOUSEKEY_INTERVAL 1
+
+ #undef MOUSEKEY_TIME_TO_MAX
+ #define MOUSEKEY_TIME_TO_MAX 150
+
+ #undef MOUSEKEY_MAX_SPEED
+ #define MOUSEKEY_MAX_SPEED 3
+
+ #undef MOUSEKEY_MOVE_DELTA
+ #define MOUSEKEY_MOVE_DELTA 4
+
+ #undef MOUSEKEY_DELAY
+ #define MOUSEKEY_DELAY 0
+#endif
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ //#define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ //#define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ //#define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c
new file mode 100644
index 00000000000..0e4ec063ccb
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c
@@ -0,0 +1,342 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include "../common/oled_helper.h"
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _BASES,
+ _LOWER,
+ _LOWRS,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ BASE = SAFE_RANGE,
+ BASES,
+ LOWER,
+ LOWRS,
+ RAISE,
+ ADJUST,
+ KANJI,
+ RGBRST
+};
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_SLRO,
+};
+
+// Layer Mode aliases
+#define _____ KC_TRNS
+#define XXXXX KC_NO
+
+#define KC_TBSF LSFT_T(KC_TAB)
+// #define KC_SPSF LSFT_T(KC_SPC)
+#define KC_ALAP LALT_T(KC_APP)
+#define KC_JEQL LSFT(KC_MINS)
+#define KC_SFUC LSFT(KC_RO)
+#define KC_RSBR LSFT(KC_8)
+#define KC_REBR LSFT(KC_9)
+
+#define KC_ZSFT LSFT_T(KC_Z)
+#define KC_ESCT LCTL_T(KC_ESC)
+#define KC_TBAL LALT_T(KC_TAB)
+#define KC_11SF LSFT_T(KC_F11)
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_SLRO TD(TD_SLRO)
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_NLCK,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, LOWER, KC_P0, KC_PDOT, KC_PPLS, KC_BSPC,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWER] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_A, KC_B, KC_C, KC_JYEN, KC_HASH,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_D, KC_E, KC_F, KC_PERC, KC_SFUC,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, BASES, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_RSBR, KC_REBR, KC_RBRC, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, XXXXX, KC_COMM, KC_JEQL, KC_DEL,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_BASES] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_Q, KC_W, KC_E, KC_R, KC_T,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_ZSFT, KC_X, KC_C, KC_V, KC_B,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, KC_ESCT, KC_TBAL, KC_LGUI, LOWRS, KC_BSPC,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWRS] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, BASE, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_11SF, KC_F12, BASE, KANJI, KC_ENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, _____, _____, _____, KC_DEL,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_RAISE] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_ADJUST] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ )
+};
+
+#define L_BASE _BASE
+#define L_BASES (1<<_BASES)
+#define L_LOWER (1<<_LOWER)
+#define L_LOWRS (1<<_LOWRS)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+#ifdef SSD1306OLED
+typedef struct {
+ uint8_t state;
+ char name[8];
+}LAYER_DISPLAY_NAME;
+
+#define LAYER_DISPLAY_MAX 7
+const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
+ {L_BASE, "Base"},
+ {L_BASE + 1, "Base"},
+ {L_BASES, "BaseSpl"},
+ {L_LOWER, "Lower"},
+ {L_LOWRS, "LowrSpl"},
+ {L_RAISE, "Raise"},
+ {L_ADJUST_TRI, "Adjust"}
+};
+
+static inline const char* get_leyer_status(void) {
+
+ for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
+ if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
+
+ return layer_display_name[i].name;
+ } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
+
+ return layer_display_name[i].name;
+ }
+ }
+
+ return "?";
+}
+
+static char layer_status_buf[24] = "Layer state ready.\n";
+static inline void update_keymap_status(void) {
+
+ snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
+ keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
+}
+
+static inline void render_keymap_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, layer_status_buf);
+}
+
+#define UPDATE_KEYMAP_STATUS() update_keymap_status()
+#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
+
+#else
+
+#define UPDATE_KEYMAP_STATUS()
+#define RENDER_KEYMAP_STATUS(a)
+
+#endif
+
+void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+
+ pressed ? layer_on(layer1) : layer_off(layer1);
+ IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
+}
+
+int RGB_current_mode;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ UPDATE_KEY_STATUS(keycode, record);
+
+ bool result = false;
+ switch (keycode) {
+ case LOWER:
+ update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
+ break;
+ case RAISE:
+ update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
+ break;
+ case BASE:
+ if (record->event.pressed) {
+ default_layer_set(L_BASE);
+ }
+ break;
+ case BASES:
+ if (record->event.pressed) {
+ default_layer_set(L_BASES);
+ }
+ break;
+ case LOWRS:
+ update_change_layer(record->event.pressed, _LOWRS, _RAISE, _ADJUST);
+ break;
+ case KANJI:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui == false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ case RGBRST:
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ #endif
+ default:
+ result = true;
+ break;
+ }
+
+ UPDATE_KEYMAP_STATUS();
+ return result;
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+static inline void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+static inline void render_status(struct CharacterMatrix *matrix) {
+
+ UPDATE_LED_STATUS();
+ RENDER_LED_STATUS(matrix);
+ RENDER_KEYMAP_STATUS(matrix);
+ UPDATE_LOCK_STATUS();
+ RENDER_LOCK_STATUS(matrix);
+ RENDER_KEY_STATUS(matrix);
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+ #if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+ #endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md
new file mode 100644
index 00000000000..796df6c4cd7
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md
@@ -0,0 +1,5 @@
+# The like jis type keyboard keymap for treadstone48
+
+## Description
+
+## How to use
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md
new file mode 100644
index 00000000000..5a6fc1d73b8
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md
@@ -0,0 +1,84 @@
+# JISキーボードライクなキーマップ
+
+## 概要
+
+ デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。
+ オプションのRhymestone用のマップを使用するために拡張しています。RhymestoneのpromicroにもTreadstone48のキーマップを入れてください。
+ Rhymestoneは基本的には左手側を使うことを想定していますが、右手側を使用する場合はrules.mkにあるRHYMESTONE_RIGHTHAND設定をyesにすれば使えるようになります。
+
+```RHYMESTONE_RIGHTHAND=yes```
+
+## キーマップの見かた
+
+qmk_firmware\tmk_core\common\keycode.h
+に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
+キーマップに書くときは「KC_」を省略して書いています。
+例:KC_A → A
+
+Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。
+
+Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
+例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
+
+Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
+例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
+
+Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。
+例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT
+
+もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
+
+## 機能
+
+ QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+ DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。
+ Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。
+ マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。
+
+## 48キー目について
+
+ このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。
+
+ 各レイヤーの最下段の
+
+```c
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+```
+
+ のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。
+
+## OS切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
+- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
+
+## NUMPADモードについて
+
+ Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。
+
+## IME切り替え方法
+
+ Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
+
+## ソフトウェアリセットについて
+
+ キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。
+
+## LEDの点灯切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- RGBRST: LEDのリセット
+- RGB_TOG: LEDのON/OFF切り替え
+- RGB_MOD: LEDの光り方の変更
+- RGB_HUI: Hue+ 色合いを変更
+- RGB_HUD: Hue- 色合いを変更
+- RGB_SAI: Saturation+ 色の濃さを変更
+- RGB_SAD: Saturation- 色の濃さを変更
+- RGB_VAI: Value+ 明るさを変更
+- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk
new file mode 100644
index 00000000000..c34bb2e34a0
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk
@@ -0,0 +1,67 @@
+
+# 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 = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+TAP_DANCE_ENABLE = yes
+
+# If your custom treadstone48 pcb, you can rewrite to yes.
+OLED_ENABLE = no # OLED_ENABLE
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+
+# Other selectable option
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c"
+RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes.
+ANGELINA_KEYMAP = no # If Alfa verstion use set to yes.
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+ OPT_DEFS += -DLED_ANIMATIONS
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes)
+ OPT_DEFS += -DRHYMESTONE_RIGHTHAND
+endif
+
+ifeq ($(strip $(ANGELINA_KEYMAP)), yes)
+ OPT_DEFS += -DANGELINA_KEYMAP
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./common/oled_helper.c \
diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h
new file mode 100644
index 00000000000..f9e7ed75d9d
--- /dev/null
+++ b/keyboards/treadstone48/pro_micro.h
@@ -0,0 +1,362 @@
+/*
+ pins_arduino.h - Pin definition functions for Arduino
+ Part of Arduino - http://www.arduino.cc/
+
+ Copyright (c) 2007 David A. Mellis
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General
+ Public License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA
+
+ $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
+*/
+
+#ifndef Pins_Arduino_h
+#define Pins_Arduino_h
+
+#include
+
+// Workaround for wrong definitions in "iom32u4.h".
+// This should be fixed in the AVR toolchain.
+#undef UHCON
+#undef UHINT
+#undef UHIEN
+#undef UHADDR
+#undef UHFNUM
+#undef UHFNUML
+#undef UHFNUMH
+#undef UHFLEN
+#undef UPINRQX
+#undef UPINTX
+#undef UPNUM
+#undef UPRST
+#undef UPCONX
+#undef UPCFG0X
+#undef UPCFG1X
+#undef UPSTAX
+#undef UPCFG2X
+#undef UPIENX
+#undef UPDATX
+#undef TCCR2A
+#undef WGM20
+#undef WGM21
+#undef COM2B0
+#undef COM2B1
+#undef COM2A0
+#undef COM2A1
+#undef TCCR2B
+#undef CS20
+#undef CS21
+#undef CS22
+#undef WGM22
+#undef FOC2B
+#undef FOC2A
+#undef TCNT2
+#undef TCNT2_0
+#undef TCNT2_1
+#undef TCNT2_2
+#undef TCNT2_3
+#undef TCNT2_4
+#undef TCNT2_5
+#undef TCNT2_6
+#undef TCNT2_7
+#undef OCR2A
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+#undef OCR2B
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+
+#define NUM_DIGITAL_PINS 30
+#define NUM_ANALOG_INPUTS 12
+
+#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
+#define TXLED0 PORTD |= (1<<5)
+#define TXLED1 PORTD &= ~(1<<5)
+#define RXLED0 PORTB |= (1<<0)
+#define RXLED1 PORTB &= ~(1<<0)
+
+static const uint8_t SDA = 2;
+static const uint8_t SCL = 3;
+#define LED_BUILTIN 13
+
+// Map SPI port to 'new' pins D14..D17
+static const uint8_t SS = 17;
+static const uint8_t MOSI = 16;
+static const uint8_t MISO = 14;
+static const uint8_t SCK = 15;
+
+// Mapping of analog pins as digital I/O
+// A6-A11 share with digital pins
+static const uint8_t ADC0 = 18;
+static const uint8_t ADC1 = 19;
+static const uint8_t ADC2 = 20;
+static const uint8_t ADC3 = 21;
+static const uint8_t ADC4 = 22;
+static const uint8_t ADC5 = 23;
+static const uint8_t ADC6 = 24; // D4
+static const uint8_t ADC7 = 25; // D6
+static const uint8_t ADC8 = 26; // D8
+static const uint8_t ADC9 = 27; // D9
+static const uint8_t ADC10 = 28; // D10
+static const uint8_t ADC11 = 29; // D12
+
+#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
+#define digitalPinToPCICRbit(p) 0
+#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
+#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
+
+// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
+extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
+#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
+
+#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
+
+#ifdef ARDUINO_MAIN
+
+// On the Arduino board, digital pins are also used
+// for the analog output (software PWM). Analog input
+// pins are a separate set.
+
+// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
+//
+// D0 PD2 RXD1/INT2
+// D1 PD3 TXD1/INT3
+// D2 PD1 SDA SDA/INT1
+// D3# PD0 PWM8/SCL OC0B/SCL/INT0
+// D4 A6 PD4 ADC8
+// D5# PC6 ??? OC3A/#OC4A
+// D6# A7 PD7 FastPWM #OC4D/ADC10
+// D7 PE6 INT6/AIN0
+//
+// D8 A8 PB4 ADC11/PCINT4
+// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
+// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
+// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
+// D12 A11 PD6 T1/#OC4D/ADC9
+// D13# PC7 PWM10 CLK0/OC4A
+//
+// A0 D18 PF7 ADC7
+// A1 D19 PF6 ADC6
+// A2 D20 PF5 ADC5
+// A3 D21 PF4 ADC4
+// A4 D22 PF1 ADC1
+// A5 D23 PF0 ADC0
+//
+// New pins D14..D17 to map SPI port to digital pins
+//
+// MISO D14 PB3 MISO,PCINT3
+// SCK D15 PB1 SCK,PCINT1
+// MOSI D16 PB2 MOSI,PCINT2
+// SS D17 PB0 RXLED,SS/PCINT0
+//
+// Connected LEDs on board for TX and RX
+// TXLED D24 PD5 XCK1
+// RXLED D17 PB0
+// HWB PE2 HWB
+
+// these arrays map port names (e.g. port B) to the
+// appropriate addresses for various functions (e.g. reading
+// and writing)
+const uint16_t PROGMEM port_to_mode_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &DDRB,
+ (uint16_t) &DDRC,
+ (uint16_t) &DDRD,
+ (uint16_t) &DDRE,
+ (uint16_t) &DDRF,
+};
+
+const uint16_t PROGMEM port_to_output_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &PORTB,
+ (uint16_t) &PORTC,
+ (uint16_t) &PORTD,
+ (uint16_t) &PORTE,
+ (uint16_t) &PORTF,
+};
+
+const uint16_t PROGMEM port_to_input_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &PINB,
+ (uint16_t) &PINC,
+ (uint16_t) &PIND,
+ (uint16_t) &PINE,
+ (uint16_t) &PINF,
+};
+
+const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
+ PD, // D0 - PD2
+ PD, // D1 - PD3
+ PD, // D2 - PD1
+ PD, // D3 - PD0
+ PD, // D4 - PD4
+ PC, // D5 - PC6
+ PD, // D6 - PD7
+ PE, // D7 - PE6
+
+ PB, // D8 - PB4
+ PB, // D9 - PB5
+ PB, // D10 - PB6
+ PB, // D11 - PB7
+ PD, // D12 - PD6
+ PC, // D13 - PC7
+
+ PB, // D14 - MISO - PB3
+ PB, // D15 - SCK - PB1
+ PB, // D16 - MOSI - PB2
+ PB, // D17 - SS - PB0
+
+ PF, // D18 - A0 - PF7
+ PF, // D19 - A1 - PF6
+ PF, // D20 - A2 - PF5
+ PF, // D21 - A3 - PF4
+ PF, // D22 - A4 - PF1
+ PF, // D23 - A5 - PF0
+
+ PD, // D24 - PD5
+ PD, // D25 / D6 - A7 - PD7
+ PB, // D26 / D8 - A8 - PB4
+ PB, // D27 / D9 - A9 - PB5
+ PB, // D28 / D10 - A10 - PB6
+ PD, // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
+ _BV(2), // D0 - PD2
+ _BV(3), // D1 - PD3
+ _BV(1), // D2 - PD1
+ _BV(0), // D3 - PD0
+ _BV(4), // D4 - PD4
+ _BV(6), // D5 - PC6
+ _BV(7), // D6 - PD7
+ _BV(6), // D7 - PE6
+
+ _BV(4), // D8 - PB4
+ _BV(5), // D9 - PB5
+ _BV(6), // D10 - PB6
+ _BV(7), // D11 - PB7
+ _BV(6), // D12 - PD6
+ _BV(7), // D13 - PC7
+
+ _BV(3), // D14 - MISO - PB3
+ _BV(1), // D15 - SCK - PB1
+ _BV(2), // D16 - MOSI - PB2
+ _BV(0), // D17 - SS - PB0
+
+ _BV(7), // D18 - A0 - PF7
+ _BV(6), // D19 - A1 - PF6
+ _BV(5), // D20 - A2 - PF5
+ _BV(4), // D21 - A3 - PF4
+ _BV(1), // D22 - A4 - PF1
+ _BV(0), // D23 - A5 - PF0
+
+ _BV(5), // D24 - PD5
+ _BV(7), // D25 / D6 - A7 - PD7
+ _BV(4), // D26 / D8 - A8 - PB4
+ _BV(5), // D27 / D9 - A9 - PB5
+ _BV(6), // D28 / D10 - A10 - PB6
+ _BV(6), // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ TIMER0B, /* 3 */
+ NOT_ON_TIMER,
+ TIMER3A, /* 5 */
+ TIMER4D, /* 6 */
+ NOT_ON_TIMER,
+
+ NOT_ON_TIMER,
+ TIMER1A, /* 9 */
+ TIMER1B, /* 10 */
+ TIMER0A, /* 11 */
+
+ NOT_ON_TIMER,
+ TIMER4A, /* 13 */
+
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+};
+
+const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
+ 7, // A0 PF7 ADC7
+ 6, // A1 PF6 ADC6
+ 5, // A2 PF5 ADC5
+ 4, // A3 PF4 ADC4
+ 1, // A4 PF1 ADC1
+ 0, // A5 PF0 ADC0
+ 8, // A6 D4 PD4 ADC8
+ 10, // A7 D6 PD7 ADC10
+ 11, // A8 D8 PB4 ADC11
+ 12, // A9 D9 PB5 ADC12
+ 13, // A10 D10 PB6 ADC13
+ 9 // A11 D12 PD6 ADC9
+};
+
+#endif /* ARDUINO_MAIN */
+
+// These serial port names are intended to allow libraries and architecture-neutral
+// sketches to automatically default to the correct port name for a particular type
+// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
+//
+// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+//
+// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+//
+// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+//
+// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+//
+// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+// pins are NOT connected to anything by default.
+#define SERIAL_PORT_MONITOR Serial
+#define SERIAL_PORT_USBVIRTUAL Serial
+#define SERIAL_PORT_HARDWARE Serial1
+#define SERIAL_PORT_HARDWARE_OPEN Serial1
+
+#endif /* Pins_Arduino_h */
diff --git a/keyboards/treadstone48/readme.md b/keyboards/treadstone48/readme.md
new file mode 100644
index 00000000000..eef39c39b33
--- /dev/null
+++ b/keyboards/treadstone48/readme.md
@@ -0,0 +1,18 @@
+# treadstone48
+
+
+
+A 47 (or 48) keys Symmetric Staggered keyboard.
+
+Keyboard Maintainer: [marksard](https://github.com/marksard)
+Hardware Supported: The PCBs, controllers supported
+Hardware Availability: links to where you can find this hardware
+
+Make example for this keyboard (after setting up your build environment):
+
+ make treadstone48:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstpne48/documents/treadstone48_buildguide.md)
+[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone48)
diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h
new file mode 100644
index 00000000000..d8ecf170ddd
--- /dev/null
+++ b/keyboards/treadstone48/rev1/config.h
@@ -0,0 +1,128 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#ifndef REV1_CONFIG_H
+#define REV1_CONFIG_H
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xDFA3
+#define DEVICE_VER 0x0010
+#define MANUFACTURER marksard
+#define PRODUCT treadstone48
+#define DESCRIPTION Symmetrical staggered 47+1 Keys Keyboard
+
+#define PREVENT_STUCK_MODIFIERS
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 150
+
+/* Use I2C or Serial */
+#define USE_I2C
+#define USE_SERIAL
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+// OLED support
+// see ./rules.mk: OLED_ENABLE=yes or no
+#ifdef OLED_ENABLE
+ #define SSD1306OLED
+#endif
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 16
+#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
+
+// wiring of each half
+#define MATRIX_COLS 6
+#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLIGHT_TIMER
+//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
+#define ws2812_PORTREG PORTD
+#define ws2812_DDRREG DDRD
+
+// treadstone48 keyboard RGB LED support
+//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
+// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
+#define RGBLED_NUM 12
+
+#ifndef IOS_DEVICE_ENABLE
+ #define RGBLIGHT_LIMIT_VAL 180
+ #define RGBLIGHT_VAL_STEP 17
+#else
+ #define RGBLIGHT_LIMIT_VAL 50
+ #define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+// USB_MAX_POWER_CONSUMPTION value for treadstone48 keyboard
+// 120 RGBoff, OLEDoff
+// 120 OLED
+// 330 RGB 6
+// 300 RGB 32
+// 310 OLED & RGB 32
+ #define USB_MAX_POWER_CONSUMPTION 400
+#else
+ // fix iPhone and iPad power adapter issue
+ // iOS device need lessthan 100
+ #define USB_MAX_POWER_CONSUMPTION 100
+#endif
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+
+#endif
diff --git a/keyboards/treadstone48/rev1/info.json b/keyboards/treadstone48/rev1/info.json
new file mode 100644
index 00000000000..df9e7591b50
--- /dev/null
+++ b/keyboards/treadstone48/rev1/info.json
@@ -0,0 +1,261 @@
+{
+ "keyboard_name": "Treadstone48",
+ "url": "https://github.com/marksard/Keyboards",
+ "maintainer": "marksard",
+ "width": 14.75,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_base": {
+ "layout": [
+ {
+ "label": "Esc",
+ "x": 1,
+ "y": 0
+ },
+ {
+ "label": "Q",
+ "x": 2.25,
+ "y": 0
+ },
+ {
+ "label": "W",
+ "x": 3.25,
+ "y": 0
+ },
+ {
+ "label": "E",
+ "x": 4.25,
+ "y": 0
+ },
+ {
+ "label": "R",
+ "x": 5.25,
+ "y": 0
+ },
+ {
+ "label": "T",
+ "x": 6.25,
+ "y": 0
+ },
+ {
+ "label": "Y",
+ "x": 7.75,
+ "y": 0
+ },
+ {
+ "label": "U",
+ "x": 8.75,
+ "y": 0
+ },
+ {
+ "label": "I",
+ "x": 9.75,
+ "y": 0
+ },
+ {
+ "label": "O",
+ "x": 10.75,
+ "y": 0
+ },
+ {
+ "label": "P",
+ "x": 11.75,
+ "y": 0
+ },
+ {
+ "label": "-",
+ "x": 13.75,
+ "y": 0
+ },
+ {
+ "label": "Tab",
+ "x": 1,
+ "y": 1,
+ "w": 1.5
+ },
+ {
+ "label": "A",
+ "x": 2.5,
+ "y": 1
+ },
+ {
+ "label": "S",
+ "x": 3.5,
+ "y": 1
+ },
+ {
+ "label": "D",
+ "x": 4.5,
+ "y": 1
+ },
+ {
+ "label": "F",
+ "x": 5.5,
+ "y": 1
+ },
+ {
+ "label": "G",
+ "x": 6.5,
+ "y": 1
+ },
+ {
+ "label": "H",
+ "x": 7.5,
+ "y": 1
+ },
+ {
+ "label": "J",
+ "x": 8.5,
+ "y": 1
+ },
+ {
+ "label": "K",
+ "x": 9.5,
+ "y": 1
+ },
+ {
+ "label": "L",
+ "x": 10.5,
+ "y": 1
+ },
+ {
+ "label": ":",
+ "x": 11.5,
+ "y": 1
+ },
+ {
+ "label": "Enter",
+ "x": 12.5,
+ "y": 1,
+ "w": 2.25
+ },
+ {
+ "label": "Shift",
+ "x": 0,
+ "y": 2,
+ "w": 2.25
+ },
+ {
+ "label": "Z",
+ "x": 2.25,
+ "y": 2
+ },
+ {
+ "label": "X",
+ "x": 3.25,
+ "y": 2
+ },
+ {
+ "label": "C",
+ "x": 4.25,
+ "y": 2
+ },
+ {
+ "label": "V",
+ "x": 5.25,
+ "y": 2
+ },
+ {
+ "label": "B",
+ "x": 6.25,
+ "y": 2
+ },
+ {
+ "label": "N",
+ "x": 7.75,
+ "y": 2
+ },
+ {
+ "label": "M",
+ "x": 8.75,
+ "y": 2
+ },
+ {
+ "label": "<",
+ "x": 9.75,
+ "y": 2
+ },
+ {
+ "label": ">",
+ "x": 10.75,
+ "y": 2
+ },
+ {
+ "label": "?",
+ "x": 11.75,
+ "y": 2
+ },
+ {
+ "label": "\u2191",
+ "x": 12.75,
+ "y": 2
+ },
+ {
+ "label": "Ctrl",
+ "x": 0.75,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "Win",
+ "x": 2,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "Alt",
+ "x": 3.25,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "Lower",
+ "x": 4.5,
+ "y": 3
+ },
+ {
+ "label": "BackSpace",
+ "x": 5.5,
+ "y": 3,
+ "w": 2
+ },
+ {
+ "x": 7.5,
+ "y": 3,
+ "w": 2
+ },
+ {
+ "label": "Raise",
+ "x": 9.5,
+ "y": 3
+ },
+ {
+ "label": "Menu",
+ "x": 10.5,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "\u2190",
+ "x": 11.75,
+ "y": 3
+ },
+ {
+ "label": "\u2193",
+ "x": 12.75,
+ "y": 3
+ },
+ {
+ "label": "\u2192",
+ "x": 13.75,
+ "y": 3
+ },
+ {
+ "label": "_",
+ "x": 12.75,
+ "y": 0
+ }
+ ]
+ }
+ }
+}
diff --git a/keyboards/keebio/bfo9000/matrix.c b/keyboards/treadstone48/rev1/matrix.c
similarity index 72%
rename from keyboards/keebio/bfo9000/matrix.c
rename to keyboards/treadstone48/rev1/matrix.c
index 2ca5f4d87ab..8685a8125e4 100644
--- a/keyboards/keebio/bfo9000/matrix.c
+++ b/keyboards/treadstone48/rev1/matrix.c
@@ -20,10 +20,7 @@ along with this program. If not, see .
*/
#include
#include
-#ifdef USE_I2C
-// provides memcpy for copying TWI slave buffer
-// #include
-#endif
+#include
#include
#include
#include
@@ -34,12 +31,11 @@ along with this program. If not, see .
#include "matrix.h"
#include "split_util.h"
#include "pro_micro.h"
-#include "config.h"
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
# include "i2c.h"
#else // USE_SERIAL
-# include "serial.h"
+# include "split_scomm.h"
#endif
#ifndef DEBOUNCE
@@ -51,6 +47,7 @@ along with this program. If not, see .
static uint8_t debouncing = DEBOUNCE;
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
static uint8_t error_count = 0;
+uint8_t is_master = 0 ;
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
@@ -63,6 +60,7 @@ static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
+static uint8_t matrix_master_scan(void);
__attribute__ ((weak))
@@ -105,6 +103,8 @@ void matrix_init(void)
init_cols();
TX_RX_LED_INIT;
+ TXLED0;
+ RXLED0;
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -112,12 +112,14 @@ void matrix_init(void)
matrix_debouncing[i] = 0;
}
+ is_master = has_usb();
+
matrix_init_quantum();
}
uint8_t _matrix_scan(void)
{
- // Right hand is stored after the left in the matrix so, we need to offset it
+ // Right hand is stored after the left in the matirx so, we need to offset it
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
@@ -144,7 +146,7 @@ uint8_t _matrix_scan(void)
return 1;
}
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
// Get rows from other half over i2c
int i2c_transaction(void) {
@@ -162,31 +164,14 @@ int i2c_transaction(void) {
if (err) goto i2c_error;
if (!err) {
- /*
- // read from TWI byte-by-byte into matrix_row_t memory space
- size_t i;
- for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) {
- *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK);
+ int i;
+ for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+ matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
}
- // last byte to be read / end of chunk
- *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK);
- */
-
- // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8)
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+0] = i2c_master_read(I2C_ACK);
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\
- | (matrix[slaveOffset+0]&0x40U)<<2;
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\
- | (matrix[slaveOffset+0]&0x80U)<<1;
- // clear highest two bits on row 1, where the col9 bits were transported
- matrix[slaveOffset+0] &= 0x3F;
-
+ matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
i2c_master_stop();
} else {
-i2c_error: // the cable is disconnected, or something else went wrong
+i2c_error: // the cable is disconnceted, or something else went wrong
i2c_reset_state();
return err;
}
@@ -196,30 +181,64 @@ i2c_error: // the cable is disconnected, or something else went wrong
#else // USE_SERIAL
-int serial_transaction(void) {
+int serial_transaction(int master_changed) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
-
- if (serial_update_buffers()) {
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+ int ret=serial_update_buffers(master_changed);
+#else
+ int ret=serial_update_buffers();
+#endif
+ if (ret ) {
+ if(ret==2) RXLED1;
return 1;
}
-
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[slaveOffset+i] = serial_slave_buffer[i];
- }
+ RXLED0;
+ memcpy(&matrix[slaveOffset],
+ (void *)serial_slave_buffer, sizeof(serial_slave_buffer));
return 0;
}
#endif
uint8_t matrix_scan(void)
{
+ if (is_master) {
+ matrix_master_scan();
+ }else{
+ matrix_slave_scan();
+ int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
+ memcpy(&matrix[offset],
+ (void *)serial_master_buffer, sizeof(serial_master_buffer));
+ matrix_scan_quantum();
+ }
+ return 1;
+}
+
+
+uint8_t matrix_master_scan(void) {
+
int ret = _matrix_scan();
+ int mchanged = 1;
+ int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
+#ifdef USE_MATRIX_I2C
+// for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ /* i2c_slave_buffer[i] = matrix[offset+i]; */
+// i2c_slave_buffer[i] = matrix[offset+i];
+// }
+#else // USE_SERIAL
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ mchanged = memcmp((void *)serial_master_buffer,
+ &matrix[offset], sizeof(serial_master_buffer));
+ #endif
+ memcpy((void *)serial_master_buffer,
+ &matrix[offset], sizeof(serial_master_buffer));
+#endif
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
if( i2c_transaction() ) {
#else // USE_SERIAL
- if( serial_transaction() ) {
+ if( serial_transaction(mchanged) ) {
#endif
// turn on the indicator led when halves are disconnected
TXLED1;
@@ -247,29 +266,25 @@ void matrix_slave_scan(void) {
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
-#ifdef USE_I2C
- // SLAVE_BUFFER_SIZE is from i2c.h
- // (MATRIX_ROWS/2*sizeof(matrix_row_t))
- // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t)));
-
- // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8)
- i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\
- | (matrix[offset+1]&0x100U)>>2\
- | (matrix[offset+2]&0x100U)>>1;
- i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]);
- i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]);
- // note: looks like a possible operator-precedence bug here, in last version?
- /*
- i2c_slave_buffer[1] = (uint8_t)matrix[offset+0];
- i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8);
- i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8);
- i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8);
- i2c_slave_buffer[5] = (uint8_t)matrix[offset+2];
- */
-#else // USE_SERIAL
+#ifdef USE_MATRIX_I2C
for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ /* i2c_slave_buffer[i] = matrix[offset+i]; */
+ i2c_slave_buffer[i] = matrix[offset+i];
+ }
+#else // USE_SERIAL
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ int change = 0;
+ #endif
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ if( serial_slave_buffer[i] != matrix[offset+i] )
+ change = 1;
+ #endif
serial_slave_buffer[i] = matrix[offset+i];
}
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ slave_buffer_change_count += change;
+ #endif
#endif
}
diff --git a/keyboards/treadstone48/rev1/rev1.c b/keyboards/treadstone48/rev1/rev1.c
new file mode 100644
index 00000000000..2637864271a
--- /dev/null
+++ b/keyboards/treadstone48/rev1/rev1.c
@@ -0,0 +1,15 @@
+#include "treadstone48.h"
+
+
+#ifdef SSD1306OLED
+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);
+}
+#endif
+
+void matrix_init_kb(void) {
+
+ matrix_init_user();
+};
+
diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h
new file mode 100644
index 00000000000..c6145398dd8
--- /dev/null
+++ b/keyboards/treadstone48/rev1/rev1.h
@@ -0,0 +1,202 @@
+#ifndef REV1_H
+#define REV1_CONFIG_H
+
+#include "../treadstone48.h"
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+#ifdef RGBLIGHT_ENABLE
+//rgb led driver
+#include "ws2812.h"
+#endif
+
+#ifdef USE_I2C
+#include
+#ifdef __AVR__
+ #include
+ #include
+#endif
+#endif
+
+// full Keymap
+// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
+#define LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R00, R01, R02, R03, R04, R05, R40, R41, R42, R43, R44, R45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R10, R11, R12, R13, R14, R15, R50, R51, R52, R53, R54, R55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R20, R21, R22, R23, R24, R25, R60, R61, R62, R63, R64, R65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R30, R31, R32, R33, R34, R35, R70, R71, R72, R73, R74, R75 \
+ ) \
+ { \
+ { L45, L44, L43, L42, L41, L40 }, \
+ { L55, L54, L53, L52, L51, L50 }, \
+ { L65, L64, L63, L62, L61, L60 }, \
+ { L75, L74, L73, L72, L71, L70 }, \
+ { L05, L04, L03, L02, L01, L00 }, \
+ { L15, L14, L13, L12, L11, L10 }, \
+ { L25, L24, L23, L22, L21, L20 }, \
+ { L35, L34, L33, L32, L31, L30 }, \
+ { R45, R44, R43, R42, R41, R40 }, \
+ { R55, R54, R53, R52, R51, R50 }, \
+ { R65, R64, R63, R62, R61, R60 }, \
+ { R75, R74, R73, R72, R71, R70 }, \
+ { R05, R04, R03, R02, R01, R00 }, \
+ { R15, R14, R13, R12, R11, R10 }, \
+ { R25, R24, R23, R22, R21, R20 }, \
+ { R35, R34, R33, R32, R31, R30 }, \
+ }
+
+#define K_N KC_NO
+
+//////////////////////////////////////////////////////////////////////////////
+// When only use Treadstone48.
+// L75 is ExtraKey
+//////////////////////////////////////////////////////////////////////////////
+#define LAYOUT_base( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \
+ )
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_base_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \
+ ) \
+ LAYOUT_base( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \
+ )
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// When connecting Rhymestone to Treadstone48.
+// L75 is ExtraKey
+//////////////////////////////////////////////////////////////////////////////
+#define LAYOUT_rs( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \
+ )
+
+// When use right hand side of the Rhymestone.
+#ifdef RHYMESTONE_RIGHTHAND
+#undef LAYOUT_rs
+#define LAYOUT_rs( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R70, R71, R72, R73, R74 \
+ )
+#endif
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_rs_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \
+ ) \
+ LAYOUT_rs( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \
+ )
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alpha version keymap.
+// L30 is ExtraKey
+//////////////////////////////////////////////////////////////////////////////
+#ifdef ANGELINA_KEYMAP
+#undef LAYOUT_base
+#undef LAYOUT_base_kc
+#undef LAYOUT_rs
+#undef LAYOUT_rs_kc
+
+#define LAYOUT_base( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, L30 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \
+ )
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_base_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \
+ ) \
+ LAYOUT_base( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \
+ )
+
+#define LAYOUT_rs( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74, L30 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \
+ )
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_rs_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \
+ ) \
+ LAYOUT_rs( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \
+ )
+
+#endif
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
diff --git a/keyboards/treadstone48/rev1/rules.mk b/keyboards/treadstone48/rev1/rules.mk
new file mode 100644
index 00000000000..6028b5a5b95
--- /dev/null
+++ b/keyboards/treadstone48/rev1/rules.mk
@@ -0,0 +1,3 @@
+SRC += rev1/matrix.c
+SRC += rev1/split_util.c
+SRC += rev1/split_scomm.c
diff --git a/keyboards/treadstone48/rev1/serial_config.h b/keyboards/treadstone48/rev1/serial_config.h
new file mode 100644
index 00000000000..37135213d55
--- /dev/null
+++ b/keyboards/treadstone48/rev1/serial_config.h
@@ -0,0 +1,8 @@
+//// #error rev2 serial config
+
+#ifndef SOFT_SERIAL_PIN
+/* Soft Serial defines */
+#define SOFT_SERIAL_PIN D2
+
+#define SERIAL_USE_MULTI_TRANSACTION
+#endif
diff --git a/keyboards/treadstone48/rev1/serial_config_simpleapi.h b/keyboards/treadstone48/rev1/serial_config_simpleapi.h
new file mode 100644
index 00000000000..e2d22a41e7b
--- /dev/null
+++ b/keyboards/treadstone48/rev1/serial_config_simpleapi.h
@@ -0,0 +1,8 @@
+#ifndef SERIAL_CONFIG_SIMPLEAPI_H
+#define SERIAL_CONFIG_SIMPLEAPI_H
+
+#undef SERIAL_USE_MULTI_TRANSACTION
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
+
+#endif // SERIAL_CONFIG_SIMPLEAPI_H
diff --git a/keyboards/treadstone48/rev1/split_scomm.c b/keyboards/treadstone48/rev1/split_scomm.c
new file mode 100644
index 00000000000..ada7867960b
--- /dev/null
+++ b/keyboards/treadstone48/rev1/split_scomm.c
@@ -0,0 +1,92 @@
+#ifdef USE_SERIAL
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE flexible API (using multi-type transaction function) --- */
+
+#include
+#include
+#include
+#include
+#include "serial.h"
+#ifdef CONSOLE_ENABLE
+ #include
+#endif
+
+uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+uint8_t volatile status_com = 0;
+uint8_t volatile status1 = 0;
+uint8_t slave_buffer_change_count = 0;
+uint8_t s_change_old = 0xff;
+uint8_t s_change_new = 0xff;
+
+SSTD_t transactions[] = {
+#define GET_SLAVE_STATUS 0
+ /* master buffer not changed, only recive slave_buffer_change_count */
+ { (uint8_t *)&status_com,
+ 0, NULL,
+ sizeof(slave_buffer_change_count), &slave_buffer_change_count,
+ },
+#define PUT_MASTER_GET_SLAVE_STATUS 1
+ /* master buffer changed need send, and recive slave_buffer_change_count */
+ { (uint8_t *)&status_com,
+ sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
+ sizeof(slave_buffer_change_count), &slave_buffer_change_count,
+ },
+#define GET_SLAVE_BUFFER 2
+ /* recive serial_slave_buffer */
+ { (uint8_t *)&status1,
+ 0, NULL,
+ sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
+ }
+};
+
+void serial_master_init(void)
+{
+ soft_serial_initiator_init(transactions, TID_LIMIT(transactions));
+}
+
+void serial_slave_init(void)
+{
+ soft_serial_target_init(transactions, TID_LIMIT(transactions));
+}
+
+// 0 => no error
+// 1 => slave did not respond
+// 2 => checksum error
+int serial_update_buffers(int master_update)
+{
+ int status, smatstatus;
+ static int need_retry = 0;
+
+ if( s_change_old != s_change_new ) {
+ smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER);
+ if( smatstatus == TRANSACTION_END ) {
+ s_change_old = s_change_new;
+#ifdef CONSOLE_ENABLE
+ uprintf("slave matrix = %b %b %b %b %b\n",
+ serial_slave_buffer[0], serial_slave_buffer[1],
+ serial_slave_buffer[2], serial_slave_buffer[3],
+ serial_slave_buffer[4] );
+#endif
+ }
+ } else {
+ // serial_slave_buffer dosen't change
+ smatstatus = TRANSACTION_END; // dummy status
+ }
+
+ if( !master_update && !need_retry) {
+ status = soft_serial_transaction(GET_SLAVE_STATUS);
+ } else {
+ status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS);
+ }
+ if( status == TRANSACTION_END ) {
+ s_change_new = slave_buffer_change_count;
+ need_retry = 0;
+ } else {
+ need_retry = 1;
+ }
+ return smatstatus;
+}
+
+#endif // SERIAL_USE_MULTI_TRANSACTION
+#endif /* USE_SERIAL */
diff --git a/keyboards/treadstone48/rev1/split_scomm.h b/keyboards/treadstone48/rev1/split_scomm.h
new file mode 100644
index 00000000000..16887eb74f7
--- /dev/null
+++ b/keyboards/treadstone48/rev1/split_scomm.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
+#include "serial.h"
+
+#else
+/* --- USE flexible API (using multi-type transaction function) --- */
+// Buffers for master - slave communication
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
+
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+extern uint8_t slave_buffer_change_count;
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(int master_changed);
+
+#endif
diff --git a/keyboards/orthodox/split_util.c b/keyboards/treadstone48/rev1/split_util.c
similarity index 81%
rename from keyboards/orthodox/split_util.c
rename to keyboards/treadstone48/rev1/split_util.c
index 39639c3b4bd..e1ff8b4379d 100644
--- a/keyboards/orthodox/split_util.c
+++ b/keyboards/treadstone48/rev1/split_util.c
@@ -7,12 +7,11 @@
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
-#include "config.h"
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
# include "i2c.h"
#else
-# include "serial.h"
+# include "split_scomm.h"
#endif
volatile bool isLeftHand = true;
@@ -31,18 +30,17 @@ static void setup_handedness(void) {
}
static void keyboard_master_setup(void) {
-#ifdef USE_I2C
+
+#ifdef USE_MATRIX_I2C
i2c_master_init();
-#ifdef SSD1306OLED
- matrix_master_OLED_init ();
-#endif
#else
serial_master_init();
#endif
}
static void keyboard_slave_setup(void) {
-#ifdef USE_I2C
+
+#ifdef USE_MATRIX_I2C
i2c_slave_init(SLAVE_I2C_ADDRESS);
#else
serial_slave_init();
@@ -66,19 +64,7 @@ void split_keyboard_setup(void) {
sei();
}
-void keyboard_slave_loop(void) {
- matrix_init();
-
- while (1) {
- matrix_slave_scan();
- }
-}
-
// this code runs before the usb and keyboard is initialized
void matrix_setup(void) {
split_keyboard_setup();
-
- if (!has_usb()) {
- keyboard_slave_loop();
- }
}
diff --git a/keyboards/zen/split_util.h b/keyboards/treadstone48/rev1/split_util.h
similarity index 74%
rename from keyboards/zen/split_util.h
rename to keyboards/treadstone48/rev1/split_util.h
index 595a0659e1d..f593047560a 100644
--- a/keyboards/zen/split_util.h
+++ b/keyboards/treadstone48/rev1/split_util.h
@@ -1,5 +1,4 @@
-#ifndef SPLIT_KEYBOARD_UTIL_H
-#define SPLIT_KEYBOARD_UTIL_H
+#pragma once
#include
#include "eeconfig.h"
@@ -13,8 +12,5 @@ void matrix_slave_scan(void);
void split_keyboard_setup(void);
bool has_usb(void);
-void keyboard_slave_loop(void);
void matrix_master_OLED_init (void);
-
-#endif
diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk
new file mode 100644
index 00000000000..6ddbdaf80eb
--- /dev/null
+++ b/keyboards/treadstone48/rules.mk
@@ -0,0 +1,73 @@
+SRC += i2c.c
+SRC += serial.c
+SRC += ssd1306.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# 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 = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+SUBPROJECT_rev1 = no
+USE_I2C = yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+CUSTOM_MATRIX = yes
+
+DEFAULT_FOLDER = treadstone48/rev1
diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c
new file mode 100644
index 00000000000..6006ebf1bdb
--- /dev/null
+++ b/keyboards/treadstone48/serial.c
@@ -0,0 +1,590 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ *
+ * 2018-10-28 checked
+ * avr-gcc 4.9.2
+ * avr-gcc 5.4.0
+ * avr-gcc 7.3.0
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include "serial.h"
+//#include
+
+#ifdef SOFT_SERIAL_PIN
+
+#ifdef __AVR_ATmega32U4__
+ // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
+ #ifdef USE_I2C
+ #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
+ #error Using ATmega32U4 I2C, so can not use PD0, PD1
+ #endif
+ #endif
+
+ #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
+ #define SERIAL_PIN_DDR DDRD
+ #define SERIAL_PIN_PORT PORTD
+ #define SERIAL_PIN_INPUT PIND
+ #if SOFT_SERIAL_PIN == D0
+ #define SERIAL_PIN_MASK _BV(PD0)
+ #define EIMSK_BIT _BV(INT0)
+ #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
+ #define SERIAL_PIN_INTERRUPT INT0_vect
+ #elif SOFT_SERIAL_PIN == D1
+ #define SERIAL_PIN_MASK _BV(PD1)
+ #define EIMSK_BIT _BV(INT1)
+ #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
+ #define SERIAL_PIN_INTERRUPT INT1_vect
+ #elif SOFT_SERIAL_PIN == D2
+ #define SERIAL_PIN_MASK _BV(PD2)
+ #define EIMSK_BIT _BV(INT2)
+ #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
+ #define SERIAL_PIN_INTERRUPT INT2_vect
+ #elif SOFT_SERIAL_PIN == D3
+ #define SERIAL_PIN_MASK _BV(PD3)
+ #define EIMSK_BIT _BV(INT3)
+ #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
+ #define SERIAL_PIN_INTERRUPT INT3_vect
+ #endif
+ #elif SOFT_SERIAL_PIN == E6
+ #define SERIAL_PIN_DDR DDRE
+ #define SERIAL_PIN_PORT PORTE
+ #define SERIAL_PIN_INPUT PINE
+ #define SERIAL_PIN_MASK _BV(PE6)
+ #define EIMSK_BIT _BV(INT6)
+ #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
+ #define SERIAL_PIN_INTERRUPT INT6_vect
+ #else
+ #error invalid SOFT_SERIAL_PIN value
+ #endif
+
+#else
+ #error serial.c now support ATmega32U4 only
+#endif
+
+//////////////// for backward compatibility ////////////////////////////////
+#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
+/* --- USE OLD API (compatible with let's split serial.c) */
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+ #endif
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+ #endif
+ uint8_t volatile status0 = 0;
+
+SSTD_t transactions[] = {
+ { (uint8_t *)&status0,
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
+ #else
+ 0, (uint8_t *)NULL,
+ #endif
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
+ #else
+ 0, (uint8_t *)NULL,
+ #endif
+ }
+};
+
+void serial_master_init(void)
+{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
+
+void serial_slave_init(void)
+{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
+
+// 0 => no error
+// 1 => slave did not respond
+// 2 => checksum error
+int serial_update_buffers()
+{
+ int result;
+ result = soft_serial_transaction();
+ return result;
+}
+
+#endif // end of OLD API (compatible with let's split serial.c)
+////////////////////////////////////////////////////////////////////////////
+
+#define ALWAYS_INLINE __attribute__((always_inline))
+#define NO_INLINE __attribute__((noinline))
+#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
+
+// parity check
+#define ODD_PARITY 1
+#define EVEN_PARITY 0
+#define PARITY EVEN_PARITY
+
+#ifdef SERIAL_DELAY
+ // custom setup in config.h
+ // #define TID_SEND_ADJUST 2
+ // #define SERIAL_DELAY 6 // micro sec
+ // #define READ_WRITE_START_ADJUST 30 // cycles
+ // #define READ_WRITE_WIDTH_ADJUST 8 // cycles
+#else
+// ============ Standard setups ============
+
+#ifndef SELECT_SOFT_SERIAL_SPEED
+#define SELECT_SOFT_SERIAL_SPEED 1
+// 0: about 189kbps
+// 1: about 137kbps (default)
+// 2: about 75kbps
+// 3: about 39kbps
+// 4: about 26kbps
+// 5: about 20kbps
+#endif
+
+#if __GNUC__ < 6
+ #define TID_SEND_ADJUST 14
+#else
+ #define TID_SEND_ADJUST 2
+#endif
+
+#if SELECT_SOFT_SERIAL_SPEED == 0
+ // Very High speed
+ #define SERIAL_DELAY 4 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 34 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 1
+ // High speed
+ #define SERIAL_DELAY 6 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 2
+ // Middle speed
+ #define SERIAL_DELAY 12 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 3
+ // Low speed
+ #define SERIAL_DELAY 24 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 4
+ // Very Low speed
+ #define SERIAL_DELAY 36 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 5
+ // Ultra Low speed
+ #define SERIAL_DELAY 48 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#else
+#error invalid SELECT_SOFT_SERIAL_SPEED value
+#endif /* SELECT_SOFT_SERIAL_SPEED */
+#endif /* SERIAL_DELAY */
+
+#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
+#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
+
+#define SLAVE_INT_WIDTH_US 1
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
+#else
+ #define SLAVE_INT_ACK_WIDTH_UNIT 2
+ #define SLAVE_INT_ACK_WIDTH 4
+#endif
+
+static SSTD_t *Transaction_table = NULL;
+static uint8_t Transaction_table_size = 0;
+
+inline static void serial_delay(void) ALWAYS_INLINE;
+inline static
+void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
+
+inline static void serial_delay_half1(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half1(void) {
+ _delay_us(SERIAL_DELAY_HALF1);
+}
+
+inline static void serial_delay_half2(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half2(void) {
+ _delay_us(SERIAL_DELAY_HALF2);
+}
+
+inline static void serial_output(void) ALWAYS_INLINE;
+inline static
+void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static void serial_input_with_pullup(void) ALWAYS_INLINE;
+inline static
+void serial_input_with_pullup(void) {
+ SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
+inline static
+uint8_t serial_read_pin(void) {
+ return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static void serial_low(void) ALWAYS_INLINE;
+inline static
+void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static void serial_high(void) ALWAYS_INLINE;
+inline static
+void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_output();
+ serial_high();
+}
+
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_input_with_pullup();
+
+ // Enable INT0-INT3,INT6
+ EIMSK |= EIMSK_BIT;
+#if SERIAL_PIN_MASK == _BV(PE6)
+ // Trigger on falling edge of INT6
+ EICRB &= EICRx_BIT;
+#else
+ // Trigger on falling edge of INT0-INT3
+ EICRA &= EICRx_BIT;
+#endif
+}
+
+// Used by the sender to synchronize timing with the reciver.
+static void sync_recv(void) NO_INLINE;
+static
+void sync_recv(void) {
+ for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
+ }
+ // This shouldn't hang if the target disconnects because the
+ // serial line will float to high if the target does disconnect.
+ while (!serial_read_pin());
+}
+
+// Used by the reciver to send a synchronization signal to the sender.
+static void sync_send(void) NO_INLINE;
+static
+void sync_send(void) {
+ serial_low();
+ serial_delay();
+ serial_high();
+}
+
+// Reads a byte from the serial line
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
+ uint8_t byte, i, p, pb;
+
+ _delay_sub_us(READ_WRITE_START_ADJUST);
+ for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
+ serial_delay_half1(); // read the middle of pulses
+ if( serial_read_pin() ) {
+ byte = (byte << 1) | 1; p ^= 1;
+ } else {
+ byte = (byte << 1) | 0; p ^= 0;
+ }
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+ }
+ /* recive parity bit */
+ serial_delay_half1(); // read the middle of pulses
+ pb = serial_read_pin();
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+
+ *pterrcount += (p != pb)? 1 : 0;
+
+ return byte;
+}
+
+// Sends a byte with MSB ordering
+void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
+void serial_write_chunk(uint8_t data, uint8_t bit) {
+ uint8_t b, p;
+ for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
+ if(data & b) {
+ serial_high(); p ^= 1;
+ } else {
+ serial_low(); p ^= 0;
+ }
+ serial_delay();
+ }
+ /* send parity bit */
+ if(p & 1) { serial_high(); }
+ else { serial_low(); }
+ serial_delay();
+
+ serial_low(); // sync_send() / senc_recv() need raise edge
+}
+
+static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+void serial_send_packet(uint8_t *buffer, uint8_t size) {
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ data = buffer[i];
+ sync_send();
+ serial_write_chunk(data,8);
+ }
+}
+
+static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
+ uint8_t pecount = 0;
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ sync_recv();
+ data = serial_read_chunk(&pecount, 8);
+ buffer[i] = data;
+ }
+ return pecount == 0;
+}
+
+inline static
+void change_sender2reciver(void) {
+ sync_send(); //0
+ serial_delay_half1(); //1
+ serial_low(); //2
+ serial_input_with_pullup(); //2
+ serial_delay_half1(); //3
+}
+
+inline static
+void change_reciver2sender(void) {
+ sync_recv(); //0
+ serial_delay(); //1
+ serial_low(); //3
+ serial_output(); //3
+ serial_delay_half1(); //4
+}
+
+static inline uint8_t nibble_bits_count(uint8_t bits)
+{
+ bits = (bits & 0x5) + (bits >> 1 & 0x5);
+ bits = (bits & 0x3) + (bits >> 2 & 0x3);
+ return bits;
+}
+
+// interrupt handle to be used by the target device
+ISR(SERIAL_PIN_INTERRUPT) {
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ serial_low();
+ serial_output();
+ SSTD_t *trans = Transaction_table;
+#else
+ // recive transaction table index
+ uint8_t tid, bits;
+ uint8_t pecount = 0;
+ sync_recv();
+ bits = serial_read_chunk(&pecount,7);
+ tid = bits>>3;
+ bits = (bits&7) != nibble_bits_count(tid);
+ if( bits || pecount> 0 || tid > Transaction_table_size ) {
+ return;
+ }
+ serial_delay_half1();
+
+ serial_high(); // response step1 low->high
+ serial_output();
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
+ SSTD_t *trans = &Transaction_table[tid];
+ serial_low(); // response step2 ack high->low
+#endif
+
+ // target send phase
+ if( trans->target2initiator_buffer_size > 0 )
+ serial_send_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size);
+ // target switch to input
+ change_sender2reciver();
+
+ // target recive phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size) ) {
+ *trans->status = TRANSACTION_ACCEPTED;
+ } else {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ }
+ } else {
+ *trans->status = TRANSACTION_ACCEPTED;
+ }
+
+ sync_recv(); //weit initiator output to high
+}
+
+/////////
+// start transaction by initiator
+//
+// int soft_serial_transaction(int sstd_index)
+//
+// Returns:
+// TRANSACTION_END
+// TRANSACTION_NO_RESPONSE
+// TRANSACTION_DATA_ERROR
+// this code is very time dependent, so we need to disable interrupts
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void) {
+ SSTD_t *trans = Transaction_table;
+#else
+int soft_serial_transaction(int sstd_index) {
+ if( sstd_index > Transaction_table_size )
+ return TRANSACTION_TYPE_ERROR;
+ SSTD_t *trans = &Transaction_table[sstd_index];
+#endif
+ cli();
+
+ // signal to the target that we want to start a transaction
+ serial_output();
+ serial_low();
+ _delay_us(SLAVE_INT_WIDTH_US);
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ // wait for the target response
+ serial_input_with_pullup();
+ _delay_us(SLAVE_INT_RESPONSE_TIME);
+
+ // check if the target is present
+ if (serial_read_pin()) {
+ // target failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+
+#else
+ // send transaction table index
+ int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
+ sync_send();
+ _delay_sub_us(TID_SEND_ADJUST);
+ serial_write_chunk(tid, 7);
+ serial_delay_half1();
+
+ // wait for the target response (step1 low->high)
+ serial_input_with_pullup();
+ while( !serial_read_pin() ) {
+ _delay_sub_us(2);
+ }
+
+ // check if the target is present (step2 high->low)
+ for( int i = 0; serial_read_pin(); i++ ) {
+ if (i > SLAVE_INT_ACK_WIDTH + 1) {
+ // slave failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
+ }
+#endif
+
+ // initiator recive phase
+ // if the target is present syncronize with it
+ if( trans->target2initiator_buffer_size > 0 ) {
+ if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size) ) {
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_DATA_ERROR;
+ sei();
+ return TRANSACTION_DATA_ERROR;
+ }
+ }
+
+ // initiator switch to output
+ change_reciver2sender();
+
+ // initiator send phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ serial_send_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size);
+ }
+
+ // always, release the line when not in use
+ sync_send();
+
+ *trans->status = TRANSACTION_END;
+ sei();
+ return TRANSACTION_END;
+}
+
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index) {
+ SSTD_t *trans = &Transaction_table[sstd_index];
+ cli();
+ int retval = *trans->status;
+ *trans->status = 0;;
+ sei();
+ return retval;
+}
+#endif
+
+#endif
+
+// Helix serial.c history
+// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
+// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
+// (adjusted with avr-gcc 7.3.0)
+// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
+// (adjusted with avr-gcc 5.4.0, 7.3.0)
diff --git a/keyboards/treadstone48/serial.h b/keyboards/treadstone48/serial.h
new file mode 100644
index 00000000000..5deaf789e30
--- /dev/null
+++ b/keyboards/treadstone48/serial.h
@@ -0,0 +1,86 @@
+#pragma once
+
+#include
+
+// /////////////////////////////////////////////////////////////////
+// Need Soft Serial defines in config.h
+// /////////////////////////////////////////////////////////////////
+// ex.
+// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
+// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
+// // 1: about 137kbps (default)
+// // 2: about 75kbps
+// // 3: about 39kbps
+// // 4: about 26kbps
+// // 5: about 20kbps
+//
+// //// USE OLD API (compatible with let's split serial.c)
+// ex.
+// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+// #define SERIAL_MASTER_BUFFER_LENGTH 1
+//
+// //// USE NEW API
+// //// USE simple API (using signle-type transaction function)
+// #define SERIAL_USE_SINGLE_TRANSACTION
+// //// USE flexible API (using multi-type transaction function)
+// #define SERIAL_USE_MULTI_TRANSACTION
+//
+// /////////////////////////////////////////////////////////////////
+
+
+//////////////// for backward compatibility ////////////////////////////////
+#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
+/* --- USE OLD API (compatible with let's split serial.c) */
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+ #endif
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+ #endif
+
+ void serial_master_init(void);
+ void serial_slave_init(void);
+ int serial_update_buffers(void);
+
+#endif // end of USE OLD API
+////////////////////////////////////////////////////////////////////////////
+
+// Soft Serial Transaction Descriptor
+typedef struct _SSTD_t {
+ uint8_t *status;
+ uint8_t initiator2target_buffer_size;
+ uint8_t *initiator2target_buffer;
+ uint8_t target2initiator_buffer_size;
+ uint8_t *target2initiator_buffer;
+} SSTD_t;
+#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
+
+// initiator is transaction start side
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
+// target is interrupt accept side
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
+
+// initiator resullt
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void);
+#else
+int soft_serial_transaction(int sstd_index);
+#endif
+
+// target status
+// *SSTD_t.status has
+// initiator:
+// TRANSACTION_END
+// or TRANSACTION_NO_RESPONSE
+// or TRANSACTION_DATA_ERROR
+// target:
+// TRANSACTION_DATA_ERROR
+// or TRANSACTION_ACCEPTED
+#define TRANSACTION_ACCEPTED 0x8
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index);
+#endif
diff --git a/keyboards/sol/common/ssd1306.c b/keyboards/treadstone48/ssd1306.c
similarity index 95%
rename from keyboards/sol/common/ssd1306.c
rename to keyboards/treadstone48/ssd1306.c
index b3e55a67c20..dd3290ba0cc 100644
--- a/keyboards/sol/common/ssd1306.c
+++ b/keyboards/treadstone48/ssd1306.c
@@ -1,3 +1,4 @@
+
#ifdef SSD1306OLED
#include "ssd1306.h"
@@ -27,12 +28,17 @@
//static uint16_t last_battery_update;
//static uint32_t vbat;
//#define BatteryUpdateInterval 10000 /* milliseconds */
-#define ScreenOffInterval 300000 /* milliseconds */
+
+// 'last_flush' is declared as uint16_t,
+// so this must be less than 65535
+#define ScreenOffInterval 60000 /* milliseconds */
#if DEBUG_TO_SCREEN
static uint8_t displaying;
#endif
static uint16_t last_flush;
+static bool force_dirty = true;
+
// Write command sequence.
// Returns true on success.
static inline bool _send_cmd1(uint8_t cmd) {
@@ -318,12 +324,19 @@ void iota_gfx_task_user(void) {
void iota_gfx_task(void) {
iota_gfx_task_user();
- if (display.dirty) {
+ if (display.dirty|| force_dirty) {
iota_gfx_flush();
+ force_dirty = false;
}
if (timer_elapsed(last_flush) > ScreenOffInterval) {
iota_gfx_off();
}
}
+
+bool process_record_gfx(uint16_t keycode, keyrecord_t *record) {
+ force_dirty = true;
+ return true;
+}
+
#endif
diff --git a/keyboards/sol/common/ssd1306.h b/keyboards/treadstone48/ssd1306.h
similarity index 95%
rename from keyboards/sol/common/ssd1306.h
rename to keyboards/treadstone48/ssd1306.h
index 77ce7c211a0..49f258efa92 100644
--- a/keyboards/sol/common/ssd1306.h
+++ b/keyboards/treadstone48/ssd1306.h
@@ -1,9 +1,9 @@
-#ifndef SSD1306_H
-#define SSD1306_H
+#pragma once
#include
#include
#include "pincontrol.h"
+#include "action.h"
enum ssd1306_cmds {
DisplayOff = 0xAE,
@@ -87,6 +87,4 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data);
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
void matrix_render(struct CharacterMatrix *matrix);
-
-
-#endif
+bool process_record_gfx(uint16_t keycode, keyrecord_t *record);
diff --git a/keyboards/treadstone48/treadstone48.c b/keyboards/treadstone48/treadstone48.c
new file mode 100644
index 00000000000..faadb269065
--- /dev/null
+++ b/keyboards/treadstone48/treadstone48.c
@@ -0,0 +1 @@
+#include "treadstone48.h"
diff --git a/keyboards/treadstone48/treadstone48.h b/keyboards/treadstone48/treadstone48.h
new file mode 100644
index 00000000000..3123d1de531
--- /dev/null
+++ b/keyboards/treadstone48/treadstone48.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#ifdef KEYBOARD_treadstone48_rev1
+ #include "rev1.h"
+#endif
+
+#include "quantum.h"
+
+#ifdef PROTOCOL_LUFA
+#include "lufa.h"
+#include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h
index 703745d5642..e3e00a9f80d 100644
--- a/keyboards/v60_type_r/config.h
+++ b/keyboards/v60_type_r/config.h
@@ -1,5 +1,5 @@
/*
-Copyright 2017 REPLACE_WITH_YOUR_NAME
+Copyright 2017 benlyall, 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
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -190,5 +189,3 @@ along with this program. If not, see .
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
-
-#endif
diff --git a/keyboards/v60_type_r/keymaps/default/config.h b/keyboards/v60_type_r/keymaps/default/config.h
index 6f235f6ba84..744bea207b3 100644
--- a/keyboards/v60_type_r/keymaps/default/config.h
+++ b/keyboards/v60_type_r/keymaps/default/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, 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
diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c
index 77546c0a654..831def0789b 100644
--- a/keyboards/v60_type_r/keymaps/default/keymap.c
+++ b/keyboards/v60_type_r/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, 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
diff --git a/keyboards/v60_type_r/keymaps/default/readme.md b/keyboards/v60_type_r/keymaps/default/readme.md
index 57ac901ada0..9b3c6f06433 100644
--- a/keyboards/v60_type_r/keymaps/default/readme.md
+++ b/keyboards/v60_type_r/keymaps/default/readme.md
@@ -1,5 +1,4 @@
-KB Paradise V60 Type R Default Layout
-======================
+# KB Paradise V60 Type R Default Layout
This is the default layout as defined by the KBP V60 Type R manual/keycaps
@@ -9,4 +8,4 @@ This is the default layout as defined by the KBP V60 Type R manual/keycaps
### Build
-To build this keymap, simply run `make KEYMAP=default`.
\ No newline at end of file
+To build this keymap, simply run `make v60_type_r:default`.
diff --git a/keyboards/v60_type_r/keymaps/default/rules.mk b/keyboards/v60_type_r/keymaps/default/rules.mk
new file mode 100644
index 00000000000..b6c9a258059
--- /dev/null
+++ b/keyboards/v60_type_r/keymaps/default/rules.mk
@@ -0,0 +1,2 @@
+BACKLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/v60_type_r/keymaps/vimouse/config.h b/keyboards/v60_type_r/keymaps/vimouse/config.h
index 3937420d00d..285cb4fa238 100644
--- a/keyboards/v60_type_r/keymaps/vimouse/config.h
+++ b/keyboards/v60_type_r/keymaps/vimouse/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, 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
@@ -14,10 +14,7 @@
* along with this program. If not, see .
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
#define V60_POLESTAR
@@ -27,5 +24,3 @@
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
-
-#endif
diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c
index 2586683127f..8b0019e7ba1 100644
--- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c
+++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, 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
diff --git a/keyboards/v60_type_r/readme.md b/keyboards/v60_type_r/readme.md
index 06ff749b866..76cb5f39fc4 100644
--- a/keyboards/v60_type_r/readme.md
+++ b/keyboards/v60_type_r/readme.md
@@ -13,17 +13,6 @@ Please note that other variants of the KBP V60 are not fully programmable.
Backlight and RGB Underglow are both supported.
-To use the backlight and/or RGB underglow:
-* Create a new keymap
-* Create a rules.mk file in the keymap
-* Add RGBLIGHT_ENABLE = yes and/or BACKLIGHT_ENABLE = yes to the rules.mk
-* Setup your keymap to your preference. Use [the `vimouse` keymap](keymaps/vimouse/keymap.c) as a starting point
-* Some extra keys are defined to allow you to set the red, green and blue values of the underglow directly, rather than using the HSV spectrum. These are RGB_RI, RGB_RD, RGB_GI, RGB_GD, RGB_BI, RGB_BD for increase and decrease of the red, green and blue channels respectively.
-
-The provided `default` keymap pretty closely matches the default V60 Type R keymap, minus the backlight and underglow control keys. The `vimouse` keymap is completely customised and makes use of many of the possibilities, including mouse keys, backlighting, RGB underglow, etc.
-
-Note for those customising: The configuration used in the `vimouse` keymap results in about 93% of the available flash being utilised. Keep that in mind if you're adding functionality.
-
Note: By default the V60 Type R uses TMK. You should know what you're doing and none of this is guaranteed to work. If you want to stick with the TMK default, then the KB Paradise preferred way of creating the hex file is by using https://tkg.io/, selecting Fantastic60 and then defining your keymap.
You will then have to use tkg-toolkit to finish the flashing
@@ -40,7 +29,4 @@ or
make v60_type_r:vimouse
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
-
-
-
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk
index 7a1340a1aca..54a20a78154 100644
--- a/keyboards/v60_type_r/rules.mk
+++ b/keyboards/v60_type_r/rules.mk
@@ -52,21 +52,21 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-RGBLIGHT_ENABLE ?= no # Enable the RGB Underglow
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable the RGB Underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
LAYOUTS = 60_ansi
diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c
index 86d87e12da2..41eb75807d0 100644
--- a/keyboards/v60_type_r/v60_type_r.c
+++ b/keyboards/v60_type_r/v60_type_r.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, 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
diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h
index 3d7aef7eaf0..25097ed48e8 100644
--- a/keyboards/v60_type_r/v60_type_r.h
+++ b/keyboards/v60_type_r/v60_type_r.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, 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
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef V60_TYPE_R_H
-#define V60_TYPE_R_H
+#pragma once
#include "quantum.h"
@@ -106,4 +105,3 @@ enum my_keycodes {
{ k40, k41, k42, k43, k44, k45, k46, k47 } \
}
-#endif
diff --git a/keyboards/waldo/config.h b/keyboards/waldo/config.h
new file mode 100644
index 00000000000..c460e7c2740
--- /dev/null
+++ b/keyboards/waldo/config.h
@@ -0,0 +1,77 @@
+/*
+Copyright 2012 Jun Wako
+
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Greenwald Designs
+#define PRODUCT Waldo
+#define DESCRIPTION A 60% board
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/* Planck PCB default pin-out */
+#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 }
+#define MATRIX_COL_PINS { F7, D5, D3, D2, B3, B2, C7, C6, B6, B5, B4, D7, D6, D4, B1 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * 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
+
+// RGB LED
+#define RGB_DI_PIN B0 // The pin the LED strip is connected to
+#define RGBLED_NUM 10 // Number of LEDs in your strip
diff --git a/keyboards/waldo/info.json b/keyboards/waldo/info.json
new file mode 100644
index 00000000000..5cdc12d5ef5
--- /dev/null
+++ b/keyboards/waldo/info.json
@@ -0,0 +1,24 @@
+{
+ "keyboard_name": "",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_60_ansi": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_60_hhkb": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}]
+ },
+
+ "LAYOUT_60_ansi_split_bs_rshift": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/waldo/keymaps/default/keymap.c b/keyboards/waldo/keymaps/default/keymap.c
new file mode 100644
index 00000000000..2fcb3a1afbc
--- /dev/null
+++ b/keyboards/waldo/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum waldo_layers {
+ _BASE,
+ _FUNCTION
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = LAYOUT_60_ansi( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FUNCTION), KC_RCTL \
+ ),
+
+ [_FUNCTION] = LAYOUT_60_ansi( \
+ 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_DEL, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ )
+
+};
diff --git a/keyboards/waldo/keymaps/default/readme.md b/keyboards/waldo/keymaps/default/readme.md
new file mode 100644
index 00000000000..440961939c8
--- /dev/null
+++ b/keyboards/waldo/keymaps/default/readme.md
@@ -0,0 +1,2 @@
+# The Default Waldo Layout
+
diff --git a/keyboards/waldo/keymaps/default/rules.mk b/keyboards/waldo/keymaps/default/rules.mk
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/config.h b/keyboards/waldo/keymaps/default_split_shft_bck/config.h
new file mode 100644
index 00000000000..19a485296eb
--- /dev/null
+++ b/keyboards/waldo/keymaps/default_split_shft_bck/config.h
@@ -0,0 +1,5 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+
+#endif
diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/keymap.c b/keyboards/waldo/keymaps/default_split_shft_bck/keymap.c
new file mode 100644
index 00000000000..4ef7da00191
--- /dev/null
+++ b/keyboards/waldo/keymaps/default_split_shft_bck/keymap.c
@@ -0,0 +1,97 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum waldo_layers {
+ _QWERTY,
+ _FUNC
+};
+
+enum waldo_keycodes {
+ QWERTY = SAFE_RANGE,
+ BACKLIT
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,------------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del |
+ * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backspace |
+ * |------------------------------------------------------------------------------------------|
+ * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |------------------------------------------------------------------------------------------|
+ * | L Shift | Z | X | C | V | B | N | M | , | . | / | R Shift | Fn |
+ * |------------------------+-----------------------------------------------------------------|
+ * | Ctrl | GUI | Alt | Space | GUI | Menu | Ctrl |
+ * `------------------------------------------------------------------------------------------'
+ */
+
+[_QWERTY] = LAYOUT_60_ansi_split_bs_rshift( \
+ 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_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FUNC), \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL \
+),
+
+/* Function
+ * ,------------------------------------------------------------------------------------------.
+ * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | |
+ * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
+ * | | | Up | | | Vol+| | | Prnt| PgUp|PgDwn| Up | | |
+ * |------------------------------------------------------------------------------------------|
+ * | Caps | left| down|right| | Vol-| | | Home| End | left|right| |
+ * |------------------------------------------------------------------------------------------|
+ * | |GBTOG|GBMOD|GBHUD|GBHUI|GBSAD|GBSAI|GBVAD|GBVAI| | down| | Fn |
+ * |------------------------+-----------------------------------------------------------------|
+ * | Backlit| | | | | | |
+ * `------------------------------------------------------------------------------------------'
+ */
+
+[_FUNC] = LAYOUT_60_ansi_split_bs_rshift( \
+ KC_TILD, 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_UP, _______, _______, KC_VOLU, _______, _______, KC_PSCR, KC_PGUP, KC_PGDN, KC_UP, _______, _______, \
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, _______, _______, KC_HOME, KC_END, KC_LEFT, KC_RGHT, _______, \
+ _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DOWN, _______, KC_TRNS, \
+ BACKLIT, _______, _______, _______, XXXXXXX, _______, _______, _______ \
+)
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/readme.md b/keyboards/waldo/keymaps/default_split_shft_bck/readme.md
new file mode 100644
index 00000000000..bb4d32898ee
--- /dev/null
+++ b/keyboards/waldo/keymaps/default_split_shft_bck/readme.md
@@ -0,0 +1,2 @@
+# The Default Waldo Layout w/ Split backspace, split shift, and 7u space
+
diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk b/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/keyboards/waldo/readme.md b/keyboards/waldo/readme.md
new file mode 100644
index 00000000000..987b1fa4973
--- /dev/null
+++ b/keyboards/waldo/readme.md
@@ -0,0 +1,12 @@
+# Waldo
+
+A 60% Keyboard for use in the Holz case by Greenwald Designs
+
+Keyboard Maintainer: [That-Canadian](https://github.com/that-canadian)
+Hardware Availability: https://store.projectkeyboard.com/products/waldo-pcb-60
+
+Make example for this keyboard (after setting up your build environment):
+
+ make waldo:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk
new file mode 100644
index 00000000000..40ac48474ed
--- /dev/null
+++ b/keyboards/waldo/rules.mk
@@ -0,0 +1,65 @@
+# 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)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = atmel-dfu
+
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# 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 = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+API_SYSEX_ENABLE = no
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/waldo/waldo.c b/keyboards/waldo/waldo.c
new file mode 100644
index 00000000000..33093d4bbd7
--- /dev/null
+++ b/keyboards/waldo/waldo.c
@@ -0,0 +1 @@
+#include "waldo.h"
\ No newline at end of file
diff --git a/keyboards/waldo/waldo.h b/keyboards/waldo/waldo.h
new file mode 100644
index 00000000000..f683ca82ff0
--- /dev/null
+++ b/keyboards/waldo/waldo.h
@@ -0,0 +1,63 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_60_ansi( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
+ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
+ k40, k41, k42, k46, k49, k4a, k4c, k4d \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \
+ { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO }, \
+ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, k4d, KC_NO } \
+}
+
+#define LAYOUT_60_hhkb( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
+ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k41, k42, k46, k49, k4a \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \
+ { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \
+ { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, KC_NO, KC_NO, C_NO } \
+}
+
+#define LAYOUT_60_ansi_split_bs_rshift( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
+ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k40, k41, k42, k46, k49, k4a, k4c, k4d \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \
+ { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \
+ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, k4d, KC_NO } \
+}
+
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k40, k41, k42, k44, k46, k48, k49, k4a, k4c, k4d \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \
+ { k40, k41, k42, KC_NO, k44, KC_NO, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d } \
+}
diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c
index a630affe070..7be197a81c7 100644
--- a/keyboards/xd75/keymaps/davidrambo/keymap.c
+++ b/keyboards/xd75/keymaps/davidrambo/keymap.c
@@ -2,14 +2,14 @@
//aliases for clarity in layering
#define A_BSPC LALT(KC_BSPC) // delete whole word in Mac
-#define C_BSPS LCTL(KC_BSPC) // delete whole word in PC
+#define C_BSPC LCTL(KC_BSPC) // delete whole word in PC
#define A_LEFT LALT(KC_LEFT)
#define A_RGHT LALT(KC_RGHT)
#define C_RGHT LCTL(KC_RGHT)
#define C_LEFT LCTL(KC_LEFT)
#define SftEnt SFT_T(KC_ENT)
-#define GBSPC LGUI_T(KC_BSPC)
-#define CBSPC LCTL_T(KC_BSPC)
+#define BS_GUI LGUI_T(KC_BSPC)
+#define BS_CTL LCTL_T(KC_BSPC)
// internet browser tab shortcuts and window/application swapping for Mac and Win
#define GSL LGUI(S(KC_LEFT)) // back one tab in Safari
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt ,
- KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP
+ KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, BS_GUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP
),
// Windows Layer: essentially swaps Control and GUI
@@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______
+ _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, BS_CTL , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______
),
[_GAME] = LAYOUT_ortho_5x15( /* Gaming Layer */
@@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , C_BSPC , KC_HOME, KC_END , _______, _______,
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
diff --git a/keyboards/xd75/keymaps/markus/config.h b/keyboards/xd75/keymaps/markus/config.h
index 4e4e6f0d739..a3e1631715d 100644
--- a/keyboards/xd75/keymaps/markus/config.h
+++ b/keyboards/xd75/keymaps/markus/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 Markus Weimar
+/* Copyright 2019 Markus Weimar
*
* 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
@@ -18,12 +18,31 @@
// place overrides here
-// Mousekeys
-#define MOUSEKEY_MOVE_DELTA 1
-#define MOUSEKEY_WHEEL_DELTA 1
-#define MOUSEKEY_DELAY 90
-#define MOUSEKEY_INTERVAL 16
-#define MOUSEKEY_MAX_SPEED 20
-#define MOUSEKEY_TIME_TO_MAX 0
-#define MOUSEKEY_WHEEL_MAX_SPEED 1
-#define MOUSEKEY_WHEEL_TIME_TO_MAX 0
+// Mouse keys (accelerated)
+//#define MOUSEKEY_MOVE_DELTA 1
+//#define MOUSEKEY_WHEEL_DELTA 1
+//#define MOUSEKEY_DELAY 90
+//#define MOUSEKEY_INTERVAL 16
+//#define MOUSEKEY_MAX_SPEED 20
+//#define MOUSEKEY_TIME_TO_MAX 0
+//#define MOUSEKEY_WHEEL_MAX_SPEED 1
+//#define MOUSEKEY_WHEEL_TIME_TO_MAX 0
+// Mouse keys (constant)
+#define MK_3_SPEED
+#define MK_MOMENTARY_ACCEL
+#define MK_C_OFFSET_UNMOD 18
+#define MK_C_INTERVAL_UNMOD 16
+#define MK_C_OFFSET_0 2
+#define MK_C_INTERVAL_0 16
+#define MK_C_OFFSET_1 6
+#define MK_C_INTERVAL_1 16
+#define MK_C_OFFSET_2 36
+#define MK_C_INTERVAL_2 16
+#define MK_W_OFFSET_UNMOD 1
+#define MK_W_INTERVAL_UNMOD 40
+#define MK_W_OFFSET_0 1
+#define MK_W_INTERVAL_0 360
+#define MK_W_OFFSET_1 1
+#define MK_W_INTERVAL_1 120
+#define MK_W_OFFSET_2 1
+#define MK_W_INTERVAL_2 20
diff --git a/keyboards/xd75/keymaps/markus/keymap.c b/keyboards/xd75/keymaps/markus/keymap.c
index eaf62015154..9b8ab52fc35 100644
--- a/keyboards/xd75/keymaps/markus/keymap.c
+++ b/keyboards/xd75/keymaps/markus/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 Markus Weimar
+/* Copyright 2019 Markus Weimar
*
* 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
@@ -19,30 +19,29 @@
#define ________ KC_TRNS
#define ___xx___ KC_NO
-#define NKRO_TG MAGIC_TOGGLE_NKRO
enum my_layers {
- _QWZ,
- _QWY,
- _GAM,
- _FN1,
- _FN2,
- _FN3,
+ _QWZ,
+ _QWY,
+ _GAM,
+ _FN1,
+ _FN2,
+ _FN3,
};
enum my_keycodes {
- QWERTZ = SAFE_RANGE,
- QWERTY,
- GAMING,
- FN1,
- FN2,
- FN3
+ QWERTZ = SAFE_RANGE,
+ QWERTY,
+ GAMING,
+ FN1,
+ FN2,
+ FN3
};
enum my_ucis {
- UNI_LNX,
- UNI_MAC,
- UNI_WIN,
+ UNI_LNX,
+ UNI_MAC,
+ UNI_WIN,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -118,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | | " | ' | ‚ | ‘ | ’ | | | | | | [ | ] | ! | ? | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | ° | ^ | „ | “ | ” | | | | # | < | > | … | – | |
+ * | | ° | ^ | „ | “ | ” | | | | # | < | > | … | – EN | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
@@ -133,19 +132,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* FN2
* .--------------------------------------------------------------------------------------------------------------------------------------.
- * | | | | | % | ( | ) | P/ | P* | P- | Print | Scroll | Pause | ẞ | |
+ * | | | | | % | ( | ) | P/ | P* | P- | Print | Scroll | Pause | ẞ | − MNS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | | | Mute | Vol- | Vol+ | Bspc | P7 | P8 | P9 | P+ | WH_U | MS_U | WH_D | × | ÷ |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | App | ACL0 | ACL1 | ACL2 | Space | P4 | P5 | P6 | WH_L | MS_L | MS_D | MS_R | WH_R | |
+ * | | App | ACL2 | ACL1 | ACL0 | Space | P4 | P5 | P6 | WH_L | MS_L | MS_D | MS_R | WH_R | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | | Prev | Play | Next | Tab | P1 | P2 | P3 | PEnter | BTN1 | BTN2 | BTN3 | — | |
+ * | | | Prev | Play | Next | Tab | P1 | P2 | P3 | PEnter | BTN1 | BTN2 | BTN3 | — EM | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
* | Fn2 | | | | | PEnter | P0 | . : | P, | BTN1 | BTN2 | BTN3 | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_FN2] = {
-{ ___xx___, ___xx___, ___xx___, ___xx___, DE_PERC, DE_LPRN, DE_RPRN, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_LSCR, KC_PAUS, UC(L'ẞ'), ___xx___ },
+{ ___xx___, ___xx___, ___xx___, ___xx___, DE_PERC, DE_LPRN, DE_RPRN, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_LSCR, KC_PAUS, UC(L'ẞ'), UC(L'−') },
{ ________, ___xx___, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_WH_U, KC_MS_U, KC_WH_D, UC(L'×'), UC(L'÷') },
{ ________, KC_APP, KC_ACL2, KC_ACL1, KC_ACL0, KC_SPC, KC_P4, KC_P5, KC_P6, KC_WH_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_R, ________ },
{ ________, ___xx___, KC_MPRV, KC_MPLY, KC_MNXT, KC_TAB, KC_P1, KC_P2, KC_P3, KC_PENT, KC_BTN1, KC_BTN2, KC_BTN3, UC(L'—'), ________ },
@@ -156,61 +155,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | F13 | F14 | F15 | F16 | F17 | F18 | U LNX | U WIN | U MAC | F19 | F20 | F21 | F22 | F23 | F24 |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | QWERTZ | QWERTY | | NKRO | ThinSp | L TOG | L MP | L MOD | | Pg Up | Up | Pg Dn | | |
+ * | | QWERTZ | QWERTY | GAMING | | | L TOG | L MP | L MOD | | Pg Up | Up | Pg Dn | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | NaNbSp | | › | ‹ | GAMING | L HUI | L SAI | L VAI | Home | Left | Down | Right | End | |
+ * | | | | › | ‹ | | L HUI | L SAI | L VAI | Home | Left | Down | Right | End | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | | | » | « | | L HUD | L SAD | L VAD | FigSp | | | | NbHyph | |
+ * | | | | » | « | | L HUD | L SAD | L VAD | NumSp | ThinSp | NaNbSp | NbSp | NbHyph | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | | | | | | | | Reset | | NbSp | | | | | |
+ * | | | | | | | | Reset | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_FN3] = {
{ KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, UNI_LNX, UNI_WIN, UNI_MAC, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 },
-{ ________, QWERTZ, QWERTY, ___xx___, NKRO_TG, UC(L' '), RGB_TOG, RGB_M_P, RGB_MOD, ___xx___, KC_PGUP, KC_UP, KC_PGDN, ___xx___, ___xx___ },
-{ ________, UC(L' '), ___xx___, UC(L'›'), UC(L'‹'), GAMING, RGB_HUI, RGB_SAI, RGB_VAI, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ________ },
-{ ________, ___xx___, ___xx___, UC(L'»'), UC(L'«'), ___xx___, RGB_HUD, RGB_SAD, RGB_VAD, UC(L' '), ___xx___, ___xx___, ___xx___, UC(L'‑'), ________ },
-{ ___xx___, ________, ________, ________, ________, ________, ________, RESET, ________, UC(L' '), ________, ________, ________, ________, ________ },
+{ ________, QWERTZ, QWERTY, GAMING, ___xx___, ___xx___, RGB_TOG, RGB_M_P, RGB_MOD, ___xx___, KC_PGUP, KC_UP, KC_PGDN, ___xx___, ___xx___ },
+{ ________, ___xx___, ___xx___, UC(L'›'), UC(L'‹'), ___xx___, RGB_HUI, RGB_SAI, RGB_VAI, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ________ },
+{ ________, ___xx___, ___xx___, UC(L'»'), UC(L'«'), ___xx___, RGB_HUD, RGB_SAD, RGB_VAD, UC(L' '), UC(L' '), UC(L' '), UC(L' '), UC(L'‑'), ________ },
+{ ___xx___, ________, ________, ________, ________, ________, ________, RESET, ________, ________, ________, ________, ________, ________, ________ },
},
};
void matrix_init_user(){
- set_unicode_input_mode(UC_LNX);
+ set_unicode_input_mode(UC_LNX);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch(keycode) {
- case QWERTZ:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWZ);
- }
- return false;
- break;
- case QWERTY:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWY);
- }
- return false;
- break;
- case GAMING:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_GAM);
- }
- return false;
- break;
- case UNI_LNX:
- set_unicode_input_mode(UC_LNX);
- return false;
- break;
- case UNI_WIN:
- set_unicode_input_mode(UC_WINC);
- return false;
- break;
- case UNI_MAC:
- set_unicode_input_mode(UC_OSX);
- return false;
- break;
- }
- return true;
+ switch(keycode) {
+ case QWERTZ:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWZ);
+ }
+ return false;
+ break;
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWY);
+ }
+ return false;
+ break;
+ case GAMING:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAM);
+ }
+ return false;
+ break;
+ case UNI_LNX:
+ set_unicode_input_mode(UC_LNX);
+ return false;
+ break;
+ case UNI_WIN:
+ set_unicode_input_mode(UC_WINC);
+ return false;
+ break;
+ case UNI_MAC:
+ set_unicode_input_mode(UC_OSX);
+ return false;
+ break;
+ }
+ return true;
}
diff --git a/keyboards/xd75/keymaps/markus/readme.md b/keyboards/xd75/keymaps/markus/readme.md
index 92628124055..fc5959bcdc7 100644
--- a/keyboards/xd75/keymaps/markus/readme.md
+++ b/keyboards/xd75/keymaps/markus/readme.md
@@ -2,15 +2,15 @@
This keymap has three base layers (QWERTZ, QWERTY, Gaming) and three function layers (Fn1, Fn2, Fn3).
-QWERTY is identical to QWERTZ except `z` and `y` are swapped.
+QWERTY is identical to QWERTZ, except `z` and `y` are swapped.
Gaming is a modified QWERTY layer for left-hand usage.
The function layers contain:
-* Symbols (standard and Unicode)
+* Symbols
+* Unicode characters (e.g. dashes, figure space, non-breaking space and hyphen)
* Unicode input mode switches
* Numpad
* Function keys
-* Media, mouse, LED control
-* Non-breaking characters
+* Media, mouse and LED controls
diff --git a/keyboards/xd75/keymaps/markus/rules.mk b/keyboards/xd75/keymaps/markus/rules.mk
index d0ed9a73ae1..22befc53496 100644
--- a/keyboards/xd75/keymaps/markus/rules.mk
+++ b/keyboards/xd75/keymaps/markus/rules.mk
@@ -1,23 +1,13 @@
-# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
-# the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = no # Audio output on port C6
-UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap.
-UNICODE_ENABLE = yes # Unicode
-UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows).
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = no
-
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
+BOOTMAGIC_ENABLE = no
+MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = no
+NKRO_ENABLE = yes
+BACKLIGHT_ENABLE = no
+MIDI_ENABLE = no
+AUDIO_ENABLE = no
+UNICODE_ENABLE = yes
+BLUETOOTH_ENABLE = no
+RGBLIGHT_ENABLE = yes
+SLEEP_LED_ENABLE = no
diff --git a/keyboards/xd87/info.json b/keyboards/xd87/info.json
index 3837358cd32..488f3192753 100644
--- a/keyboards/xd87/info.json
+++ b/keyboards/xd87/info.json
@@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 18.25,
- "height": 7.25,
+ "height": 6.25,
"layouts": {
"LAYOUT_all": {
"layout": [
diff --git a/keyboards/ymd96/info.json b/keyboards/ymd96/info.json
new file mode 100644
index 00000000000..73edfd894f0
--- /dev/null
+++ b/keyboards/ymd96/info.json
@@ -0,0 +1,19 @@
+{
+ "keyboard_name": "ymd96",
+ "url": "",
+ "maintainer": "sparkyman215",
+
+ "width": 19,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Print Screen", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Delete", "x":17, "y":0}, {"label":"Page Up", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"PgDn", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3},{"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":2.75}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Fn", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"\u2190", "x":12, "y":5}, {"label":"\u2193", "x":13, "y":5}, {"label":"\u2191", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ },
+ "LAYOUT_custom": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Print Screen", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Delete", "x":17, "y":0}, {"label":"Page Up", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"PgDn", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"-", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"Fn", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Menu", "x":11, "y":5}, {"label":"Prnt Scr", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"label":"Scroll Lock", "x":14, "y":5}, {"label":"0", "x":15, "y":5, "w":2}, {"label":".", "x":17, "y":5}]
+ },
+ "LAYOUT_iso": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Delete", "x":17, "y":0}, {"label":"PgUp", "x":18, "y":0}, {"label":"\u00ac", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"PgDn", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"-", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"Up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"AltGr", "x":10, "y":5, "w":1.5}, {"label":"Win", "x":11.5, "y":5, "w":1.5}, {"label":"Left", "x":13, "y":5}, {"label":"Down", "x":14, "y":5}, {"label":"Right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c
index 3d54c7395c0..c540972f10a 100644
--- a/keyboards/ymd96/keymaps/default/keymap.c
+++ b/keyboards/ymd96/keymaps/default/keymap.c
@@ -22,7 +22,7 @@ along with this program. If not, see .
#define _DEFLT 0
#define _RAISE 1
-#define KEYMAP KEYMAP_DEFAULT
+#define KEYMAP LAYOUT_default
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/ymd96/keymaps/epx/keymap.c b/keyboards/ymd96/keymaps/epx/keymap.c
index b9d3f6df228..09ec665a3a7 100644
--- a/keyboards/ymd96/keymaps/epx/keymap.c
+++ b/keyboards/ymd96/keymaps/epx/keymap.c
@@ -24,7 +24,7 @@ along with this program. If not, see .
#define _AR 1
#define _RAISE 2
-#define KEYMAP KEYMAP_DEFAULT
+#define KEYMAP LAYOUT_default
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0, default layer
diff --git a/keyboards/ymd96/keymaps/hgoel89/keymap.c b/keyboards/ymd96/keymaps/hgoel89/keymap.c
index 81addf69f4d..f612f79bafc 100644
--- a/keyboards/ymd96/keymaps/hgoel89/keymap.c
+++ b/keyboards/ymd96/keymaps/hgoel89/keymap.c
@@ -27,7 +27,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
#define _DEFLT 0
#define _RAISE 1
-#define KEYMAP KEYMAP_CUSTOM
+#define KEYMAP LAYOUT_custom
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -45,8 +45,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_PMNS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_NO, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
- 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_P1, KC_P2, KC_P3, KC_PENT, \
- KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RGUI , KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, MO(_RAISE), KC_P0, KC_PDOT \
+ 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(_RAISE), KC_P1, KC_P2, KC_P3, KC_PENT, \
+ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RGUI , KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, KC_PDOT \
),
/* Layer 1, raise layer
* | | | | | | | | | | | | | | | | | | | |
diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h
index 9c25f221928..ebf01b1d612 100644
--- a/keyboards/ymd96/ymd96.h
+++ b/keyboards/ymd96/ymd96.h
@@ -26,7 +26,7 @@ along with this program. If not, see .
void matrix_init_user(void); // TODO port this to other PS2AVRGB boards
-#define KEYMAP_DEFAULT( \
+#define LAYOUT_default( \
K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \
K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \
K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \
@@ -44,13 +44,13 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards
{ K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \
}
-#define KEYMAP_CUSTOM( \
+#define LAYOUT_custom( \
K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \
K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \
K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \
K200, K201, K202, K203, K204, K205, K603, K613, K713, K703, K210, K211, K213, K206, K207, K208, K209, \
- K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K106, K107, K108, K009, \
- K000, K001, K002, K605, K705, K010, K011, K606, K607, KC_NO, K006, K008 \
+ K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K608,K106, K107, K108, K009, \
+ K000, K001, K002, K605, K705, K010, K011, K606, K607, K006, K008 \
) { \
{ K000, K001, K002, KC_NO, KC_NO, KC_NO, K006, KC_NO, K008, K009, K010, K011, KC_NO, K013, KC_NO, }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO, K110, K111, KC_NO, K113, KC_NO, }, \
@@ -58,7 +58,7 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, }, \
{ K500, KC_NO, K502, K503, K504, K505, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K511, K512, K513, K514, }, \
- { K600, K601, K602, K603, K604, K605, K606, K607, KC_NO, KC_NO, K610, K611, K612, K613, K614, }, \
+ { K600, K601, K602, K603, K604, K605, K606, K607, K608, KC_NO, K610, K611, K612, K613, K614, }, \
{ K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \
}
diff --git a/keyboards/yosino58/config.h b/keyboards/yosino58/config.h
new file mode 100644
index 00000000000..4357a218d4a
--- /dev/null
+++ b/keyboards/yosino58/config.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+#include "config_common.h"
+#include
+
+#define USE_I2C
+#define USE_SERIAL
+
+#ifdef USE_Link_Time_Optimization
+ // LTO has issues with macros (action_get_macro) and "functions" (fn_actions),
+ // so just disable them
+ #define NO_ACTION_MACRO
+ #define NO_ACTION_FUNCTION
+
+ #define DISABLE_LEADER
+#endif // USE_Link_Time_Optimization
diff --git a/keyboards/orthodox/i2c.c b/keyboards/yosino58/i2c.c
similarity index 98%
rename from keyboards/orthodox/i2c.c
rename to keyboards/yosino58/i2c.c
index 084c890c405..4bee5c63982 100644
--- a/keyboards/orthodox/i2c.c
+++ b/keyboards/yosino58/i2c.c
@@ -34,7 +34,7 @@ void i2c_delay(void) {
// _delay_us(100);
}
-// Setup twi to run at 100kHz
+// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK)
void i2c_master_init(void) {
// no prescaler
TWSR = 0;
diff --git a/keyboards/keebio/bfo9000/i2c.h b/keyboards/yosino58/i2c.h
similarity index 94%
rename from keyboards/keebio/bfo9000/i2c.h
rename to keyboards/yosino58/i2c.h
index c15b6bc5065..710662c7abd 100644
--- a/keyboards/keebio/bfo9000/i2c.h
+++ b/keyboards/yosino58/i2c.h
@@ -1,5 +1,4 @@
-#ifndef I2C_H
-#define I2C_H
+#pragma once
#include
@@ -15,7 +14,7 @@
#define SLAVE_BUFFER_SIZE 0x10
-// i2c SCL clock frequency
+// i2c SCL clock frequency 400kHz
#define SCL_CLOCK 400000L
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
@@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void);
extern unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
-
-#endif
diff --git a/keyboards/yosino58/info.json b/keyboards/yosino58/info.json
new file mode 100644
index 00000000000..c591a41dece
--- /dev/null
+++ b/keyboards/yosino58/info.json
@@ -0,0 +1,20 @@
+{
+ "keyboard_name": "yosino58 rev. 1",
+ "url": "https://github.com/sakurachari/yosino58",
+ "maintainer": "sakuranbo0046",
+ "width": 16.75,
+ "height": 6.25,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 58,
+ "layout": [
+ {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":0.25}, {"x":3, "y":0}, {"x":4, "y":0.25}, {"x":5, "y":0.5}, {"x":10.75, "y":0.5}, {"x":11.75, "y":0.25}, {"x":12.75, "y":0}, {"x":13.75, "y":0.25}, {"x":14.75, "y":1}, {"x":15.75, "y":1},
+ {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":1.25}, {"x":3, "y":1}, {"x":4, "y":1.25}, {"x":5, "y":1.5}, {"x":10.75, "y":1.5}, {"x":11.75, "y":1.25}, {"x":12.75, "y":1}, {"x":13.75, "y":1.25}, {"x":14.75, "y":2}, {"x":15.75, "y":2},
+ {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":2.25}, {"x":3, "y":2}, {"x":4, "y":2.25}, {"x":5, "y":2.5}, {"x":10.75, "y":2.5}, {"x":11.75, "y":2.25}, {"x":12.75, "y":2}, {"x":13.75, "y":2.25}, {"x":14.75, "y":3}, {"x":15.75, "y":3},
+ {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":3.25}, {"x":3, "y":3}, {"x":4, "y":3.25}, {"x":5, "y":3.5}, {"x":6.5, "y":4.25}, {"x":7.5, "y":4.25, "h":2}, {"x":8.5, "y":4.25, "h":2}, {"x":9.5, "y":4.25}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3}, {"x":13.75, "y":3.25}, {"x":14.75, "y":4}, {"x":15.75, "y":4},
+ {"x":3.75, "y":4.25}, {"x":4.75, "y":4.5}, {"x":6.5, "y":5.25}, {"x":9.5, "y":5.25}, {"x":11, "y":4.5}, {"x":12, "y":4.25}
+ ]
+ }
+ }
+}
+
diff --git a/keyboards/yosino58/keymaps/default/config.h b/keyboards/yosino58/keymaps/default/config.h
new file mode 100644
index 00000000000..21fc2d3b547
--- /dev/null
+++ b/keyboards/yosino58/keymaps/default/config.h
@@ -0,0 +1,43 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+#define SSD1306OLED
+// #define SSD1306_128X64
+
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 100
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+#define RGBLIGHT_LIMIT_VAL 120
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
\ No newline at end of file
diff --git a/keyboards/yosino58/keymaps/default/keymap.c b/keyboards/yosino58/keymaps/default/keymap.c
new file mode 100644
index 00000000000..79b50756965
--- /dev/null
+++ b/keyboards/yosino58/keymaps/default/keymap.c
@@ -0,0 +1,337 @@
+#include QMK_KEYBOARD_H
+#ifdef PROTOCOL_LUFA
+ #include "lufa.h"
+ #include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// 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,
+ RGBRST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* QWERTY
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | | Y | U | I | O | P | = |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LShift| A | S | D | F | G | | H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LCTRL | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | \ |
+ * `-----------------------------------------/ Del / / \ \ Bksp \----------------------------------------'
+ * | LAlt |ADJUST| /-------/ Space / \ Enter \-------\ | [ | ] |
+ * | | |/ LOWER / / \ \ RAISE \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_QWERTY] = LAYOUT( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, \
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, \
+ KC_LALT, ADJUST, LOWER, RAISE, KC_LBRC, KC_RBRC\
+ ),
+
+/* LOWER
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ESC | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | / | - | 7 | 8 | 9 | | ! | @ | # | $ | % | F12 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LShift| * | + | 4 | 5 | 6 | | ^ | & | * | ( | ) | - |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LCTRL | . | 0 | 1 | 2 | 3 |-------.-------. ,---------------| | _ | + | { | } | | |
+ * `-----------------------------------------/ F11 / / \ \ F12 \----------------------------------------'
+ * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | Caps | Num |
+ * | | |/ LOWER / / \ \ \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_LOWER] = LAYOUT( \
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
+ _______, KC_PSLS, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F12, \
+ _______, KC_PAST, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \
+ _______, KC_PDOT, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+ _______, KC_LGUI, _______, XXXXXXX, KC_CLCK, KC_NLCK\
+
+ ),
+
+/* RAISE
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 |-------.-------. ,---------------| | | | | | |
+ * `-----------------------------------------/ / / \ \ \----------------------------------------'
+ * | | | /-------/ Space / \ Enter \-------\ | | |
+ * | | |/ / / \ \ RAISE \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_RAISE] = LAYOUT( \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX \
+ ),
+
+/* ADJUST
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * |RESET | | | | | | | Mute | Vol+ | Play | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | PSCR | SLCK | Pause| | Prev | Vol- | Next | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | |Insert| Home |PageUP| | | |RGB ON| HUE+ | SAT+ | VAL+ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | Del | End |PageDN|-------.-------. ,---------------| |RGB Re| MODE | HUE- | SAT- | VAL- |
+ * `-----------------------------------------/ / / \ \ \----------------------------------------'
+ * | |ADJUST| /-------/ Space / \ Enter \-------\ | | |
+ * | | |/ / / \ \ \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_ADJUST] = LAYOUT( \
+ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, KC_MPRV, KC_VOLD, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, KC_END, KC_PGDN, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, RGBRST, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \
+ XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+ )
+};
+
+
+int RGB_current_mode;
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+// Setting ADJUST layer RGB back to default
+void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+ if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
+ layer_on(layer3);
+ } else {
+ layer_off(layer3);
+ }
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ #ifdef SSD1306_128X64
+ iota_gfx_init(false); // turns on the display
+ #else
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+//assign the right code to your layers for OLED display
+#define L_QWERTY 0
+#define L_LOWER 2
+#define L_RAISE 4
+#define L_ADJUST 8
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_logo(void);
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (is_master) {
+ static char indctr[2][20][5]=
+ {
+ // white icon
+ {
+ {0x80,0x81,0x82,0x83,0},
+ {0x88,0x89,0x8A,0x8B,0},
+ {0x90,0x91,0x92,0x93,0},
+ {0x98,0x99,0x9A,0x9B,0},
+ {0x01,0x02,0x03,0x04,0},
+ {0xA0,0xA1,0xA2,0xA3,0},
+ {0xA8,0xA9,0xAA,0xAB,0},
+ {0xB0,0xB1,0xB2,0xB3,0},
+ {0xB8,0xB9,0xBA,0xBB,0},
+ {0x21,0x22,0x23,0x24,0},
+ {0xC0,0xC1,0xC2,0xC3,0},
+ {0xC8,0xC9,0xCA,0xCB,0},
+ {0xD0,0xD1,0xD2,0xD3,0},
+ {0xD8,0xD9,0xDA,0xDB,0},
+ {0x41,0x42,0x43,0x44,0},
+ {0xE0,0xE1,0xE2,0xE3,0},
+ {0xE8,0xE9,0xEA,0xEB,0},
+ {0xF0,0xF1,0xF2,0xF3,0},
+ {0xF8,0xF9,0xFA,0xFB,0},
+ {0x61,0x62,0x63,0x64,0}
+ },
+ // Black icon
+ {
+ {0x84,0x85,0x86,0x87,0},
+ {0x8C,0x8D,0x8E,0x8F,0},
+ {0x94,0x95,0x96,0x97,0},
+ {0x9C,0x9D,0x9E,0x9F,0},
+ {0x05,0x06,0x07,0x08,0},
+ {0xA4,0xA5,0xA6,0xA7,0},
+ {0xAC,0xAD,0xAE,0xAF,0},
+ {0xB4,0xB5,0xB6,0xB7,0},
+ {0xBC,0xBD,0xBE,0xBF,0},
+ {0x25,0x26,0x27,0x28,0},
+ {0xC4,0xC5,0xC6,0xC7,0},
+ {0xCC,0xCD,0xCE,0xCF,0},
+ {0xD4,0xD5,0xD6,0xD7,0},
+ {0xDC,0xDD,0xDE,0xDF,0},
+ {0x45,0x46,0x47,0x48,0},
+ {0xE4,0xE5,0xE6,0xE7,0},
+ {0xEC,0xED,0xEE,0xEF,0},
+ {0xF4,0xF5,0xF6,0xF7,0},
+ {0xFC,0xFD,0xFE,0xFF,0},
+ {0x65,0x66,0x67,0x68,0}
+ }
+ };
+
+ int rown = 0;
+ int rowc = 0;
+ int rowl = 0;
+ int rowr = 0;
+ int rowa = 0;
+
+ //Set Indicator icon
+ if (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+#endif//SSD1306OLED
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ case RGB_MOD:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ #endif
+ return false;
+ break;
+ case RGBRST:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ #endif
+ break;
+ }
+ return true;
+}
+
diff --git a/keyboards/yosino58/keymaps/default/rules.mk b/keyboards/yosino58/keymaps/default/rules.mk
new file mode 100644
index 00000000000..131f5e1f8a6
--- /dev/null
+++ b/keyboards/yosino58/keymaps/default/rules.mk
@@ -0,0 +1,30 @@
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./lib/glcdfont.c \
+ ./lib/logo_reader.c \
+ # ./lib/rgb_state_reader.c \
+ # ./lib/layer_state_reader.c \
+ # ./lib/keylogger.c \
+ # ./lib/mode_icon_reader.c \
+ # ./lib/host_led_state_reader.c \
+ # ./lib/timelogger.c \
diff --git a/keyboards/yosino58/keymaps/sakura/config.h b/keyboards/yosino58/keymaps/sakura/config.h
new file mode 100644
index 00000000000..64962b0d20d
--- /dev/null
+++ b/keyboards/yosino58/keymaps/sakura/config.h
@@ -0,0 +1,50 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+
+// #define MASTER_LEFT
+#define MASTER_RIGHT
+// #define EE_HANDS
+
+#define SSD1306OLED
+#define SSD1306_128X64
+
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 100
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 29
+#define RGBLIGHT_LIMIT_VAL 120
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
+
+#define MOUSEKEY_DELAY 50
+#define MOUSEKEY_INTERVAL 10
+#define MOUSEKEY_MAX_SPEED 3
+#define MOUSEKEY_TIME_TO_MAX 20
+#define MOUSEKEY_WHEEL_MAX_SPEED 8
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
diff --git a/keyboards/yosino58/keymaps/sakura/keymap.c b/keyboards/yosino58/keymaps/sakura/keymap.c
new file mode 100644
index 00000000000..0996f0e4e7c
--- /dev/null
+++ b/keyboards/yosino58/keymaps/sakura/keymap.c
@@ -0,0 +1,337 @@
+#include QMK_KEYBOARD_H
+#ifdef PROTOCOL_LUFA
+ #include "lufa.h"
+ #include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// 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,
+ RGBRST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* QWERTY
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | | Y | U | I | O | P | = |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LShift| A | S | D | F | G | | H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LCTRL | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | \ |
+ * `-----------------------------------------/ Del / / \ \ Bksp \----------------------------------------'
+ * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | [ | ] |
+ * | | |/ LOWER / / \ \ RAISE \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_QWERTY] = LAYOUT( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, \
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, \
+ KC_LALT, KC_LGUI, LOWER, RAISE, KC_LBRC, KC_RBRC\
+ ),
+
+/* LOWER
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | ESC | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | / | - | 7 | 8 | 9 | | PSCR | SLCK | Pause| | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LShift| * | + | 4 | 5 | 6 | |Insert| Home |PageUP| | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * |LCTRL | . | 0 | 1 | 2 | 3 |-------.-------. ,---------------| Del | End |PageDN| | Num | Caps |
+ * `-----------------------------------------/ F11 / / \ \ F12 \----------------------------------------'
+ * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | | |
+ * | | |/ LOWER / / \ \ \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_LOWER] = LAYOUT( \
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \
+ _______, KC_PSLS, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, KC_UP, XXXXXXX, \
+ _______, KC_PAST, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_INS, KC_HOME, KC_PGUP, XXXXXXX, KC_DOWN, KC_RGHT, \
+ _______, KC_PDOT, KC_P0, KC_P1, KC_P2, KC_P3, KC_F11, _______, _______, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_LEFT, KC_NLCK, KC_CLCK, \
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX\
+ ),
+
+/* RAISE
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * |RESET | | | | | | | Mute | Vol+ | Play | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | Prev | Vol- | Next | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | |MS_Bt1| MS_U |MS_Bt2|MS_WhU|MS_WhL| | | |RGB ON| HUE+ | SAT+ | VAL+ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | MS_L | MS_D | MS_R |MS_WhD|MS_WhR|-------.-------. ,---------------| | | MODE | HUE- | SAT- | VAL- |
+ * `-----------------------------------------/ / / \ \ \----------------------------------------'
+ * | | | /-------/ Space / \ Enter \-------\ | | |
+ * | | |/ / / \ \ RAISE \ | | |
+ * `-----------------------------' '------------------------------'
+ */
+ [_RAISE] = LAYOUT( \
+ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_WH_L, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
+ XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_WH_R, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, RGBRST, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \
+ XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX \
+ )
+
+/* ADJUST
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * |RESET | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | |-------.-------. ,---------------| | | | | | |
+ * `-----------------------------------------/ / / \ \ \----------------------------------------'
+ * | | | /-------/ / \ \-------\ | | |
+ * | | |/ / / \ \ \ | | |
+ * `-----------------------------' '------------------------------'
+
+ [_ADJUST] = LAYOUT( \
+ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+ )
+*/
+};
+
+
+int RGB_current_mode;
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+// Setting ADJUST layer RGB back to default
+void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+ if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
+ layer_on(layer3);
+ } else {
+ layer_off(layer3);
+ }
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ #ifdef SSD1306_128X64
+ iota_gfx_init(false); // turns on the display
+ #else
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+//assign the right code to your layers for OLED display
+#define L_QWERTY 0
+#define L_LOWER 2
+#define L_RAISE 4
+#define L_ADJUST 8
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_logo(void);
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (is_master) {
+ static char indctr[2][20][5]=
+ {
+ // white icon
+ {
+ {0x80,0x81,0x82,0x83,0},
+ {0x88,0x89,0x8A,0x8B,0},
+ {0x90,0x91,0x92,0x93,0},
+ {0x98,0x99,0x9A,0x9B,0},
+ {0x01,0x02,0x03,0x04,0},
+ {0xA0,0xA1,0xA2,0xA3,0},
+ {0xA8,0xA9,0xAA,0xAB,0},
+ {0xB0,0xB1,0xB2,0xB3,0},
+ {0xB8,0xB9,0xBA,0xBB,0},
+ {0x21,0x22,0x23,0x24,0},
+ {0xC0,0xC1,0xC2,0xC3,0},
+ {0xC8,0xC9,0xCA,0xCB,0},
+ {0xD0,0xD1,0xD2,0xD3,0},
+ {0xD8,0xD9,0xDA,0xDB,0},
+ {0x41,0x42,0x43,0x44,0},
+ {0xE0,0xE1,0xE2,0xE3,0},
+ {0xE8,0xE9,0xEA,0xEB,0},
+ {0xF0,0xF1,0xF2,0xF3,0},
+ {0xF8,0xF9,0xFA,0xFB,0},
+ {0x61,0x62,0x63,0x64,0}
+ },
+ // Black icon
+ {
+ {0x84,0x85,0x86,0x87,0},
+ {0x8C,0x8D,0x8E,0x8F,0},
+ {0x94,0x95,0x96,0x97,0},
+ {0x9C,0x9D,0x9E,0x9F,0},
+ {0x05,0x06,0x07,0x08,0},
+ {0xA4,0xA5,0xA6,0xA7,0},
+ {0xAC,0xAD,0xAE,0xAF,0},
+ {0xB4,0xB5,0xB6,0xB7,0},
+ {0xBC,0xBD,0xBE,0xBF,0},
+ {0x25,0x26,0x27,0x28,0},
+ {0xC4,0xC5,0xC6,0xC7,0},
+ {0xCC,0xCD,0xCE,0xCF,0},
+ {0xD4,0xD5,0xD6,0xD7,0},
+ {0xDC,0xDD,0xDE,0xDF,0},
+ {0x45,0x46,0x47,0x48,0},
+ {0xE4,0xE5,0xE6,0xE7,0},
+ {0xEC,0xED,0xEE,0xEF,0},
+ {0xF4,0xF5,0xF6,0xF7,0},
+ {0xFC,0xFD,0xFE,0xFF,0},
+ {0x65,0x66,0x67,0x68,0}
+ }
+ };
+
+ int rown = 0;
+ int rowc = 0;
+ int rowl = 0;
+ int rowr = 0;
+ int rowa = 0;
+
+ //Set Indicator icon
+ if (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+#endif//SSD1306OLED
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ case RGB_MOD:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ #endif
+ return false;
+ break;
+ case RGBRST:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ #endif
+ break;
+ }
+ return true;
+}
+
diff --git a/keyboards/yosino58/keymaps/sakura/rules.mk b/keyboards/yosino58/keymaps/sakura/rules.mk
new file mode 100644
index 00000000000..296e53287ae
--- /dev/null
+++ b/keyboards/yosino58/keymaps/sakura/rules.mk
@@ -0,0 +1,30 @@
+# 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./lib/glcdfont.c \
+ ./lib/logo_reader.c \
+ # ./lib/rgb_state_reader.c \
+ # ./lib/layer_state_reader.c \
+ # ./lib/keylogger.c \
+ # ./lib/mode_icon_reader.c \
+ # ./lib/host_led_state_reader.c \
+ # ./lib/timelogger.c \
diff --git a/keyboards/yosino58/lib/glcdfont.c b/keyboards/yosino58/lib/glcdfont.c
new file mode 100644
index 00000000000..01b656cc626
--- /dev/null
+++ b/keyboards/yosino58/lib/glcdfont.c
@@ -0,0 +1,275 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+
+#ifndef FONT5X7_H
+#define FONT5X7_H
+
+#ifdef __AVR__
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else
+ #define PROGMEM
+#endif
+
+// Standard ASCII 5x7 font
+const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFC, 0x02, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x81, 0xC1, 0xE1, 0xF1, 0xF9,
+ 0xF9, 0xF9, 0xF9, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x02, 0xFC,
+ 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07,
+ 0x07, 0x07, 0x07, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x03, 0x01, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFC, 0xFC, 0xFC, 0xFE, 0xFF, 0x00,
+ 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFC, 0xFE, 0xFC, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC,
+ 0xFE, 0x00, 0x00, 0x80, 0xF8, 0xFC,
+ 0x7C, 0x3E, 0x1E, 0x1E, 0x1E, 0x1E,
+ 0x1E, 0x3E, 0x7C, 0xFC, 0xF8, 0x80,
+ 0x00, 0x00, 0xC0, 0xF8, 0x7C, 0x3C,
+ 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C,
+ 0x3C, 0x3C, 0x18, 0x00, 0x38, 0x7C,
+ 0x7C, 0x7C, 0x7C, 0x7C, 0xFC, 0xFC,
+ 0x7C, 0x7C, 0x7C, 0x7C, 0x38, 0x00,
+ 0x00, 0xC0, 0xF0, 0xF8, 0x7C, 0x3C,
+ 0x1E, 0x1E, 0x1E, 0x3C, 0x7C, 0xF8,
+ 0xF0, 0xC0, 0x00, 0x00, 0x80, 0xF8,
+ 0xFC, 0x7C, 0x3E, 0x1E, 0x1E, 0x1E,
+ 0x1E, 0x1E, 0x3E, 0x7C, 0xFC, 0xF8,
+ 0x80, 0x00, 0x00, 0x00, 0xFC, 0xFE,
+ 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
+ 0x1E, 0x1E, 0x1E, 0x1E, 0x1C, 0x00,
+ 0xE0, 0xF8, 0xFC, 0x3E, 0x1E, 0x1E,
+ 0x1E, 0x1E, 0x1E, 0x1E, 0x3E, 0xFC,
+ 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
+ 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x0F, 0x1F, 0x3C, 0x3C,
+ 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0xFF,
+ 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+ 0x00, 0x00, 0x03, 0x0F, 0x1E, 0x3C,
+ 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C,
+ 0x7C, 0xF8, 0xC0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x07, 0x0F,
+ 0x0F, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
+ 0x1E, 0x1E, 0xFE, 0xFC, 0xF0, 0x00,
+ 0xC0, 0xF7, 0xFF, 0x3F, 0x3E, 0x1C,
+ 0x1C, 0x1C, 0x1C, 0x3E, 0x3F, 0xFF,
+ 0xF7, 0xC0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3F, 0x40, 0x80, 0x80, 0x80, 0x80,
+ 0x9C, 0x9E, 0x9E, 0x9E, 0x9E, 0x9F,
+ 0x9F, 0x9F, 0x9F, 0x9E, 0x9E, 0x9E,
+ 0x9E, 0x9C, 0x80, 0x80, 0x40, 0x3F,
+ 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE3, 0xE1, 0xE1, 0xE1, 0xE1, 0xE0,
+ 0xE0, 0xE0, 0xE0, 0xE1, 0xE1, 0xE1,
+ 0xE1, 0xE3, 0xFF, 0xFF, 0x7F, 0x3F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x3C,
+ 0x3C, 0x3C, 0x3C, 0x3C, 0x1F, 0x0F,
+ 0x07, 0x00, 0x00, 0x00, 0x0F, 0x1F,
+ 0x1F, 0x3E, 0x3C, 0x3C, 0x3C, 0x3C,
+ 0x3C, 0x3E, 0x1F, 0x1F, 0x0F, 0x00,
+ 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C,
+ 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C,
+ 0x3E, 0x1F, 0x03, 0x00, 0x1C, 0x3E,
+ 0x3E, 0x3E, 0x3E, 0x3E, 0x3F, 0x3F,
+ 0x3E, 0x3E, 0x3E, 0x3E, 0x1C, 0x00,
+ 0x00, 0x3F, 0x3F, 0x1F, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
+ 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x0F,
+ 0x1F, 0x1F, 0x3E, 0x3C, 0x3C, 0x3C,
+ 0x3C, 0x3C, 0x3E, 0x1F, 0x1F, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x1F,
+ 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
+ 0x1F, 0x1F, 0x0F, 0x07, 0x03, 0x00,
+ 0x01, 0x07, 0x0F, 0x1E, 0x3C, 0x3C,
+ 0x3C, 0x3C, 0x3C, 0x3C, 0x1E, 0x0F,
+ 0x07, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0xFC, 0x02, 0x01, 0x79, 0x79, 0x79,
+ 0x79, 0xF9, 0xF9, 0xF9, 0x79, 0x79,
+ 0x79, 0x79, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x02, 0xFC,
+ 0xFC, 0xFE, 0xFF, 0x87, 0x87, 0x87,
+ 0x87, 0x07, 0x07, 0x07, 0x87, 0x87,
+ 0x87, 0x87, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC,
+ 0xFC, 0x02, 0x01, 0xE1, 0xE1, 0xE1,
+ 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1,
+ 0xE1, 0xE1, 0xE1, 0xE1, 0xC1, 0xC1,
+ 0x81, 0x01, 0x01, 0x01, 0x02, 0xFC,
+ 0xFC, 0xFE, 0xFF, 0x1F, 0x1F, 0x1F,
+ 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
+ 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F,
+ 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC,
+ 0xFC, 0x02, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x09,
+ 0x89, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9,
+ 0xF9, 0x09, 0x09, 0x01, 0x02, 0xFC,
+ 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7,
+ 0x77, 0x07, 0x07, 0x07, 0x07, 0x07,
+ 0x07, 0xF7, 0xF7, 0xFF, 0xFE, 0xFC,
+ 0xFC, 0x02, 0x01, 0x01, 0x01, 0x01,
+ 0x81, 0xC1, 0xE1, 0xF1, 0xF1, 0xF9,
+ 0x79, 0x79, 0xF9, 0xF9, 0xF1, 0xF1,
+ 0xE1, 0x81, 0x01, 0x01, 0x02, 0xFC,
+ 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x7F, 0x3F, 0x1F, 0x0F, 0x0F, 0x07,
+ 0x87, 0x87, 0x07, 0x07, 0x0F, 0x0F,
+ 0x1F, 0x7F, 0xFF, 0xFF, 0xFE, 0xFC,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0,
+ 0xC0, 0xC0, 0xC0, 0xC0, 0xE1, 0xFF,
+ 0x7F, 0x1F, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
+ 0x00, 0x00, 0x3F, 0x3F, 0x3F, 0x3F,
+ 0x3F, 0x3F, 0x3F, 0x3F, 0x1E, 0x00,
+ 0x80, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xC0, 0xF0, 0xFC, 0xFC, 0x3F,
+ 0x0F, 0x03, 0x01, 0x01, 0xFF, 0xFF,
+ 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x3F, 0x0F, 0x03, 0x03, 0xC0,
+ 0xF0, 0xFC, 0xFE, 0xFE, 0x00, 0x00,
+ 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0xE0, 0xFC, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x1F, 0x03, 0x00,
+ 0x00, 0x00, 0x18, 0x1F, 0x1F, 0x1F,
+ 0x1F, 0x0F, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x1F, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0xE0, 0xFC, 0xFF,
+ 0xFF, 0xFF, 0xE7, 0xE0, 0xE0, 0xE0,
+ 0xE0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0xC0, 0xE0, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x7F, 0x3F, 0x1F, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0x01, 0x01, 0x01, 0x01,
+ 0x03, 0x0F, 0x3F, 0xFD, 0xF1, 0xC0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
+ 0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFC, 0xF0, 0xC0, 0x02, 0x0F, 0x3F,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x00, 0xF0, 0xFC,
+ 0xFF, 0xFF, 0xFF, 0x73, 0x70, 0x70,
+ 0x70, 0x70, 0x70, 0x70, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x03,
+ 0x00, 0x00, 0x00, 0x8C, 0x8F, 0x8F,
+ 0x8F, 0x8F, 0x8F, 0x8F, 0x00, 0x00,
+ 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x00, 0x00, 0x3F, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xC0, 0x80, 0x00,
+ 0x00, 0x80, 0xC0, 0xE0, 0xF8, 0xF0,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3F, 0x7F, 0xFF,
+ 0xFF, 0x7F, 0x3F, 0x1F, 0x07, 0x0F,
+ 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x3F, 0x40, 0x80, 0x8F, 0x8F, 0x8F,
+ 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F,
+ 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F,
+ 0x8F, 0x87, 0x83, 0x81, 0x40, 0x3F,
+ 0x3F, 0x7F, 0xFF, 0xF0, 0xF0, 0xF0,
+ 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
+ 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
+ 0xF0, 0xF8, 0xFC, 0xFE, 0x7F, 0x3F,
+ 0x3F, 0x40, 0x80, 0x8E, 0x8E, 0x8F,
+ 0x8F, 0x8F, 0x8E, 0x8E, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x83, 0x8F,
+ 0x8F, 0x8E, 0x8E, 0x80, 0x40, 0x3F,
+ 0x3F, 0x7F, 0xFF, 0xF1, 0xF1, 0xF0,
+ 0xF0, 0xF0, 0xF1, 0xF1, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0,
+ 0xF0, 0xF1, 0xF1, 0xFF, 0x7F, 0x3F,
+ 0x3F, 0x40, 0x80, 0x80, 0x9F, 0x9F,
+ 0x9F, 0x9F, 0x9F, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x9F, 0x9F,
+ 0x9F, 0x9F, 0x9F, 0x80, 0x40, 0x3F,
+ 0x3F, 0x7F, 0xFF, 0xFF, 0xE0, 0xE0,
+ 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xE0,
+ 0xE0, 0xE0, 0xE0, 0xFF, 0x7F, 0x3F,
+ 0x3F, 0x40, 0x80, 0x80, 0x80, 0x81,
+ 0x83, 0x87, 0x87, 0x8F, 0x8F, 0x8F,
+ 0x8F, 0x87, 0x87, 0x83, 0x81, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x40, 0x3F,
+ 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE,
+ 0xFC, 0xF8, 0xF8, 0xF0, 0xF0, 0xF0,
+ 0xF0, 0xF8, 0xF8, 0xFC, 0xFE, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F
+};
+#endif // FONT5X7_H
diff --git a/keyboards/yosino58/lib/glcdfont_.c b/keyboards/yosino58/lib/glcdfont_.c
new file mode 100644
index 00000000000..122b26afa36
--- /dev/null
+++ b/keyboards/yosino58/lib/glcdfont_.c
@@ -0,0 +1,243 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+
+#ifndef FONT5X7_H
+#define FONT5X7_H
+
+#ifdef __AVR__
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else
+ #define PROGMEM
+#endif
+
+// Standard ASCII 5x7 font
+const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x01, 0x0D, 0xFD,
+ 0xFD, 0x0D, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0xFE, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x01, 0x0D, 0xFD,
+ 0xFD, 0x8D, 0x8D, 0x8D, 0x8D, 0xF9,
+ 0x71, 0x01, 0x01, 0xFE, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x01, 0x01, 0xC1,
+ 0xF1, 0x39, 0x0D, 0x3D, 0xFD, 0xC1,
+ 0x01, 0x01, 0x01, 0xFE, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01,
+ 0x21, 0x31, 0xF9, 0xF9, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0xFE, 0x00, 0x00,
+ 0x00, 0x00, 0xC0, 0x80, 0xC0, 0xE0,
+ 0xF0, 0xF0, 0x00, 0xC0, 0x80, 0x00,
+ 0x80, 0xC0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x06, 0xEC, 0xD8, 0xB4,
+ 0x6E, 0xDE, 0x82, 0x7A, 0x76, 0xAC,
+ 0xD8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xB0, 0x70,
+ 0xBC, 0x7C, 0xBC, 0x7C, 0xBC, 0x70,
+ 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x90,
+ 0x9C, 0x84, 0x84, 0x84, 0x9C, 0x90,
+ 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7F, 0x80, 0x80, 0x98, 0x9F,
+ 0x9F, 0x98, 0x98, 0x98, 0x98, 0x9C,
+ 0x9E, 0x80, 0x80, 0x7F, 0x00, 0x00,
+ 0x00, 0x7F, 0x80, 0x80, 0x98, 0x9F,
+ 0x9F, 0x99, 0x81, 0x83, 0x87, 0x9C,
+ 0x98, 0x98, 0x80, 0x7F, 0x00, 0x00,
+ 0x00, 0x7F, 0x80, 0x80, 0x9F, 0x9F,
+ 0x86, 0x86, 0x86, 0x86, 0x9F, 0x9F,
+ 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00,
+ 0x00, 0x7F, 0x80, 0x80, 0x80, 0x80,
+ 0x98, 0x98, 0x9F, 0x9F, 0x98, 0x98,
+ 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00,
+ 0x00, 0x00, 0x07, 0x03, 0x07, 0x0F,
+ 0x1F, 0x1F, 0x00, 0x0C, 0x07, 0x03,
+ 0x07, 0x0C, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0x2F, 0x77,
+ 0xFB, 0xFC, 0x81, 0xBB, 0xD6, 0x6D,
+ 0x1B, 0x37, 0x60, 0xC0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1B, 0x37,
+ 0x3B, 0x37, 0x3B, 0x37, 0x3B, 0x37,
+ 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1B, 0x37,
+ 0x3B, 0x37, 0x3B, 0x37, 0x3B, 0x37,
+ 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFE, 0xFF, 0xFF, 0xF3, 0x03,
+ 0x03, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00,
+ 0x00, 0xFE, 0xFF, 0xFF, 0xF3, 0x03,
+ 0x03, 0x73, 0x73, 0x73, 0x73, 0x07,
+ 0x8F, 0xFF, 0xFF, 0xFE, 0x00, 0x00,
+ 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F,
+ 0x0F, 0xC7, 0xF3, 0xC3, 0x03, 0x3F,
+ 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00,
+ 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xDF, 0xCF, 0x07, 0x07, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00,
+ 0x00, 0x00, 0xC0, 0x80, 0xC0, 0xE0,
+ 0xF0, 0xF0, 0x00, 0x20, 0x20, 0x10,
+ 0x10, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xF0, 0xE8, 0xDC,
+ 0xBE, 0x7E, 0x02, 0xFA, 0x76, 0xAC,
+ 0xD8, 0xF0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10,
+ 0x1C, 0x04, 0x04, 0x04, 0x1C, 0x10,
+ 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x04, 0xF8, 0x30,
+ 0x5C, 0x84, 0x04, 0x04, 0x1C, 0x10,
+ 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7F, 0xFF, 0xFF, 0xE7, 0xE0,
+ 0xE0, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7,
+ 0xE3, 0xE1, 0xFF, 0x7F, 0x00, 0x00,
+ 0x00, 0x7F, 0xFF, 0xFF, 0xE7, 0xE0,
+ 0xE0, 0xE6, 0xFE, 0xFC, 0xF8, 0xE3,
+ 0xE7, 0xE7, 0xFF, 0x7F, 0x00, 0x00,
+ 0x00, 0x7F, 0xFF, 0xFF, 0xE0, 0xE0,
+ 0xF9, 0xF9, 0xF9, 0xF9, 0xE0, 0xE0,
+ 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00,
+ 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xE7, 0xE7, 0xE0, 0xE0, 0xE7, 0xE7,
+ 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00,
+ 0x00, 0x00, 0x07, 0x03, 0x07, 0x0F,
+ 0x1F, 0x1F, 0x00, 0x09, 0x09, 0x11,
+ 0x11, 0x21, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1F, 0x2F, 0x77,
+ 0xFB, 0xFD, 0x80, 0xBE, 0xDD, 0x6B,
+ 0x37, 0x1F, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1F, 0x38,
+ 0x38, 0x38, 0x38, 0x38, 0x38, 0x38,
+ 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1F, 0x20,
+ 0x20, 0x20, 0x21, 0x22, 0x24, 0x28,
+ 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+#endif // FONT5X7_H
diff --git a/keyboards/yosino58/lib/host_led_state_reader.c b/keyboards/yosino58/lib/host_led_state_reader.c
new file mode 100644
index 00000000000..2a17e0a33b8
--- /dev/null
+++ b/keyboards/yosino58/lib/host_led_state_reader.c
@@ -0,0 +1,15 @@
+#include
+#include "yosino58.h"
+
+char host_led_state_str[24];
+
+const char *read_host_led_state(void)
+{
+ uint8_t leds = host_keyboard_leds();
+ snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
+ (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
+ (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
+ (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- ");
+
+ return host_led_state_str;
+}
diff --git a/keyboards/yosino58/lib/keylogger.c b/keyboards/yosino58/lib/keylogger.c
new file mode 100644
index 00000000000..c50de94c208
--- /dev/null
+++ b/keyboards/yosino58/lib/keylogger.c
@@ -0,0 +1,45 @@
+#include
+#include "yosino58.h"
+
+char keylog_str[24] = {};
+char keylogs_str[21] = {};
+int keylogs_str_idx = 0;
+
+const char code_to_name[60] = {
+ ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+ 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+ '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
+ 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ',
+ ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '};
+
+void set_keylog(uint16_t keycode, keyrecord_t *record) {
+ char name = ' ';
+ if (keycode < 60) {
+ name = code_to_name[keycode];
+ }
+
+ // update keylog
+ snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
+ record->event.key.row, record->event.key.col,
+ keycode, name);
+
+ // update keylogs
+ if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
+ keylogs_str_idx = 0;
+ for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
+ keylogs_str[i] = ' ';
+ }
+ }
+
+ keylogs_str[keylogs_str_idx] = name;
+ keylogs_str_idx++;
+}
+
+const char *read_keylog(void) {
+ return keylog_str;
+}
+
+const char *read_keylogs(void) {
+ return keylogs_str;
+}
diff --git a/keyboards/yosino58/lib/layer_state_reader.c b/keyboards/yosino58/lib/layer_state_reader.c
new file mode 100644
index 00000000000..7e5747cb75a
--- /dev/null
+++ b/keyboards/yosino58/lib/layer_state_reader.c
@@ -0,0 +1,35 @@
+
+#include QMK_KEYBOARD_H
+#include
+#include "yosino58.h"
+
+#define L_BASE 0
+#define L_LOWER 8
+#define L_RAISE 16
+#define L_ADJUST 65536
+#define L_ADJUST_TRI 65560
+
+char layer_state_str[24];
+
+const char *read_layer_state(void) {
+ switch (layer_state)
+ {
+ case L_BASE:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default");
+ break;
+ case L_RAISE:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
+ break;
+ case L_LOWER:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
+ break;
+ case L_ADJUST:
+ case L_ADJUST_TRI:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
+ break;
+ default:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
+ }
+
+ return layer_state_str;
+}
diff --git a/keyboards/yosino58/lib/logo_reader.c b/keyboards/yosino58/lib/logo_reader.c
new file mode 100644
index 00000000000..96c9b897ef5
--- /dev/null
+++ b/keyboards/yosino58/lib/logo_reader.c
@@ -0,0 +1,11 @@
+#include "yosino58.h"
+
+const char *read_logo(void) {
+ static char logo[] = {
+ 0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+ 0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+ 0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+ 0};
+
+ return logo;
+}
diff --git a/keyboards/yosino58/lib/mode_icon_reader.c b/keyboards/yosino58/lib/mode_icon_reader.c
new file mode 100644
index 00000000000..865d9537ded
--- /dev/null
+++ b/keyboards/yosino58/lib/mode_icon_reader.c
@@ -0,0 +1,15 @@
+#include
+#include "yosino58.h"
+
+char mode_icon[24];
+
+const char *read_mode_icon(bool swap) {
+ static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}};
+ if (swap == false) {
+ snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]);
+ } else {
+ snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]);
+ }
+
+ return mode_icon;
+}
diff --git a/keyboards/yosino58/lib/rgb_state_reader.c b/keyboards/yosino58/lib/rgb_state_reader.c
new file mode 100644
index 00000000000..e0efe2e5288
--- /dev/null
+++ b/keyboards/yosino58/lib/rgb_state_reader.c
@@ -0,0 +1,15 @@
+#ifdef RGBLIGHT_ENABLE
+
+#include QMK_KEYBOARD_H
+#include
+
+extern rgblight_config_t rgblight_config;
+char rbf_info_str[24];
+const char *read_rgb_info(void) {
+
+ snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d",
+ rgblight_config.enable ? "on" : "- ", rgblight_config.mode,
+ rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
+ return rbf_info_str;
+}
+#endif
diff --git a/keyboards/yosino58/lib/timelogger.c b/keyboards/yosino58/lib/timelogger.c
new file mode 100644
index 00000000000..ce8b0c270fe
--- /dev/null
+++ b/keyboards/yosino58/lib/timelogger.c
@@ -0,0 +1,16 @@
+#include
+#include "yosino58.h"
+
+char timelog_str[24] = {};
+int last_time = 0;
+int elapsed_time = 0;
+
+void set_timelog(void) {
+ elapsed_time = timer_elapsed(last_time);
+ last_time = timer_read();
+ snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time);
+}
+
+const char *read_timelog(void) {
+ return timelog_str;
+}
diff --git a/keyboards/yosino58/pro_micro.h b/keyboards/yosino58/pro_micro.h
new file mode 100644
index 00000000000..36663337271
--- /dev/null
+++ b/keyboards/yosino58/pro_micro.h
@@ -0,0 +1,358 @@
+/*
+ pins_arduino.h - Pin definition functions for Arduino
+ Part of Arduino - http://www.arduino.cc/
+
+ Copyright (c) 2007 David A. Mellis
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General
+ Public License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA
+
+ $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
+*/
+#pragma once
+
+#include
+
+// Workaround for wrong definitions in "iom32u4.h".
+// This should be fixed in the AVR toolchain.
+#undef UHCON
+#undef UHINT
+#undef UHIEN
+#undef UHADDR
+#undef UHFNUM
+#undef UHFNUML
+#undef UHFNUMH
+#undef UHFLEN
+#undef UPINRQX
+#undef UPINTX
+#undef UPNUM
+#undef UPRST
+#undef UPCONX
+#undef UPCFG0X
+#undef UPCFG1X
+#undef UPSTAX
+#undef UPCFG2X
+#undef UPIENX
+#undef UPDATX
+#undef TCCR2A
+#undef WGM20
+#undef WGM21
+#undef COM2B0
+#undef COM2B1
+#undef COM2A0
+#undef COM2A1
+#undef TCCR2B
+#undef CS20
+#undef CS21
+#undef CS22
+#undef WGM22
+#undef FOC2B
+#undef FOC2A
+#undef TCNT2
+#undef TCNT2_0
+#undef TCNT2_1
+#undef TCNT2_2
+#undef TCNT2_3
+#undef TCNT2_4
+#undef TCNT2_5
+#undef TCNT2_6
+#undef TCNT2_7
+#undef OCR2A
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+#undef OCR2B
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+
+#define NUM_DIGITAL_PINS 30
+#define NUM_ANALOG_INPUTS 12
+
+#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
+#define TXLED0 PORTD |= (1<<5)
+#define TXLED1 PORTD &= ~(1<<5)
+#define RXLED0 PORTB |= (1<<0)
+#define RXLED1 PORTB &= ~(1<<0)
+
+static const uint8_t SDA = 2;
+static const uint8_t SCL = 3;
+#define LED_BUILTIN 13
+
+// Map SPI port to 'new' pins D14..D17
+static const uint8_t SS = 17;
+static const uint8_t MOSI = 16;
+static const uint8_t MISO = 14;
+static const uint8_t SCK = 15;
+
+// Mapping of analog pins as digital I/O
+// A6-A11 share with digital pins
+static const uint8_t ADC0 = 18;
+static const uint8_t ADC1 = 19;
+static const uint8_t ADC2 = 20;
+static const uint8_t ADC3 = 21;
+static const uint8_t ADC4 = 22;
+static const uint8_t ADC5 = 23;
+static const uint8_t ADC6 = 24; // D4
+static const uint8_t ADC7 = 25; // D6
+static const uint8_t ADC8 = 26; // D8
+static const uint8_t ADC9 = 27; // D9
+static const uint8_t ADC10 = 28; // D10
+static const uint8_t ADC11 = 29; // D12
+
+#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
+#define digitalPinToPCICRbit(p) 0
+#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
+#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
+
+// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
+extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
+#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
+
+#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
+
+#ifdef ARDUINO_MAIN
+
+// On the Arduino board, digital pins are also used
+// for the analog output (software PWM). Analog input
+// pins are a separate set.
+
+// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
+//
+// D0 PD2 RXD1/INT2
+// D1 PD3 TXD1/INT3
+// D2 PD1 SDA SDA/INT1
+// D3# PD0 PWM8/SCL OC0B/SCL/INT0
+// D4 A6 PD4 ADC8
+// D5# PC6 ??? OC3A/#OC4A
+// D6# A7 PD7 FastPWM #OC4D/ADC10
+// D7 PE6 INT6/AIN0
+//
+// D8 A8 PB4 ADC11/PCINT4
+// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
+// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
+// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
+// D12 A11 PD6 T1/#OC4D/ADC9
+// D13# PC7 PWM10 CLK0/OC4A
+//
+// A0 D18 PF7 ADC7
+// A1 D19 PF6 ADC6
+// A2 D20 PF5 ADC5
+// A3 D21 PF4 ADC4
+// A4 D22 PF1 ADC1
+// A5 D23 PF0 ADC0
+//
+// New pins D14..D17 to map SPI port to digital pins
+//
+// MISO D14 PB3 MISO,PCINT3
+// SCK D15 PB1 SCK,PCINT1
+// MOSI D16 PB2 MOSI,PCINT2
+// SS D17 PB0 RXLED,SS/PCINT0
+//
+// Connected LEDs on board for TX and RX
+// TXLED D24 PD5 XCK1
+// RXLED D17 PB0
+// HWB PE2 HWB
+
+// these arrays map port names (e.g. port B) to the
+// appropriate addresses for various functions (e.g. reading
+// and writing)
+const uint16_t PROGMEM port_to_mode_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &DDRB,
+ (uint16_t) &DDRC,
+ (uint16_t) &DDRD,
+ (uint16_t) &DDRE,
+ (uint16_t) &DDRF,
+};
+
+const uint16_t PROGMEM port_to_output_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &PORTB,
+ (uint16_t) &PORTC,
+ (uint16_t) &PORTD,
+ (uint16_t) &PORTE,
+ (uint16_t) &PORTF,
+};
+
+const uint16_t PROGMEM port_to_input_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &PINB,
+ (uint16_t) &PINC,
+ (uint16_t) &PIND,
+ (uint16_t) &PINE,
+ (uint16_t) &PINF,
+};
+
+const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
+ PD, // D0 - PD2
+ PD, // D1 - PD3
+ PD, // D2 - PD1
+ PD, // D3 - PD0
+ PD, // D4 - PD4
+ PC, // D5 - PC6
+ PD, // D6 - PD7
+ PE, // D7 - PE6
+
+ PB, // D8 - PB4
+ PB, // D9 - PB5
+ PB, // D10 - PB6
+ PB, // D11 - PB7
+ PD, // D12 - PD6
+ PC, // D13 - PC7
+
+ PB, // D14 - MISO - PB3
+ PB, // D15 - SCK - PB1
+ PB, // D16 - MOSI - PB2
+ PB, // D17 - SS - PB0
+
+ PF, // D18 - A0 - PF7
+ PF, // D19 - A1 - PF6
+ PF, // D20 - A2 - PF5
+ PF, // D21 - A3 - PF4
+ PF, // D22 - A4 - PF1
+ PF, // D23 - A5 - PF0
+
+ PD, // D24 - PD5
+ PD, // D25 / D6 - A7 - PD7
+ PB, // D26 / D8 - A8 - PB4
+ PB, // D27 / D9 - A9 - PB5
+ PB, // D28 / D10 - A10 - PB6
+ PD, // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
+ _BV(2), // D0 - PD2
+ _BV(3), // D1 - PD3
+ _BV(1), // D2 - PD1
+ _BV(0), // D3 - PD0
+ _BV(4), // D4 - PD4
+ _BV(6), // D5 - PC6
+ _BV(7), // D6 - PD7
+ _BV(6), // D7 - PE6
+
+ _BV(4), // D8 - PB4
+ _BV(5), // D9 - PB5
+ _BV(6), // D10 - PB6
+ _BV(7), // D11 - PB7
+ _BV(6), // D12 - PD6
+ _BV(7), // D13 - PC7
+
+ _BV(3), // D14 - MISO - PB3
+ _BV(1), // D15 - SCK - PB1
+ _BV(2), // D16 - MOSI - PB2
+ _BV(0), // D17 - SS - PB0
+
+ _BV(7), // D18 - A0 - PF7
+ _BV(6), // D19 - A1 - PF6
+ _BV(5), // D20 - A2 - PF5
+ _BV(4), // D21 - A3 - PF4
+ _BV(1), // D22 - A4 - PF1
+ _BV(0), // D23 - A5 - PF0
+
+ _BV(5), // D24 - PD5
+ _BV(7), // D25 / D6 - A7 - PD7
+ _BV(4), // D26 / D8 - A8 - PB4
+ _BV(5), // D27 / D9 - A9 - PB5
+ _BV(6), // D28 / D10 - A10 - PB6
+ _BV(6), // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ TIMER0B, /* 3 */
+ NOT_ON_TIMER,
+ TIMER3A, /* 5 */
+ TIMER4D, /* 6 */
+ NOT_ON_TIMER,
+
+ NOT_ON_TIMER,
+ TIMER1A, /* 9 */
+ TIMER1B, /* 10 */
+ TIMER0A, /* 11 */
+
+ NOT_ON_TIMER,
+ TIMER4A, /* 13 */
+
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+};
+
+const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
+ 7, // A0 PF7 ADC7
+ 6, // A1 PF6 ADC6
+ 5, // A2 PF5 ADC5
+ 4, // A3 PF4 ADC4
+ 1, // A4 PF1 ADC1
+ 0, // A5 PF0 ADC0
+ 8, // A6 D4 PD4 ADC8
+ 10, // A7 D6 PD7 ADC10
+ 11, // A8 D8 PB4 ADC11
+ 12, // A9 D9 PB5 ADC12
+ 13, // A10 D10 PB6 ADC13
+ 9 // A11 D12 PD6 ADC9
+};
+
+#endif /* ARDUINO_MAIN */
+
+// These serial port names are intended to allow libraries and architecture-neutral
+// sketches to automatically default to the correct port name for a particular type
+// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
+//
+// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+//
+// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+//
+// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+//
+// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+//
+// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+// pins are NOT connected to anything by default.
+#define SERIAL_PORT_MONITOR Serial
+#define SERIAL_PORT_USBVIRTUAL Serial
+#define SERIAL_PORT_HARDWARE Serial1
+#define SERIAL_PORT_HARDWARE_OPEN Serial1
diff --git a/keyboards/yosino58/rev1/config.h b/keyboards/yosino58/rev1/config.h
new file mode 100644
index 00000000000..a9f4f666ec6
--- /dev/null
+++ b/keyboards/yosino58/rev1/config.h
@@ -0,0 +1,72 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0F6A
+#define PRODUCT_ID 0x01B8
+#define DEVICE_VER 0x0001
+#define MANUFACTURER sakuranbo0046
+#define PRODUCT yosino58
+#define DESCRIPTION yosino58 is 6~4+5keys column-staggered split keyboard.
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLED_NUM 12 // Number of LEDs
+
+/*
+ * 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
diff --git a/keyboards/orthodox/matrix.c b/keyboards/yosino58/rev1/matrix.c
similarity index 72%
rename from keyboards/orthodox/matrix.c
rename to keyboards/yosino58/rev1/matrix.c
index 2ca5f4d87ab..718cc574481 100644
--- a/keyboards/orthodox/matrix.c
+++ b/keyboards/yosino58/rev1/matrix.c
@@ -20,10 +20,7 @@ along with this program. If not, see .
*/
#include
#include
-#ifdef USE_I2C
-// provides memcpy for copying TWI slave buffer
-// #include