Merge branch 'master' into roguepullrequest

pull/5640/head
roguepullrequest 6 years ago committed by GitHub
commit ac69272a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

@ -114,7 +114,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 custom
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
LED_MATRIX_ENABLE ?= no
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
@ -172,6 +172,11 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
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

@ -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.

@ -5,7 +5,7 @@ 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`:
@ -52,6 +52,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
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/IS31FL3737
!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
@ -102,6 +103,27 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
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).
---
### WS2812 (AVR only)
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`:
```C
RGB_MATRIX_ENABLE = WS2812
```
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.
```C

@ -27,6 +27,12 @@
#include <util/delay.h>
#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)
{

@ -30,7 +30,6 @@
#include "rgblight_types.h"
/* User Interface
*
* Input:
@ -43,6 +42,10 @@
* - Send out the LED data
* - Wait 50<EFBFBD>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);

@ -6,7 +6,7 @@
#define OTHER 3
enum custom_keycodes {
MACRO1
MACRO1 = SAFE_RANGE
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {

@ -2,7 +2,7 @@
"keyboard_name": "Canoe",
"maintainer": "qmk",
"url": "",
"height": 8,
"height": 6,
"width": 15,
"layouts": {
"LAYOUT_iso": {

@ -4,7 +4,7 @@
"url": "",
"maintainer": "skullydazed",
"width": 10,
"height": 7,
"height": 8,
"layouts": {
"LAYOUT": {
"layout": [

@ -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 <http://www.gnu.org/licenses/>.
*/
#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

@ -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}]
}
}
}

@ -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 <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

@ -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 <http://www.gnu.org/licenses/>.
*/
#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) {
}

@ -0,0 +1 @@
# The default keymap for modelm101

@ -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 <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

@ -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 <http://www.gnu.org/licenses/>.
*/
#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) {
}

@ -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).

@ -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 <http://www.gnu.org/licenses/>.
*/
#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<<USB_LED_NUM_LOCK)) {
writePinLow(B4);
} else {
writePinHigh(B4);
}
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
writePinLow(B6);
} else {
writePinHigh(B6);
}
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
writePinLow(B5);
} else {
writePinHigh(B5);
}
led_set_user(usb_led);
}

@ -0,0 +1,45 @@
/* 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 <http://www.gnu.org/licenses/>.
*/
#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 */

@ -0,0 +1,42 @@
# modelm101
![IBM Model M 101 ANSI/102 ISO](https://i.imgur.com/DAE3W7g.jpg)
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).

@ -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)

@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 15,
"height": 4.5,
"height": 4.7,
"layouts": {
"LAYOUT": {
"layout": [

@ -53,7 +53,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* 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

@ -13,6 +13,177 @@ 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
* | | | */
const rgb_led g_rgb_leds_left[27] = {
//LEFT
{ { 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
};
const rgb_led g_rgb_leds_right[27] = {
//RIGHT
{ { 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
};
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
//LEFT
{ { 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
//RIGHT
{ { 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
};
#endif
void matrix_init_kb(void) {
#ifdef AUDIO_ENABLE

@ -1,8 +1,8 @@
{
"keyboard_name": "Ergodone",
"maintainer": "Yu He",
"width": 19.5,
"height": 9.375,
"width": 17,
"height": 8,
"layouts": {
"LAYOUT_ergodox": {

@ -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": {

@ -1,7 +1,7 @@
{
"keyboard_name": "Infinity Ergodox",
"width": 19.5,
"height": 9.375,
"width": 17,
"height": 8,
"layouts": {
"LAYOUT_ergodox": {
"layout": [

@ -23,15 +23,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* 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

@ -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));
// 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;
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;
}
#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)),
[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]);
}
// 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)
)
};
// Don't fuck with this, thanks.
size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);

@ -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

@ -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]);

@ -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!

@ -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

@ -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]);

@ -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!

@ -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

@ -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]);
}

@ -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!

@ -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).

@ -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

@ -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
}

@ -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<<n)
//i.e) S(teno)R(ight)F
enum ORDER {
SFN = 0, SPWR, SST1, SST2, SST3, SST4, SNUM,
SFN = 0, SPWR, SST1, SST2, SST3, SST4, SNUML, SNUMR,
SLSU, SLSD, SLT, SLK, SLP, SLW, SLH, SLR, SLA, SLO,
SRE, SRU, SRF, SRR, SRP, SRB, SRL, SRG, SRT, SRS, SRD, SRZ
SRE, SRU, SRF, SRR, SRP, SRB, SRL, SRG, SRT, SRS, SRD, SRZ, SRES1, SRES2
};
// Break it all out
@ -32,11 +47,14 @@ enum ORDER {
#define ST2 STN(SST2)
#define ST3 STN(SST3)
#define ST4 STN(SST4)
#define NUM STN(SNUM) // No distinction between left and right
#define LNO STN(SNUML) // STN1-6
#define RNO STN(SNUMR) // STN7-C
#define RES1 STN(SRES1) // Use reserved for sticky state
#define RES2 STN(SRES2)
#define LSU STN(SLSU)
#define LSD STN(SLSD)
#define LFT STN(SLT) // (L)e(F)t (T), preprocessor conflict
#define LFT STN(SLT) // (L)e(F)t (T), preprocessor conflict
#define LK STN(SLK)
#define LP STN(SLP)
#define LW STN(SLW)
@ -57,234 +75,3 @@ enum ORDER {
#define RS STN(SRS)
#define RD STN(SRD)
#define RZ STN(SRZ)
bool processQwerty(void);
bool processFakeSteno(void);
void clickMouse(uint8_t kc);
void SEND(uint8_t kc);
extern int getKeymapCount(void);
// Mode state
enum MODE { STENO = 0, QWERTY, COMMAND };
enum MODE cMode = STENO;
enum MODE pMode;
bool QWERSTENO = false;
// Command State
#define MAX_CMD_BUF 20
uint8_t CMDBUF[MAX_CMD_BUF];
uint8_t CMDLEN = 0;
// Key Repeat state
bool inChord = false;
uint16_t repTimer = 0;
#define REP_DELAY 300
// 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)) {
uprintf("Fallback Toggle\n");
QWERSTENO = !QWERSTENO;
goto out;
}
// handle command mode
if (cChord == (PWR | FN | RD | RZ)) {
uprintf("COMMAND Toggle\n");
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 | ST2 | ST3) && getKeymapCount() > 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;
}

@ -1,6 +1,6 @@
{
"maintainer": "germ",
"height": 4.75,
"height": 5.75,
"width": 19.5,
"keyboard_name": "Gergo",
"url": "http://gboards.ca",

@ -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.

@ -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);
};

@ -0,0 +1,10 @@
# [Gergo! By g Heavy Industries](http://gboards.ca)
![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg)
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!

@ -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

@ -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
/** @} */

@ -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

@ -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
/**

@ -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, \

@ -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, \

@ -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
* **default** default Hadron layout
* **ishtob** ishtob's Hadron layout
* **sebaslayout** sebaslayout's Hadron layout

@ -1,195 +0,0 @@
#include <string.h>
#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<<col));
}
matrix_row_t matrix_get_row(uint8_t row) {
return matrix[row];
}
void matrix_print(void) {
printf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
printf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<<col))
printf("1");
else
printf("0");
}
printf("\n");
}
}

@ -225,7 +225,7 @@
* ST driver system settings.
*/
#define STM32_ST_IRQ_PRIORITY 8
#define STM32_ST_USE_TIMER 2
#define STM32_ST_USE_TIMER 3
/*
* UART driver system settings.

@ -1,57 +1,25 @@
# project specific files
SRC = matrix.c
## chip/board settings
# - the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# 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

@ -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();
}

@ -1,4 +1,4 @@
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
/* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef VER3_H
#define VER3_H
#pragma once
#include "hadron.h"
#endif
#include "hadron.h"

@ -4,7 +4,7 @@
"maintainer": "qmk",
"bootloader": "",
"width": 20,
"height": 8,
"height": 9.5,
"layouts": {
"LAYOUT": {
"layout": [

@ -2,7 +2,7 @@
"keyboard_name": "Not So MiniDox",
"url": "",
"maintainer": "qmk",
"width": 12,
"width": 14,
"height": 5.75,
"layouts": {
"LAYOUT": {

@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 13,
"height": 6,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [

@ -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}]

@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 16,
"height": 5,
"height": 4.5,
"layouts": {
"LAYOUT": {
"layout": [

@ -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}]

@ -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

@ -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 \
//| | | | | | | | | | | | |
//,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
),

@ -2,7 +2,7 @@
"keyboard_name": "kbd4x",
"url": "",
"maintainer": "qmk",
"width": 14,
"width": 12,
"height": 4,
"layouts": {
"LAYOUT_planck_mit": {

@ -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(_FLBSPC R_ALTR_GUIR_CTRLEFT 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_ALTR_GUIR_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
*
* VOLDNVOLUP
*
*/
/* 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
*
* RESETQWERTFORTY
*
*
*
* ` ! @ # $ % ^ & * ( ) 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)
};

@ -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": [

@ -0,0 +1,31 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
Copyright 2018 Danny Nguyen <danny@keeb.io>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Use I2C or Serial, not both */
#define USE_SERIAL
//#define USE_I2C
#define USB_MAX_POWER_CONSUMPTION 50
// #define USB_MAX_POWER_CONSUMPTION 100

@ -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_ALTR_CTRLEFT 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

@ -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
}
}

@ -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(

@ -1,8 +1,8 @@
{
"keyboard_name": "Monkeebs Orthodox Rev.1",
"maintainer": "drashna",
"width": 17,
"height": 17.24,
"width": 19,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [

@ -1,8 +1,8 @@
{
"keyboard_name": "Monkeebs Orthodox Rev.3",
"maintainer": "drashna",
"width": 17,
"height": 17.24,
"width": 19,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [

@ -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": [

@ -1 +1 @@
secret.h
secrets.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

@ -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)
#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)
#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)
float onsong[][2] = SONG(MARIO_MUSHROOM);
float offsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
enum custom_keycodes {
PWD = SAFE_RANGE,
MAIL,
GAMEON,
GAMEOFF
};
// sounds
#ifdef AUDIO_ENABLE
float gamesong[][2] = SONG(MARIO_MUSHROOM);
float defsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
float failed[][2] = SONG(TERMINAL_SOUND);
#endif
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;
// leader key
bool leader_succeed;
bool leader_layer_game;
bool leader_layer_def;
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leader_succeed = leading = false;
leader_layer_game = false;
leader_layer_def = false;
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),
};

@ -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)

@ -1,9 +1,4 @@
About
------
A simple Norwegian Layout.
Layout
-------
![Layout](https://i.imgur.com/GQ4iM6B.png "Keyboard Layout")
A simple Norwegian grid layout using Leader Key, Space Cadet Shift and audio.

@ -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

@ -27,7 +27,6 @@ enum {
RSHIFT,
LSHIFT,
TD_S
};
int cur_dance (qk_tap_dance_state_t *state);
@ -37,6 +36,7 @@ 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;
@ -92,12 +92,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
void matrix_scan_user(void) {
if (is_alt_tab_active)
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)
@ -105,12 +106,13 @@ void matrix_scan_user(void) {
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_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)
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(
@ -171,6 +173,7 @@ void x_finished (qk_tap_dance_state_t *state, void *user_data) {
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) {
@ -242,7 +245,6 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[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(); }

@ -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;
}
}

@ -0,0 +1,6 @@
SRC += muse.c
ENCODER_ENABLE = no
OPT_DEFS += -DTRILAYER_ENABLED
OPT_DEFS += -DAUDIO_CLICKY

@ -5,8 +5,8 @@
"url": "",
"maintainer": "qmk",
"processor": "atmega32u4",
"width": 14,
"height": 4,
"width": 16,
"height": 5,
"layouts": {
"LAYOUT": {
"key_count": 53,

@ -4,14 +4,15 @@
#
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
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix
LED_ANIMATIONS = yes # LED animations
RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix
RGBLIGHT_ANIMATIONS = no # LED animations
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500)
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode

@ -0,0 +1,155 @@
#include QMK_KEYBOARD_H
#include "xulkal.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
#ifdef OLED_DRIVER_ENABLE
#include "oled_driver.h"
#endif
#define EXPAND_LAYOUT(...) LAYOUT(__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_________________, KC_MINS, KC_EQL, _________________QWERTY_R1_________________, \
_________________QWERTY_L2_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R2_________________, \
_________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \
_________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \
_________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \
),
#ifndef GAMELAYER_DISABLE
[_GAME] = EXPAND_LAYOUT( \
___________________GAME_L1_________________, KC_MINS, KC_EQL, ___________________GAME_R1_________________, \
___________________GAME_L2_________________, KC_LBRC, KC_RBRC, ___________________GAME_R2_________________, \
___________________GAME_L3_________________, KC_GRV, KC_QUOT, ___________________GAME_R3_________________, \
___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \
___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________, \
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \
),
#endif
[_LOWER] = EXPAND_LAYOUT( \
__________________LOWER_L1_________________, KC_PMNS, KC_PPLS, __________________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
[_RAISE] = EXPAND_LAYOUT( \
_________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \
_________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \
_________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \
_________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \
_________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \
_______, _______, _______, _______, _______, _______, _______, _______ \
),
#endif
};
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
#ifdef OLED_DRIVER_ENABLE
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);
}
static void render_status(void) {
// Render to mode icon
static const char PROGMEM mode_logo[2][4] = {
{0x97,0x98,0x0a,0},
{0xb7,0xb8,0x0a,0} };
oled_write_P(mode_logo[0], false);
oled_write_P(mode_logo[1], 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
oled_write_P(PSTR("Layer: "), false);
switch (biton32(layer_state)) {
case _QWERTY:
#ifndef GAMELAYER_DISABLE
switch (biton32(default_layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case _GAME:
oled_write_P(PSTR("Game\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);
break;
}
#else
oled_write_P(PSTR("Default\n"), false);
#endif
break;
case _LOWER:
oled_write_P(PSTR("Lower\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("Raise\n"), false);
break;
#ifdef TRILAYER_ENABLED
case _ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
#endif
default:
oled_write_P(PSTR("Undefined\n"), false);
}
// Host Keyboard LED Status
uint8_t led_usb_state = host_keyboard_leds();
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
}
void oled_task_user(void) {
if (has_usb()) {
render_status();
} else {
render_logo();
oled_scroll_left();
}
}
#endif

@ -0,0 +1,42 @@
# 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
RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable with RGB Matrix
RGBLIGHT_ANIMATIONS = no # LED animations
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
RGB_MATRIX_KEYPRESSES = yes # Enable reactive per-key effects. Can be very laggy (+1500)
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing
ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder (+90)
OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000)
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
# Do not edit past here
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
SRC += common/knob_v2.c
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
OPT_DEFS += -DRGBLIGHT_FULL_POWER
endif
ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes)
OPT_DEFS += -DRGB_MATRIX_KEYPRESSES
endif
ifeq ($(strip $(LED_MIRRORED)), yes)
OPT_DEFS += -DLED_MIRRORED
endif

@ -81,8 +81,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#else
#define RGBLED_NUM 70
#endif
#define DRIVER_LED_TOTAL RGBLED_NUM
#define RGBLIGHT_RAINBOW_SWIRL_RANGE 1950
@ -112,6 +112,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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

@ -1,6 +1,5 @@
#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
@ -8,8 +7,88 @@ void led_set_kb(uint8_t usb_led) {
}
#endif
void matrix_init_kb(void) {
#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();
};

@ -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}]

@ -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),
};

@ -0,0 +1,3 @@
# KBP V60 like TADA68 layout
This layout resembles the KBParadise V60 FN layer and moves around some keys.

@ -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

@ -3,7 +3,7 @@
"url": "",
"maintainer": "qmk",
"width": 18.25,
"height": 7.25,
"height": 6.25,
"layouts": {
"LAYOUT_all": {
"layout": [

@ -0,0 +1,239 @@
// This is the SOL 6x8 font
#pragma once
#ifdef __AVR__
#include <avr/io.h>
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
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, 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, 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, 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,
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, 0xE0, 0xEC, 0xDF,
0xFC, 0xE0, 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,
0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B,
0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01,
0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08,
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,
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,
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,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x02, 0x06,
0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37,
0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F,
0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F,
0x31, 0x20, 0x21, 0x02, 0x02, 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, 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,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

@ -15,17 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#pragma once
#include "config_common.h"
#endif // CONFIG_H
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 16
#ifndef TAPPING_TERM
#define TAPPING_TERM 100
#endif

@ -1,3 +0,0 @@
RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes

@ -1,3 +0,0 @@
RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes

@ -1,3 +0,0 @@
RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes

@ -1,466 +0,0 @@
/*
Copyright 2017 Danny Nguyen <danny@keeb.io>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* scan matrix
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "split_util.h"
#include "pro_micro.h"
#include "config.h"
#include "timer.h"
#include "backlight.h"
#ifdef USE_I2C
# include "i2c.h"
#else // USE_SERIAL
# include "serial.h"
#endif
#ifndef DEBOUNCING_DELAY
# define DEBOUNCING_DELAY 5
#endif
#if (DEBOUNCING_DELAY > 0)
static uint16_t debouncing_time;
static bool debouncing = false;
#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
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
#define ERROR_DISCONNECT_COUNT 5
#define SERIAL_LED_ADDR 0x00
#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];
#if (DIODE_DIRECTION == COL2ROW)
static void init_cols(void);
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
static void unselect_rows(void);
static void select_row(uint8_t row);
static void unselect_row(uint8_t row);
#elif (DIODE_DIRECTION == ROW2COL)
static void init_rows(void);
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
static void unselect_cols(void);
static void unselect_col(uint8_t col);
static void select_col(uint8_t col);
#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) {
}
inline
uint8_t matrix_rows(void)
{
return MATRIX_ROWS;
}
inline
uint8_t matrix_cols(void)
{
return MATRIX_COLS;
}
void matrix_init(void)
{
debug_enable = true;
debug_matrix = true;
debug_mouse = true;
// initialize row and col
unselect_rows();
init_cols();
TX_RX_LED_INIT;
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
matrix_init_quantum();
}
uint8_t _matrix_scan(void)
{
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
#if (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
# if (DEBOUNCING_DELAY > 0)
bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
if (matrix_changed) {
debouncing = true;
debouncing_time = timer_read();
}
# else
read_cols_on_row(matrix+offset, current_row);
# endif
}
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
# if (DEBOUNCING_DELAY > 0)
bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
if (matrix_changed) {
debouncing = true;
debouncing_time = timer_read();
}
# else
read_rows_on_col(matrix+offset, current_col);
# endif
}
#endif
# if (DEBOUNCING_DELAY > 0)
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
matrix[i+offset] = matrix_debouncing[i+offset];
}
debouncing = false;
}
# endif
return 1;
}
#ifdef USE_I2C
// 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(0x00);
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;
}
#else // USE_SERIAL
int serial_transaction(void) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
if (serial_update_buffers()) {
return 1;
}
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[slaveOffset+i] = serial_slave_buffer[i];
}
#ifdef BACKLIGHT_ENABLE
// Write backlight level for slave to read
serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level();
#endif
return 0;
}
#endif
uint8_t matrix_scan(void)
{
uint8_t ret = _matrix_scan();
#ifdef USE_I2C
if( i2c_transaction() ) {
#else // USE_SERIAL
if( serial_transaction() ) {
#endif
// 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;
#ifdef USE_I2C
for (int i = 0; i < ROWS_PER_HAND; ++i) {
i2c_slave_buffer[i] = matrix[offset+i];
}
#else // USE_SERIAL
for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_slave_buffer[i] = matrix[offset+i];
}
#ifdef BACKLIGHT_ENABLE
// Read backlight level sent from master and update level on slave
backlight_set(serial_master_buffer[SERIAL_LED_ADDR]);
#endif
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix[row] & ((matrix_row_t)1<<col));
}
inline
matrix_row_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
void matrix_print(void)
{
print("\nr/c 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
phex(row); print(": ");
pbin_reverse16(matrix_get_row(row));
print("\n");
}
}
uint8_t matrix_key_count(void)
{
uint8_t count = 0;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
count += bitpop16(matrix[i]);
}
return count;
}
#if (DIODE_DIRECTION == COL2ROW)
static void init_cols(void)
{
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
uint8_t pin = col_pins[x];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
}
}
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
{
// Store last value of row prior to reading
matrix_row_t last_row_value = current_matrix[current_row];
// Clear data in matrix row
current_matrix[current_row] = 0;
// Select row and wait for row selecton to stabilize
select_row(current_row);
wait_us(30);
// For each col...
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
// Select the col pin to read (active low)
uint8_t pin = col_pins[col_index];
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
// Populate the matrix row with the state of the col pin
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
}
// Unselect row
unselect_row(current_row);
return (last_row_value != current_matrix[current_row]);
}
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
}
}
#elif (DIODE_DIRECTION == ROW2COL)
static void init_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
}
}
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
{
bool matrix_changed = false;
// Select col and wait for col selecton to stabilize
select_col(current_col);
wait_us(30);
// For each row...
for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
{
// Store last value of row prior to reading
matrix_row_t last_row_value = current_matrix[row_index];
// Check row pin state
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
{
// Pin LO, set col bit
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
}
else
{
// Pin HI, clear col bit
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
}
// Determine if the matrix changed state
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
{
matrix_changed = true;
}
}
// Unselect col
unselect_col(current_col);
return matrix_changed;
}
static void select_col(uint8_t col)
{
uint8_t pin = col_pins[col];
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
}
static void unselect_col(uint8_t col)
{
uint8_t pin = col_pins[col];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
}
static void unselect_cols(void)
{
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
uint8_t pin = col_pins[x];
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
}
}
#endif

@ -2,19 +2,26 @@
A split ergo keyboard with a few goals in mind:
- Be as thin as possible. Other split KBs (Let's Split, Nyquist, Iris) are 15.2mm thick. The Zen is only 8.0mm thick.
- Be as thin as possible. Other split KBs (Let's Split, Nyquist, Iris) are 15.2mm thick. The Zen rev2 is only 13.2mm thick *including switches and caps* when using Kailh Choc low-profile switches, and 22.1mm using standard MX switches and DSA keycaps.
- Layout designed for gaming. 1.5u pinky keys, ortho alphas, and angled thumb keys. After trying Ortholinear, Atreus62, and Ergodox, this is the best layout for gaming and typing.
- RGB backlighting. 16 WS2812b LEDs shine through the perimeter switches. The SK6812 variant are cheap and easy to solder.
- Per-key RGB lighting. 34 WS2812b LEDs per side make it exceptionally bright
- Price. Using Arduino Pro Micro, SK6812 LEDs, and PCB FR4 for the case, the cost of each half without switches or caps can be reduced to under $20 when purchased at volume.
- Options. The Zen rev2 comes with rotary encoder support, SSD1306 OLED pinout, USB-C or TRRS interconnect, and jumpers to enable compatibility with the [QMK Proton-C](https://olkb.com/parts/qmk-proton-c) and the [Keeb.io Elite-C](https://keeb.io/products/elite-c-usb-c-pro-micro-replacement-arduino-compatible-atmega32u4)
Keyboard Maintainer: [Legonut](https://github.com/Legonut)
Hardware Supported: Zen rev1
Keyboard Maintainer: [Legonut](https://github.com/Legonut)
Hardware Supported: Zen rev1, Zen rev2
Hardware Availability: [RGBKB.net](https://www.rgbkb.net/)
A build guide and more info for this keyboard can be found here: [Zen Build Guide](https://legonut.gitbooks.io/zen-keyboard/content/).
A build guide and more info for this keyboard can be found here: [Zen Build Guide](https://rgbkb.gitbook.io/sol-build-guide/zygomorph-build-guide/untitled).
Make example for this keyboard (after setting up your build environment):
make zen/rev1:default
make zen/rev2:default
To build for a Proton-C:
make zen/rev2:default CTPC=yes
**Note:** The Proton-C does not have split keyboard, or encoder support. Also OLED driver support is untested. Will update as status changes.
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.

@ -15,15 +15,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef REV1_CONFIG_H
#define REV1_CONFIG_H
#include QMK_KEYBOARD_CONFIG_H
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0xCEEB
#define PRODUCT_ID 0x1256
#define DEVICE_VER 0x0200
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060
#define DEVICE_VER 0x0001
#define MANUFACTURER Legonut
#define PRODUCT Project Zen
#define DESCRIPTION Split gaming keyboard
@ -40,12 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
#define SOFT_SERIAL_PIN D0
/* 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
@ -54,9 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#define BACKLIGHT_PIN F4
#define BACKLIGHT_LEVELS 5
/* ws2812 RGB LED */
#define RGB_DI_PIN D1
@ -79,5 +72,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif

@ -1,5 +1,4 @@
RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = no
NKRO_ENABLE = yes
KEY_LOCK_ENABLE = yes
TAP_DANCE_ENABLE = yes

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#pragma once
#include "config_common.h"
@ -37,5 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

@ -1,8 +1,8 @@
#include QMK_KEYBOARD_H
#include "kageurufu.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#include "lufa.h"
#include "split_util.h"
#endif
extern keymap_config_t keymap_config;

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#pragma once
#include "config_common.h"
@ -31,5 +30,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

@ -1,5 +1,4 @@
#ifndef REV1_H
#define REV1_H
#pragma once
#include "zen.h"
@ -36,5 +35,3 @@
{ k80, k81, k82, k83, k84, k85, KC_NO }, \
{ k90, k91, k92, k93, k94, k95, k96 } \
}
#endif

@ -1,2 +0,0 @@
RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes

@ -0,0 +1,98 @@
/*
Copyright 2017 Danny Nguyen <danny@hexwire.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3061
#define DEVICE_VER 0x0002
#define MANUFACTURER Legonut
#define PRODUCT "Project Zen"
#define DESCRIPTION "Split gaming keyboard"
/* key matrix size */
// Rows are doubled-up
// wiring of each half
#ifdef CONVERT_TO_PROTON_C
#define MATRIX_ROWS 5
#define MATRIX_COLS 7
#else
#define MATRIX_ROWS 10
#define MATRIX_COLS 7
#endif
// Proton-C does pin conversion
#define MATRIX_ROW_PINS { C6, E6, B5, D7, B4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B3, B1, B2 }
#define NUMBER_OF_ENCODERS 1
#define ENCODERS_PAD_A { D4 }
#define ENCODERS_PAD_B { D2 }
#define RGB_DI_PIN B6
#define SOFT_SERIAL_PIN D3
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* ws2812 RGB LED */
#define RGBLED_NUM 34 // Number of LEDs
// If using 90 Degree rotation, increase block cout
#ifdef OLED_ROTATE90
#define OLED_DISPLAY_CUSTOM
#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) // 8 (compile time mathed)
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
#define OLED_SOURCE_MAP { 0, 8, 16, 24 }
#define OLED_TARGET_MAP { 24, 16, 8, 0 }
#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

@ -0,0 +1,19 @@
#include QMK_KEYBOARD_H
#include <stdio.h>
// extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { { KC_TRNS } } };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static char buf[10] = " ";
if (record->event.pressed) {
snprintf(buf, 10, "C%dR%d ", record->event.key.col, record->event.key.row);
send_string(buf);
}
return false;
return true;
}

@ -0,0 +1,117 @@
#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 _QWERTY 0
#define _NAV 2
enum custom_keycodes {
QWERTY = SAFE_RANGE,
NAV,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------. .-----------------------------------------.
* | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |CAPS(NAV)|A | S | D | F | G | | H | J | K | L | ; | " |
* |------+------+------+------+------+------+------..------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B |RGBPrv||RGBNxt| N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
* | Ctrl | GUI | Alt |RGBTOG| NAV |Space |Delete||Enter |Space | NAV | - | = | PGUP | PGDN |
* `----------------------------------+-------------''------------------------------------------------'
* |Space |Delete||Enter |Space |
* '-------------''-------------'
*/
[_QWERTY] = LAYOUT( \
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, \
LT(_NAV, KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, RGB_RMOD,RGB_MOD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_NAV), KC_SPC, KC_DEL, KC_ENT, KC_SPACE, MO(_NAV), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN, \
KC_SPC, KC_DEL, KC_ENT, KC_SPACE \
),
/* NAV
* ,-----------------------------------------. .-----------------------------------------.
* | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |CAPS(NAV)|A | S | D | F | G | | H | J | K | L | ; | " |
* |------+------+------+------+------+------+------..------+------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | || | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
* | Ctrl | GUI | Alt |RGBTOG| NAV |Space |Delete||Enter |Space | NAV | - | = | PGUP | PGDN |
* `----------------------------------+-------------''------------------------------------------------'
* |Space |Delete||Enter |Space |
* '-------------''-------------'
*/
[_NAV] = 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, \
_______, RGB_SAI, RGB_VAI, RGB_SAD, RESET, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, \
_______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, \
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, \
KC_LCTL, KC_LGUI, KC_LALT, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD, \
_______, _______, _______, _______
),
};
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
} else if (index == 1) { /* Second encoder from slave */
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(1UL<<_QWERTY);
}
return false;
break;
//case COLEMAK:
//if (record->event.pressed) {
//set_single_persistent_default_layer(1UL<<_COLEMAK);
//}
//return false;
//break;
}
return true;
}
#if OLED_DRIVER_ENABLE
const char* layer_name_user(uint32_t layer) {
switch (layer) {
case _QWERTY:
return PSTR("QWRTY");
case _NAV:
return PSTR("NAV\n");
default:
return PSTR("UNDEF");
}
}
#endif

@ -0,0 +1,66 @@
#include "rev2.h"
#ifdef OLED_DRIVER_ENABLE
#include "split_util.h"
#include "oled_driver.h"
__attribute__((weak))
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);
}
__attribute__((weak))
const char* layer_name_user(uint32_t layer) {
switch (layer) {
default:
return PSTR("UNDEF\n");
}
}
__attribute__((weak))
void render_status(void) {
// Setup for 90 degree rendering because it's awesome!
// It can house 16 lines of text, with 5 letters each line
// Render to mode icon
static const char PROGMEM mode_logo[2][4] = {
{0x97,0x98,0x0a,0},
{0xb7,0xb8,0x0a,0} };
oled_write_P(mode_logo[0], false); // Line 1
oled_write_P(mode_logo[1], false); // Line 2
// 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
oled_set_cursor(0, 3); // Line 3
oled_write_P(PSTR("Layer"), false); // Line 4
oled_write_P(layer_name_user(biton32(layer_state)), false);
// Host Keyboard LED Status
uint8_t led_usb_state = host_keyboard_leds();
oled_set_cursor(0, OLED_MAX_LINES - 4); // Line 13
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLK") : PSTR(" "), false); // Line 14
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLK") : PSTR(" "), false); // Line 15
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); // Line 16
}
#ifdef OLED_ROTATE90
bool oled_init_user(bool flip180) {
return true;
}
#endif
__attribute__((weak))
void oled_task_user(void) {
if (is_keyboard_master()) {
render_status();
} else {
render_logo();
oled_scroll_left();
}
}
#endif

@ -0,0 +1,56 @@
#pragma once
#include "zen.h"
//void promicro_bootloader_jmp(bool program);
#include "quantum.h"
#ifdef USE_I2C
#include <stddef.h>
#ifdef __AVR__
#include <avr/io.h>
#include <avr/interrupt.h>
#endif
#endif
//void promicro_bootloader_jmp(bool program);
#ifdef CONVERT_TO_PROTON_C
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \
k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \
k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \
k30, k31, k32, k33, k34, k35, k16, k66, k85, k84, k83, k82, k81, k80, \
k40, k41, k42, k43, k44, k36, k26, k76, k86, k94, k93, k92, k91, k90, \
k45, k46, k96, k95 \
) \
{ \
{ k00, k01, k02, k03, k04, k05, KC_NO }, \
{ k10, k11, k12, k13, k14, k15, k16 }, \
{ k20, k21, k22, k23, k24, k25, k26 }, \
{ k30, k31, k32, k33, k34, k35, k36 }, \
{ k40, k41, k42, k43, k44, k45, k46 } \
}
#else
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \
k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \
k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \
k30, k31, k32, k33, k34, k35, k16, k66, k85, k84, k83, k82, k81, k80, \
k40, k41, k42, k43, k44, k36, k26, k76, k86, k94, k93, k92, k91, k90, \
k45, k46, k96, k95 \
) \
{ \
{ k00, k01, k02, k03, k04, k05, KC_NO }, \
{ k10, k11, k12, k13, k14, k15, k16 }, \
{ k20, k21, k22, k23, k24, k25, k26 }, \
{ k30, k31, k32, k33, k34, k35, k36 }, \
{ k40, k41, k42, k43, k44, k45, k46 }, \
{ k50, k51, k52, k53, k54, k55, KC_NO }, \
{ k60, k61, k62, k63, k64, k65, k66 }, \
{ k70, k71, k72, k73, k74, k75, k76 }, \
{ k80, k81, k82, k83, k84, k85, k86 }, \
{ k90, k91, k92, k93, k94, k95, k96 } \
}
#endif

@ -0,0 +1,14 @@
ENCODER_ENABLE = yes
OLED_DRIVER_ENABLE = no
OLED_ROTATE90 = yes
# Setup so that OLED and 90 degree rotation can be turned on/off easily
# with "OLED_DRIVER_ENABLE = yes" or "OLED_ROTATE90 = no" in user's rules.mk file
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
# Custom local font file
OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
OPT_DEFS += -DOLED_ROTATE90
endif
endif

@ -1,51 +1,26 @@
SRC += matrix.c \
split_util.c \
serial.c
# MCU name
#MCU = at90usb1287
# Pro Micro or Elite-C
# Automagically converted to Proton-C
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 = dfu
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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
ifeq ($(strip $(CTPC)), yes)
CONVERT_TO_PROTON_C=yes
endif
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
SPLIT_KEYBOARD = no # currently unsupported on ARM
RGBLIGHT_ENABLE = no # currently unsupported on ARM
EXTRAFLAGS += -DUSE_PROTON_C
else
# Currently moved to Pro Micro only section because of lack of Proton-C support
SPLIT_KEYBOARD = yes
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
endif
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
@ -57,17 +32,11 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = 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.
SUBPROJECT_rev1 = yes
USE_I2C = 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
CUSTOM_MATRIX = yes
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
DEFAULT_FOLDER = zen/rev1
DEFAULT_FOLDER = zen/rev2

@ -1,228 +0,0 @@
/*
* WARNING: be careful changing this code, it is very timing dependent
*/
#ifndef F_CPU
#define F_CPU 16000000
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdbool.h>
#include "serial.h"
#ifndef USE_I2C
// Serial pulse period in microseconds. Its probably a bad idea to lower this
// value.
#define SERIAL_DELAY 24
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
#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
uint8_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
uint8_t serial_read_byte(void) {
uint8_t byte = 0;
serial_input();
for ( uint8_t i = 0; i < 8; ++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(uint8_t data) {
uint8_t b = 8;
serial_output();
while( b-- ) {
if(data & (1 << b)) {
serial_high();
} else {
serial_low();
}
serial_delay();
}
}
// interrupt handle to be used by the slave device
ISR(SERIAL_PIN_INTERRUPT) {
sync_send();
uint8_t checksum = 0;
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
serial_write_byte(serial_slave_buffer[i]);
sync_send();
checksum += 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);
uint8_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 += serial_master_buffer[i];
}
uint8_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();
uint8_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 += serial_slave_buffer[i];
}
uint8_t checksum_received = serial_read_byte();
sync_recv();
if (checksum_computed != checksum_received) {
sei();
return 1;
}
uint8_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 += 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

@ -1,26 +0,0 @@
#ifndef MY_SERIAL_H
#define MY_SERIAL_H
#include "config.h"
#include <stdbool.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 uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
extern volatile uint8_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

@ -1,41 +0,0 @@
#include <stdint.h>
#include <stdbool.h>
#include "split_util.h"
#include "progmem.h"
#include "print.h"
#include "rgblight.h"
#ifdef USE_I2C
# include "i2c.h"
#else // USE_SERIAL
# include "serial.h"
#endif
rgblight_config_t rgblight_config;
void rgblight_slave_update(void) {
//rgblight_effect_christmas();
}
void rgblight_set(void) {
if (rgblight_config.enable) {
#ifdef RGBW
ws2812_setleds_rgbw(led, RGBLED_NUM);
#else
ws2812_setleds(led, RGBLED_NUM);
#endif
} else {
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
led[i].r = 0;
led[i].g = 0;
led[i].b = 0;
}
#ifdef RGBW
ws2812_setleds_rgbw(led, RGBLED_NUM);
#else
ws2812_setleds(led, RGBLED_NUM);
#endif
}
}

@ -1,6 +0,0 @@
#ifndef SPLIT_RGB_H
#define SPLIT_RGB_H
void rgblight_slave_update(void);
#endif

@ -1,86 +0,0 @@
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
#include "config.h"
#include "timer.h"
#ifdef USE_I2C
# include "i2c.h"
#else
# include "serial.h"
#endif
volatile bool isLeftHand = true;
static void setup_handedness(void) {
#ifdef EE_HANDS
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
#else
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
isLeftHand = !has_usb();
#else
isLeftHand = has_usb();
#endif
#endif
}
static void keyboard_master_setup(void) {
#ifdef USE_I2C
i2c_master_init();
#ifdef SSD1306OLED
matrix_master_OLED_init ();
#endif
#else
serial_master_init();
#endif
}
static void keyboard_slave_setup(void) {
timer_init();
#ifdef USE_I2C
i2c_slave_init(SLAVE_I2C_ADDRESS);
#else
serial_slave_init();
#endif
}
bool has_usb(void) {
USBCON |= (1 << OTGPADE); //enables VBUS pad
_delay_us(5);
return (USBSTA & (1<<VBUS)); //checks state of VBUS
}
void split_keyboard_setup(void) {
setup_handedness();
if (has_usb()) {
keyboard_master_setup();
} else {
keyboard_slave_setup();
}
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();
}
}

@ -1,20 +0,0 @@
#ifndef SPLIT_KEYBOARD_UTIL_H
#define SPLIT_KEYBOARD_UTIL_H
#include <stdbool.h>
#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

@ -1,7 +1,8 @@
#ifndef ZEN_H
#define ZEN_H
#include "rev1.h"
#include "quantum.h"
#pragma once
#if KEYBOARD_zen_rev1
#include "rev1.h"
#elif KEYBOARD_zen_rev2
#include "rev2.h"
#endif
#include "quantum.h"

@ -24,23 +24,21 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
#include <stdlib.h>
#ifndef DEBOUNCE
#define DEBOUNCE 5
# define DEBOUNCE 5
#endif
#if (MATRIX_COLS <= 8)
# define ROW_SHIFTER ((uint8_t)1)
# define ROW_SHIFTER ((uint8_t)1)
#elif (MATRIX_COLS <= 16)
# define ROW_SHIFTER ((uint16_t)1)
# define ROW_SHIFTER ((uint16_t)1)
#elif (MATRIX_COLS <= 32)
# define ROW_SHIFTER ((uint32_t)1)
# define ROW_SHIFTER ((uint32_t)1)
#endif
#define debounce_counter_t uint8_t
static debounce_counter_t *debounce_counters;
static bool counters_need_update;
#define DEBOUNCE_ELAPSED 251
#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
@ -48,39 +46,39 @@ static debounce_counter_t *debounce_counters;
void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
//we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows)
{
debounce_counters = (debounce_counter_t*)malloc(num_rows*MATRIX_COLS * sizeof(debounce_counter_t));
int i = 0;
for (uint8_t r = 0; r < num_rows; r++)
{
for (uint8_t c = 0; c < MATRIX_COLS; c++)
{
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
debounce_counters = (debounce_counter_t *)malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t));
int i = 0;
for (uint8_t r = 0; r < num_rows; r++) {
for (uint8_t c = 0; c < MATRIX_COLS; c++) {
debounce_counters[i++] = DEBOUNCE_ELAPSED;
}
}
}
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed)
{
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
uint8_t current_time = timer_read() % MAX_DEBOUNCE;
update_debounce_counters(num_rows, current_time);
transfer_matrix_values(raw, cooked, num_rows, current_time);
if (counters_need_update) {
update_debounce_counters(num_rows, current_time);
}
if (changed) {
transfer_matrix_values(raw, cooked, num_rows, current_time);
}
}
//If the current time is > debounce counter, set the counter to enable input.
void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
{
// If the current time is > debounce counter, set the counter to enable input.
void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
counters_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++)
{
for (uint8_t col = 0; col < MATRIX_COLS; col++)
{
if (*debounce_pointer != DEBOUNCE_ELAPSED)
{
for (uint8_t row = 0; row < num_rows; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
*debounce_pointer = DEBOUNCE_ELAPSED;
} else {
counters_need_update = true;
}
}
debounce_pointer++;
@ -89,33 +87,22 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
}
// upload from raw_matrix to final matrix;
void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time)
{
void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++)
{
matrix_row_t existing_row = cooked[row];
matrix_row_t raw_row = raw[row];
for (uint8_t col = 0; col < MATRIX_COLS; col++)
{
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t delta = raw[row] ^ cooked[row];
matrix_row_t existing_row = cooked[row];
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
matrix_row_t col_mask = (ROW_SHIFTER << col);
bool final_value = raw_row & col_mask;
bool existing_value = existing_row & col_mask;
if (*debounce_pointer == DEBOUNCE_ELAPSED &&
(existing_value != final_value))
{
*debounce_pointer = current_time;
existing_row ^= col_mask; //flip the bit.
if ((delta & col_mask) && *debounce_pointer == DEBOUNCE_ELAPSED) {
*debounce_pointer = current_time;
counters_need_update = true;
existing_row ^= col_mask; // flip the bit.
}
debounce_pointer++;
}
cooked[row] = existing_row;
}
}
bool debounce_active(void)
{
return true;
}
}
bool debounce_active(void) { return true; }

@ -24,13 +24,13 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
#include <stdlib.h>
#ifndef DEBOUNCE
#define DEBOUNCE 5
# define DEBOUNCE 5
#endif
#define debounce_counter_t uint8_t
static debounce_counter_t *debounce_counters;
static bool counters_need_update;
#define DEBOUNCE_ELAPSED 251
#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
@ -38,33 +38,35 @@ static debounce_counter_t *debounce_counters;
void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
//we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows)
{
debounce_counters = (debounce_counter_t*)malloc(num_rows*sizeof(debounce_counter_t));
for (uint8_t r = 0; r < num_rows; r++)
{
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
debounce_counters = (debounce_counter_t *)malloc(num_rows * sizeof(debounce_counter_t));
for (uint8_t r = 0; r < num_rows; r++) {
debounce_counters[r] = DEBOUNCE_ELAPSED;
}
}
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed)
{
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
uint8_t current_time = timer_read() % MAX_DEBOUNCE;
update_debounce_counters(num_rows, current_time);
transfer_matrix_values(raw, cooked, num_rows, current_time);
if (counters_need_update) {
update_debounce_counters(num_rows, current_time);
}
if (changed) {
transfer_matrix_values(raw, cooked, num_rows, current_time);
}
}
//If the current time is > debounce counter, set the counter to enable input.
void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
{
// If the current time is > debounce counter, set the counter to enable input.
void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
counters_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++)
{
if (*debounce_pointer != DEBOUNCE_ELAPSED)
{
for (uint8_t row = 0; row < num_rows; row++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
*debounce_pointer = DEBOUNCE_ELAPSED;
} else {
counters_need_update = true;
}
}
debounce_pointer++;
@ -72,29 +74,21 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
}
// upload from raw_matrix to final matrix;
void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time)
{
void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++)
{
matrix_row_t existing_row = cooked[row];
matrix_row_t raw_row = raw[row];
//determine new value basd on debounce pointer + raw value
if (*debounce_pointer == DEBOUNCE_ELAPSED &&
(existing_row != raw_row))
{
*debounce_pointer = current_time;
existing_row = raw_row;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t existing_row = cooked[row];
matrix_row_t raw_row = raw[row];
// determine new value basd on debounce pointer + raw value
if (*debounce_pointer == DEBOUNCE_ELAPSED && (existing_row != raw_row)) {
*debounce_pointer = current_time;
cooked[row] = raw_row;
counters_need_update = true;
}
cooked[row] = existing_row;
debounce_pointer++;
}
}
bool debounce_active(void)
{
return true;
debounce_pointer++;
}
}
bool debounce_active(void) { return true; }

@ -126,13 +126,13 @@ static bool process_single_combo(combo_t *combo, uint16_t keycode,
bool process_combo(uint16_t keycode, keyrecord_t *record) {
bool is_combo_key = false;
drop_buffer = false;
bool no_combo_keys_pressed = false;
bool no_combo_keys_pressed = true;
for (current_combo_index = 0; current_combo_index < COMBO_COUNT;
++current_combo_index) {
combo_t *combo = &key_combos[current_combo_index];
is_combo_key |= process_single_combo(combo, keycode, record);
no_combo_keys_pressed |= NO_COMBO_KEYS_ARE_DOWN;
no_combo_keys_pressed = no_combo_keys_pressed && NO_COMBO_KEYS_ARE_DOWN;
}
if (drop_buffer) {

@ -850,6 +850,26 @@ const bool ascii_to_shift_lut[0x80] PROGMEM = {
0, 0, 0, 1, 1, 1, 1, 0
};
__attribute__ ((weak))
const bool ascii_to_altgr_lut[0x80] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
__attribute__ ((weak))
const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
@ -931,16 +951,22 @@ void send_string_with_delay_P(const char *str, uint8_t interval) {
}
void send_char(char ascii_code) {
uint8_t keycode;
keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
if (pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code])) {
register_code(KC_LSFT);
register_code(keycode);
unregister_code(keycode);
unregister_code(KC_LSFT);
} else {
register_code(keycode);
unregister_code(keycode);
uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]);
bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]);
bool is_altgred = pgm_read_byte(&ascii_to_altgr_lut[(uint8_t)ascii_code]);
if (is_shifted) {
register_code(KC_LSFT);
}
if (is_altgred) {
register_code(KC_RALT);
}
tap_code(keycode);
if (is_altgred) {
unregister_code(KC_RALT);
}
if (is_shifted) {
unregister_code(KC_LSFT);
}
}

@ -206,6 +206,7 @@ extern uint32_t default_layer_state;
#define SEND_STRING(str) send_string_P(PSTR(str))
extern const bool ascii_to_shift_lut[0x80];
extern const bool ascii_to_altgr_lut[0x80];
extern const uint8_t ascii_to_keycode_lut[0x80];
void send_string(const char *str);
void send_string_with_delay(const char *str, uint8_t interval);

@ -28,9 +28,11 @@
#ifdef IS31FL3731
#include "is31fl3731.h"
#elif defined (IS31FL3733)
#include "is31fl3733.h"
#include "is31fl3733.h"
#elif defined (IS31FL3737)
#include "is31fl3737.h"
#include "is31fl3737.h"
#elif defined (WS2812)
#include "ws2812.h"
#endif
#ifndef RGB_MATRIX_LED_FLUSH_LIMIT

@ -97,4 +97,25 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
};
#endif
#elif defined(WS2812)
extern LED_TYPE led[RGBLED_NUM];
static void flush( void )
{
// Assumes use of RGB_DI_PIN
ws2812_setleds(led, RGBLED_NUM);
}
static void init( void )
{
}
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
.flush = flush,
.set_color = ws2812_setled,
.set_color_all = ws2812_setled_all,
};
#endif

@ -63,7 +63,11 @@ const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
rgblight_config_t rgblight_config;
bool is_rgblight_initialized = false;
#ifndef LED_ARRAY
LED_TYPE led[RGBLED_NUM];
#define LED_ARRAY led
#endif
bool rgblight_timer_enabled = false;
static uint8_t clipping_start_pos = 0;

@ -109,9 +109,9 @@ UDC_DESC_STORAGE udi_hid_kbd_report_desc_t udi_hid_kbd_report_desc = {
0x81, 0x02, // Input (Data, Variable, Absolute)
0x81, 0x01, // Input (Constant)
0x19, 0x00, // Usage Minimum (0)
0x29, 0x65, // Usage Maximum (101)
0x29, 0xFF, // Usage Maximum (255)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x65, // Logical Maximum (101)
0x25, 0xFF, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x06, // Report Count (6)
0x81, 0x00, // Input (Data, Array)

@ -11,5 +11,5 @@ MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
COMMAND_ENABLE = yes
CONSOLE_ENABLE = yes
RGBLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = no
RGBLIGHT_ANIMATIONS = yes

@ -0,0 +1,13 @@
#pragma once
#ifndef TAPPING_FORCE_HOLD
#define TAPPING_FORCE_HOLD
#endif // TAPPING_FORCE_HOLD
#undef TAPPING_TERM
#define TAPPING_TERM 175
#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC
#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC
#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS
#define RCPO_KEYS KC_RCTL, KC_TRNS, KC_EQL

@ -0,0 +1,119 @@
#pragma once
/* 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 | | N | M | , | . | / | Sft] |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Ctrl | Win | ADJ | FN | Alt | Space| | Space| Left | Up | Down | Right| Ctrl |
* `-----------------------------------------' `-----------------------------------------'
*/
#define _________________QWERTY_L1_________________ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5
#define _________________QWERTY_L2_________________ TD_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
#define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G
#define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC
#define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC
#define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
#define _________________QWERTY_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT
#define _________________QWERTY_R4_________________ KC_N, KC_M, TD_COMM, KC_DOT, KC_SLASH, KC_RSPC
#define _________________QWERTY_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCPC
#define ___________________GAME_L1_________________ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5
#define ___________________GAME_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
#define ___________________GAME_L3_________________ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G
#define ___________________GAME_L4_________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B
#define ___________________GAME_L5_________________ KC_LCTL, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC
#define ___________________GAME_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC
#define ___________________GAME_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
#define ___________________GAME_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT
#define ___________________GAME_R4_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_RSFT
#define ___________________GAME_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCTL
/* RAISE Layout
* ,-----------------------------------------. ,-----------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | PGDN | UP | PGUP | |QWERTY| | | INS | HOME | PGUP | PRINT| |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | LEFT | DOWN | RIGHT| | GAME | | | DEL | END | PGDN |SCRLCK| |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | PREV | VOL- | VOL+ | NEXT | PLAY |
* `-----------------------------------------' `-----------------------------------------'
*/
#define __________________RAISE_L1_________________ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define __________________RAISE_L2_________________ _______, KC_PGDN, KC_UP, KC_PGUP, _______, QWERTY
#define __________________RAISE_L3_________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, GAME
#define __________________RAISE_L4_________________ _______, _______, _______, _______, _______, _______
#define __________________RAISE_L5_________________ _______, _______, _______, _______, _______, _______
#define __________________RAISE_R1_________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11
#define __________________RAISE_R2_________________ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, _______
#define __________________RAISE_R3_________________ _______, KC_DEL, KC_END, KC_PGDN, KC_SLCK, _______
#define __________________RAISE_R4_________________ _______, _______, _______, _______, _______, _______
#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_MPRV, KC_VOLD, KC_MNXT, KC_MPLY
/* LOWER Layout
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | SPDI | SAI | VAI | HUI | RESET| | | | | 7 | 8 | 9 | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | SPDD | SAD | VAD | HUD |RGBRST| | | | | 4 | 5 | 6 | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | 1 | 2 | 3 | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | 0 | . | |
* `-----------------------------------------' `-----------------------------------------'
*/
#define __________________LOWER_L1_________________ _______, RGB_RMOD, RGB_MOD, _______, _______, _______
#define __________________LOWER_L2_________________ RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RESET, _______
#define __________________LOWER_L3_________________ RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, _______
#define __________________LOWER_L4_________________ _______, _______, _______, _______, _______, _______
#define __________________LOWER_L5_________________ _______, _______, _______, _______, _______, _______
#define __________________LOWER_R1_________________ _______, _______, _______, _______, _______, KC_DEL
#define __________________LOWER_R2_________________ _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, _______
#define __________________LOWER_R3_________________ _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, _______
#define __________________LOWER_R4_________________ _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, _______
#define __________________LOWER_R5_________________ _______, _______, _______, KC_KP_0, KC_PDOT, _______
/* ADJUST Layout
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | RESET| DEBUG| | | | | |TERM_ON|TERM_OFF| | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | |MusMod|Aud on|AudOff|AGnorm| |AGswap|ClkUp |ClkDwn| | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn| |MidOff|ClkOn |ClkOff| | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* `-----------------------------------------' `-----------------------------------------'
*/
#define _________________ADJUST_L1_________________ _______, _______, _______, _______, _______, _______
#define _________________ADJUST_L2_________________ _______, RESET, DEBUG, _______, _______, _______
#define _________________ADJUST_L3_________________ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM
#define _________________ADJUST_L4_________________ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON
#define _________________ADJUST_L5_________________ _______, _______, _______, _______, _______, _______
#define _________________ADJUST_R1_________________ _______, _______, _______, _______, _______, _______
#define _________________ADJUST_R2_________________ _______, TERM_ON, TERM_OFF, _______, _______, _______
#define _________________ADJUST_R3_________________ AG_SWAP, CK_UP, CK_DOWN, _______, _______, _______
#define _________________ADJUST_R4_________________ MI_OFF, CK_ON, CK_OFF, _______, _______, _______
#define _________________ADJUST_R5_________________ _______, _______, _______, _______, _______, _______

@ -0,0 +1,85 @@
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[COMM_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUOT),
[BACKSPACE] = ACTION_TAP_DANCE_DOUBLE (KC_BSPACE, LCTL(KC_BSPACE)),
[TAP_TAB] = ACTION_TAP_DANCE_DOUBLE (KC_TAB, LSFT(KC_TAB)),
[CTRL_MINUS] = ACTION_TAP_DANCE_DOUBLE (KC_LCTL, KC_MINS),
[CTRL_PLUS] = ACTION_TAP_DANCE_DOUBLE (KC_RCTL, KC_EQL)
};
#endif
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 GAME:
#ifndef GAMELAYER_DISABLE
if (record->event.pressed) {
set_single_persistent_default_layer(_GAME);
}
#endif
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
#ifdef TRILAYER_ENABLED
update_tri_layer(_LOWER, _RAISE, _ADJUST);
#endif
} else {
layer_off(_LOWER);
#ifdef TRILAYER_ENABLED
update_tri_layer(_LOWER, _RAISE, _ADJUST);
#endif
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
#ifdef TRILAYER_ENABLED
update_tri_layer(_LOWER, _RAISE, _ADJUST);
#endif
} else {
layer_off(_RAISE);
#ifdef TRILAYER_ENABLED
update_tri_layer(_LOWER, _RAISE, _ADJUST);
#endif
}
return false;
break;
case RGBRST:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
}
#endif
return false;
break;
}
return process_record_keymap(keycode, record) &&
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
process_record_rgb(keycode, record) &&
#endif // RGBLIGHT_ENABLE;
true;
}
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__ ((weak))
bool process_record_rgb(uint16_t keycode, keyrecord_t *record) {
return true;
}

@ -0,0 +1,49 @@
#pragma once
#include "quantum.h"
#define RIS_ESC LT(_RAISE, KC_ESC)
#define RIS_CAPS LT(_RAISE, KC_CAPS)
#ifdef TAP_DANCE_ENABLE
#include "process_tap_dance.h"
//Tap Dance Declarations
enum {
COMM_QUOT = 0,
BACKSPACE,
TAP_TAB,
CTRL_MINUS,
CTRL_PLUS
};
#define TD_COMM TD(COMM_QUOT)
#define TD_BSPC TD(BACKSPACE)
#define TD_TAB TD(TAP_TAB)
#define TD_LCTL TD(CTRL_MINUS)
#define TD_RCTL TD(CTRL_PLUS)
#else
#define TD_COMM KC_COMM
#define TD_BSPC KC_BSPACE
#define TD_TAB KC_TAB
#define TD_LCTL KC_LCTL
#define TD_RCTL KC_RCTL
#endif
enum layer_number {
_QWERTY = 0,
_GAME,
_LOWER,
_RAISE,
_ADJUST
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
GAME,
LOWER,
RAISE,
RGBRST
};
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
bool process_record_rgb(uint16_t keycode, keyrecord_t *record);

@ -0,0 +1,13 @@
SRC += xulkal.c \
process_records.c
# Some usual defaults
MOUSEKEY_ENABLE = no # Mouse keys (+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control (+450)
TAP_DANCE_ENABLE = yes # Enable the tap dance feature. (+1100)
ifneq ($(strip $(DISABLE_LTO)), yes)
EXTRAFLAGS += -flto
OPT_DEFS += -DNO_ACTION_MACRO
OPT_DEFS += -DNO_ACTION_FUNCTION
endif

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

@ -0,0 +1,4 @@
#pragma once
#include "process_records.h"
#include "layouts.h"

@ -19,18 +19,19 @@ from __future__ import print_function
import os
import sys
import time
import argparse
import usb
def checkForKeyboardInNormalMode():
def check_keyboard_normal_mode(vendor, product):
"""Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
return usb.core.find(idVendor=vendor, idProduct=product)
def checkForKeyboardInBootloaderMode():
def check_keyboard_bootloader_mode():
"""Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
def flashKeyboard(firmware_file):
def flash_keyboard(firmware_file):
"""Calls bootloadHID to flash the given file to the device."""
print('Flashing firmware to device ...')
if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
@ -38,7 +39,7 @@ def flashKeyboard(firmware_file):
else:
print('\nbootloadHID returned an error.')
def printDeviceInfo(dev):
def print_device_info(dev):
"""Prints all infos for a given USB device"""
print('Device Information:')
print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
@ -47,15 +48,15 @@ def printDeviceInfo(dev):
print('Serial: %s' % (dev.iSerialNumber))
print('Product: %s' % (dev.iProduct), end='\n\n')
def sendDeviceToBootloaderMode(dev):
def send_device_to_bootloader_mode(dev):
"""Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
try:
dev.set_configuration()
request_type = usb.util.build_request_type(
usb.util.CTRL_OUT,
usb.util.CTRL_TYPE_CLASS,
usb.util.CTRL_RECIPIENT_DEVICE)
usb.util.CTRL_OUT,
usb.util.CTRL_TYPE_CLASS,
usb.util.CTRL_RECIPIENT_DEVICE)
USBRQ_HID_SET_REPORT = 0x09
HID_REPORT_OPTION = 0x0301
@ -65,16 +66,21 @@ def sendDeviceToBootloaderMode(dev):
# for some reason I keep getting USBError, but it works!
pass
def auto_int(value):
"""Helper for argparse to enable auto base detection"""
return int(value, 0)
if len(sys.argv) < 2:
print('Usage: %s <firmware.hex>' % sys.argv[0])
sys.exit(1)
parser = argparse.ArgumentParser(description='Flash bootloadHID device')
parser.add_argument('--vendor', type=auto_int, default=0x20A0, help='Non bootloader idVendor to search for (default: 0x%(default)04x)')
parser.add_argument('--product', type=auto_int, default=0x422D, help='Non bootloader idProduct to search for (default: 0x%(default)04x)')
parser.add_argument('firmware_hex', type=argparse.FileType('r'), help='Firmware hex file to flash')
args = parser.parse_args()
kb = checkForKeyboardInNormalMode()
kb = check_keyboard_normal_mode(args.vendor, args.product)
if kb is not None:
print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='')
sendDeviceToBootloaderMode(kb)
send_device_to_bootloader_mode(kb)
print(' done.')
print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
@ -84,9 +90,9 @@ found = False
for attempt in range(1, attempts + 1):
print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
if checkForKeyboardInBootloaderMode():
if check_keyboard_bootloader_mode():
print('Found', end='\n\n')
flashKeyboard(sys.argv[1])
flash_keyboard(args.firmware_hex.name)
found = True
break
else:
@ -102,4 +108,3 @@ for attempt in range(1, attempts + 1):
if not found:
print("Couldn't find a flashable keyboard. Aborting.")
sys.exit(2)

@ -17,16 +17,18 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
else
NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
# is this branch master or a "non docs, non keyboards" change
if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then
echo "Making default keymaps for all keyboards"
eval $MAKE_ALL
: $((exit_code = $exit_code + $?))
else
MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sort -u)
# keyboards project format
# /keyboards/board1/rev/keymaps/
# /keyboards/board2/keymaps/
# ensure we strip everything off after and including the keymaps folder to get board and/or revision
MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sed 's^/keymaps/.*^^' | sort -u)
for KB in $MKB ; do
if [[ $KB == *keymaps* ]]; then
continue
fi
KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l)
if [[ $KEYMAP_ONLY -gt 0 ]]; then
echo "Making all keymaps for $KB"

Loading…
Cancel
Save