Merge pull request #17 from qmk/master

Merged from QMK project
This commit is contained in:
Damien 2017-01-26 09:05:55 +01:00 • committed by GitHub
commit b7b94bfb13
61 changed files with 2705 additions and 574 deletions

View file

@ -2,7 +2,6 @@ os: linux
dist: trusty
sudo: required
language: c
compiler: avr-gcc
branches:
except:
- /^.*-automated-build$/
@ -12,13 +11,18 @@ env:
matrix:
- TARGET=all-keyboards AUTOGEN=true
- TARGET=test AUTOGEN=false
before_install:
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
install:
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
before_script:
- avr-gcc --version
script:
- make $TARGET AUTOGEN=$AUTOGEN
addons:
apt:
packages:
- avr-libc
- gcc-avr
- dfu-programmer
- pandoc
- gcc-arm-none-eabi

View file

@ -221,7 +221,11 @@ OPT_DEFS += $(TMK_COMMON_DEFS)
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
ifeq ($(PLATFORM),AVR)
ifeq ($(strip $(PROTOCOL)), VUSB)
include $(TMK_PATH)/protocol/vusb.mk
else
include $(TMK_PATH)/protocol/lufa.mk
endif
include $(TMK_PATH)/avr.mk
endif

View file

@ -169,7 +169,7 @@ This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboar
## Building
Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
Depending on which keymap you would like to use, you will have to compile slightly differently.

View file

@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SAT_STEP 255
#define RGBLIGHT_VAL_STEP 12
#define RGB_MIDI
// #define RGB_MIDI
#define RGBW_BB_TWI
#define RGBW 1

View file

@ -52,9 +52,9 @@ uint8_t init_mcp23018(void) {
// I2C subsystem
uint8_t sreg_prev;
sreg_prev=SREG;
cli();
// uint8_t sreg_prev;
// sreg_prev=SREG;
// cli();
if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0)
i2c_initialized++;
@ -83,7 +83,7 @@ uint8_t init_mcp23018(void) {
out:
i2c_stop();
SREG=sreg_prev;
// SREG=sreg_prev;
return mcp23018_status;
}

View file

@ -7,18 +7,23 @@ Layers
------
* BASE: this is where you type.
* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row.
* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
* KEY_SEL: same as above, but every movement shift-selects.
* NUMBER: keypad layer.
* SYMBOL: all the symbols.
* BRACKET: special brackets-only layer for programming
* BRACKET: special brackets-only layer for programming. Activated by pressing left capslock (OSL)
* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
* MOUSE: use mouse keys
Updates
-------
2017/01/22:
* Made brackets toggle an OSL on the left capslock
* Added SHELL_LAYER
2016/12/10:
* toggle for brackets layer is now on left thumb cluster.

View file

@ -6,7 +6,8 @@
#include "action_code.h"
#define BASE 0 // default layer
#define SHELL_NAV 1
#define SHELL_LAYER 1
#define SHELL_NAV 2
#define KEY_NAV 3 // key navigation layer
#define KEY_SEL 4 // key selection layer
#define NUMBER 5 // number layer
@ -58,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I,
OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
// thumb cluster
MO(BRACKETS), RCTL(KC_S),
MO(MOUSE), RCTL(KC_S),
RCTL(KC_DEL),
KC_BSPC,RCTL(KC_BSPC),KC_DEL,
// right hand
@ -80,6 +81,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden
[SHELL_LAYER] = KEYMAP(
// left hand
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C),
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// bottom row
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// thumb cluster
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// bottom row
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
// thumb cluster
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
// shell navigation layer
[SHELL_NAV] = KEYMAP(
// left hand
@ -209,12 +237,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BRACKETS] = KEYMAP(
// left hand
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS,
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
@ -246,7 +274,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X),
MEH(KC_6), MEH(KC_7),
MEH(KC_8),
MEH(KC_9), MEH(KC_Y), MEH(KC_Z)
MEH(KC_9), TO(BASE), TO(SHELL_LAYER)
),
@ -406,6 +434,8 @@ void matrix_scan_user(void) {
switch (layer) {
case NUMBER:
case SYMBOL:
case BRACKETS:
//case SHELL_LAYER:
ergodox_right_led_2_on();
break;
case KEY_NAV:

View file

@ -0,0 +1,419 @@
[
{
"backcolor": "#ffffff",
"name": "Ergodox Swiss German Layout - Base Layer",
"author": "Andreas Schmidt (https://github.com/remigius42)"
},
[
{
"x": 3.5
},
"#\n3",
{
"x": 10.5
},
"*\n8"
],
[
{
"y": -0.875,
"x": 2.5
},
"@\n2",
{
"x": 1
},
"$\n4",
{
"x": 8.5
},
"&\n7",
{
"x": 1
},
"(\n9"
],
[
{
"y": -0.875,
"x": 5.5
},
"%\n5",
{
"a": 7
},
"<i class='fa fa-arrow-left'></i>",
{
"x": 4.5
},
"<i class='fa fa-arrow-right'></i>",
{
"a": 4
},
"^\n6"
],
[
{
"y": -0.875,
"w": 1.5
},
"°\n§",
"!\n1",
{
"x": 14.5
},
")\n0",
{
"w": 1.5
},
"?\n'\n\n'"
],
[
{
"y": -0.375,
"x": 3.5
},
"E",
{
"x": 10.5
},
"I"
],
[
{
"y": -0.875,
"x": 2.5
},
"W",
{
"x": 1
},
"R",
{
"x": 8.5
},
"U",
{
"x": 1
},
"O"
],
[
{
"y": -0.875,
"x": 5.5
},
"T",
{
"c": "#b56b6b",
"a": 6,
"h": 1.5
},
"Toggle Code Layer",
{
"x": 4.5,
"h": 1.5
},
"Toggle Code Layer",
{
"c": "#cccccc",
"a": 4
},
"Y"
],
[
{
"y": -0.875,
"a": 6,
"w": 1.5
},
"Delete",
{
"a": 4
},
"Q",
{
"x": 14.5
},
"P",
{
"w": 1.5
},
"è\nü\n\n["
],
[
{
"y": -0.375,
"x": 3.5
},
"D",
{
"x": 10.5
},
"K"
],
[
{
"y": -0.875,
"x": 2.5
},
"S",
{
"x": 1
},
"F",
{
"x": 8.5
},
"J",
{
"x": 1
},
"L"
],
[
{
"y": -0.875,
"x": 5.5
},
"G",
{
"x": 6.5
},
"H"
],
[
{
"y": -0.875,
"a": 6,
"w": 1.5
},
"Backspace",
{
"c": "#79c777",
"a": 4
},
"A\n\nLyr3",
{
"x": 14.5
},
"é\nö\nLyr3",
{
"c": "#748adb",
"w": 1.5
},
"à\nä\nCmd\n{"
],
[
{
"y": -0.625,
"x": 6.5,
"c": "#cccccc",
"a": 6,
"h": 1.5
},
"Hyper",
{
"x": 4.5,
"h": 1.5
},
"Meh"
],
[
{
"y": -0.75,
"x": 3.5,
"a": 4
},
"C",
{
"x": 10.5
},
";\n,"
],
[
{
"y": -0.875,
"x": 2.5,
"c": "#748adb"
},
"X\n\nAlt",
{
"x": 1,
"c": "#cccccc"
},
"V",
{
"x": 8.5
},
"M",
{
"x": 1,
"c": "#748adb"
},
":\n.\nAlt"
],
[
{
"y": -0.875,
"x": 5.5,
"c": "#cccccc"
},
"B",
{
"x": 6.5
},
"N"
],
[
{
"y": -0.875,
"a": 6,
"w": 1.5
},
"Shift",
{
"c": "#748adb",
"a": 4
},
"Z\n\nCtrl",
{
"x": 14.5
},
"_\n-\nCtrl",
{
"c": "#cccccc",
"a": 6,
"w": 1.5
},
"Shift"
],
[
{
"y": -0.375,
"x": 3.5,
"a": 7
},
"<i class='fa fa-arrow-left'></i>",
{
"x": 10.5
},
"<i class='fa fa-arrow-down'></i>"
],
[
{
"y": -0.875,
"x": 2.5,
"a": 4
},
"£\n$\n\n}",
{
"x": 1,
"a": 7
},
"<i class='fa fa-arrow-right'></i>",
{
"x": 10.5,
"a": 6
},
"AltGr"
],
[
{
"y": -0.9950000000000001,
"x": 14,
"a": 7
},
"<i class='fa fa-arrow-up'></i>"
],
[
{
"y": -0.7549999999999999,
"x": 0.5,
"c": "#b56b6b",
"a": 4
},
">\n<\nCode Layer\n\\",
{
"c": "#cccccc"
},
"`\n^\n\n~",
{
"x": 14.5
},
"!\n¨\n\n]",
{
"c": "#b56b6b"
},
"\n\nCode Layer"
],
[
{
"r": 30,
"rx": 6.5,
"ry": 4.25,
"y": -1,
"x": 1,
"c": "#748adb"
},
"Apps\nAlt",
{
"c": "#cccccc",
"a": 6
},
"Win / Cmd"
],
[
{
"h": 2
},
"Space",
{
"h": 2
},
"Back Space",
"Home"
],
[
{
"x": 2
},
"End"
],
[
{
"r": -30,
"rx": 13,
"y": -1,
"x": -3
},
"Alt",
{
"c": "#748adb",
"a": 4
},
"Esc\nCtrl"
],
[
{
"x": -3,
"c": "#cccccc",
"a": 6
},
"Pg Up",
{
"h": 2
},
"Tab",
{
"h": 2
},
"Enter"
],
[
{
"x": -3
},
"Pg Dn"
]
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View file

@ -0,0 +1,436 @@
[
{
"backcolor": "#ffffff",
"name": "Ergodox Swiss German Layout - Symbol & Media Layer",
"author": "Andreas Schmidt (https://github.com/remigius42)"
},
[
{
"x": 3.5,
"t": "#b81c1c"
},
"F3",
{
"x": 10.5
},
"F8"
],
[
{
"y": -0.875,
"x": 2.5
},
"F2",
{
"x": 1
},
"F4",
{
"x": 8.5
},
"F7",
{
"x": 1
},
"F9"
],
[
{
"y": -0.875,
"x": 5.5
},
"F5",
{
"t": "#000000",
"a": 7
},
"",
{
"x": 4.5
},
"",
{
"t": "#b81c1c",
"a": 4
},
"F6"
],
[
{
"y": -0.875,
"t": "#000000\n\n\n#529151",
"w": 1.5
},
"\n\n\nFlash",
{
"t": "#b81c1c"
},
"F1",
{
"x": 14.5
},
"F10",
{
"t": "#b81c1c\n\n\n#529151",
"w": 1.5
},
"F11\n\n\nFlash"
],
[
{
"y": -0.375,
"x": 3.5
},
"{\n\n\n<i class='fa fa-arrow-circle-up'></i>",
{
"x": 10.5,
"t": "#b81c1c"
},
"8"
],
[
{
"y": -0.875,
"x": 2.5
},
"@",
{
"x": 1
},
"}",
{
"x": 8.5,
"t": "#b81c1c\n\n\n#529151"
},
"7\n\n\nHTML ul",
{
"x": 1
},
"9\n\n\nHTML ol"
],
[
{
"y": -0.875,
"x": 5.5,
"t": "#b81c1c"
},
"|",
{
"t": "#000000",
"a": 7,
"h": 1.5
},
"",
{
"x": 4.5,
"h": 1.5
},
"",
{
"t": "#b81c1c",
"a": 4
},
"<i class='fa fa-arrow-up'></i>"
],
[
{
"y": -0.875,
"t": "#000000",
"a": 7,
"w": 1.5
},
"",
{
"t": "#b81c1c",
"a": 4
},
"!",
{
"x": 14.5
},
"*",
{
"w": 1.5
},
"F12"
],
[
{
"y": -0.375,
"x": 3.5,
"t": "#b81c1c\n\n\n#529151"
},
"(\n\n\n<i class='fa fa-arrow-circle-down'></i>",
{
"x": 10.5
},
"5\n\n\nHTML li"
],
[
{
"y": -0.875,
"x": 2.5
},
"$\n\n\n<i class='fa fa-arrow-circle-left'></i>",
{
"x": 1
},
")\n\n\n<i class='fa fa-arrow-circle-right'></i>",
{
"x": 8.5,
"t": "#b81c1c"
},
"4",
{
"x": 1
},
"6"
],
[
{
"y": -0.875,
"x": 5.5
},
"`",
{
"x": 6.5
},
"<i class='fa fa-arrow-down'></i>"
],
[
{
"y": -0.875,
"t": "#000000",
"a": 7,
"w": 1.5
},
"",
{
"t": "#b81c1c",
"a": 4
},
"#",
{
"x": 14.5
},
"+",
{
"t": "#000000\n\n\n#529151",
"w": 1.5
},
"\n\n\n<i class='fa fa-play'></i><i class='fa fa-pause'></i>"
],
[
{
"y": -0.625,
"x": 6.5,
"t": "#000000",
"a": 7,
"h": 1.5
},
"",
{
"x": 4.5,
"h": 1.5
},
""
],
[
{
"y": -0.75,
"x": 3.5,
"t": "#b81c1c\n\n\n#529151",
"a": 4
},
"[\n\n\nHTML code",
{
"x": 10.5
},
"2\n\n\n<i class='fa fa-fast-backward'></i>"
],
[
{
"y": -0.875,
"x": 2.5,
"t": "#b81c1c"
},
"^",
{
"x": 1,
"t": "#b81c1c\n\n\n#529151"
},
"]\n\n\nHTML br",
{
"x": 8.5,
"t": "#b81c1c"
},
"1",
{
"x": 1,
"t": "#b81c1c\n\n\n#529151"
},
"3\n\n\n<i class='fa fa-fast-forward'></i>"
],
[
{
"y": -0.875,
"x": 5.5,
"t": "#b81c1c"
},
"~",
{
"x": 6.5
},
"&"
],
[
{
"y": -0.875,
"t": "#000000",
"a": 7,
"w": 1.5
},
"",
{
"t": "#b81c1c",
"a": 4
},
"%",
{
"x": 14.5
},
"\\",
{
"t": "#000000",
"a": 7,
"w": 1.5
},
""
],
[
{
"y": -0.375,
"x": 3.5,
"t": "#000000\n\n\n#529151",
"a": 4
},
"\n\n\nleft click",
{
"x": 10.5,
"t": "#b81c1c\n\n\n#529151"
},
".\n\n\n<i class='fa fa-volume-down'></i>"
],
[
{
"y": -0.875,
"x": 2.5,
"t": "#000000",
"a": 7
},
"",
{
"x": 1,
"t": "#000000\n\n\n#529151",
"a": 4
},
"\n\n\nright click",
{
"x": 8.5,
"t": "#b81c1c\n\n\n#529151"
},
"?\n\n\n<i class='fa fa-volume-up'></i>",
{
"x": 1,
"t": "#b81c1c"
},
"0"
],
[
{
"y": -0.75,
"x": 0.5,
"t": "#000000",
"a": 7
},
"",
{
"t": "#b81c1c",
"a": 4
},
"EPRM RST",
{
"x": 14.5,
"t": "#000000",
"a": 7
},
"",
""
],
[
{
"r": 30,
"rx": 6.5,
"ry": 4.25,
"y": -1,
"x": 1
},
"",
""
],
[
{
"t": "#000000\n\n\n#529151",
"a": 4,
"h": 2
},
"\n\n\nEnter",
{
"t": "#000000",
"a": 7,
"h": 2
},
"",
""
],
[
{
"x": 2
},
""
],
[
{
"r": -30,
"rx": 13,
"y": -1,
"x": -3
},
"",
""
],
[
{
"x": -3
},
"",
{
"h": 2
},
"",
{
"t": "#000000\n\n\n#529151",
"a": 4,
"h": 2
},
"\n\n\nWeb back"
],
[
{
"x": -3,
"t": "#000000",
"a": 7
},
""
]
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View file

@ -0,0 +1,287 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "string.h"
#ifdef SUBPROJECT_infinity
#include "visualizer/lcd_backlight.h"
#endif
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#define EPRM M(1) // Macro 1: Reset EEPROM
#define HTML_LI M(10)
#define HTML_UL M(11)
#define HTML_OL M(12)
#define HTML_CODE M(13)
#define HTML_BR M(14)
#define SEND_TAG(TAG) do {\
send_key(KC_NONUS_BSLASH); \
SEND_STRING(TAG); \
send_larger_than(); \
send_key(KC_NONUS_BSLASH); \
SEND_STRING("&"); \
SEND_STRING(TAG); \
send_larger_than(); \
go_back_based_on_tag(TAG); \
} while (0)
#define SEND_SHORT_TAG(TAG) do {\
send_key(KC_NONUS_BSLASH); \
SEND_STRING(TAG); \
SEND_STRING("&"); \
send_larger_than(); \
} while (0)
void send_key(uint16_t keycode);
void go_back_based_on_tag(char* tag);
void send_larger_than(void);
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | § | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | ü |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L |ö / L2|ä / Cmd |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | ¨ | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G,
KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO),
LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1,
KC_LALT,CTL_T(KC_ESC),
KC_PGUP,
KC_PGDN,KC_TAB, KC_ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | EPRM | | | | | ? | . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS,
KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL),
KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS,
KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12,
KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS,
KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS,
ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | RESET | | | | | | | | | | | | | | RESET |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | |H_UL | |H_OL | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |H_CODE| |H_BR | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* |Enter | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_ENT, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
case 1:
if (record->event.pressed) { // For resetting EEPROM
eeconfig_init();
}
break;
case 10:
if (record->event.pressed) {
SEND_TAG("li");
}
break;
case 11:
if (record->event.pressed) {
SEND_TAG("ul");
}
break;
case 12:
if (record->event.pressed) {
SEND_TAG("ol");
}
break;
case 13:
if (record->event.pressed) {
SEND_TAG("code");
}
break;
case 14:
if (record->event.pressed) {
SEND_SHORT_TAG("br");
}
}
return MACRO_NONE;
};
// 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);
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 0:
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
#ifdef SUBPROJECT_infinity
lcd_backlight_hal_color(0, 0, 0);
#endif
break;
case 1:
ergodox_right_led_1_on();
ergodox_board_led_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
#ifdef SUBPROJECT_infinity
lcd_backlight_hal_color(5000, 0, 0);
#endif
break;
case 2:
ergodox_right_led_2_on();
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_3_off();
#ifdef SUBPROJECT_infinity
lcd_backlight_hal_color(0, 5000, 0);
#endif
break;
default:
// none
break;
}
};
void send_key(uint16_t keycode) {
register_code(keycode);
unregister_code(keycode);
}
void go_back_based_on_tag(char* tag) {
const int BRACKETS_AND_SLASH_LENGTH = 3;
for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) {
send_key(KC_LEFT);
}
}
void send_larger_than() {
register_code(KC_LSFT);
send_key(KC_NONUS_BSLASH);
unregister_code(KC_LSFT);
}

View file

@ -0,0 +1,15 @@
# ErgoDox Swiss German Configuration
Swiss German keyboard layout based on the Ergodox EZ default layout.
Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com).
Diagram sources: [default layer](keyboard-layout.json), [layer 1 & 2](keyboard-layout_1_2.json)
![Layout Layer 0](keyboard-layout.png)
![Layout Layer 1&2](keyboard-layout_1_2.png)
## Changelog
* Jan 21, 2017:
* Initial version based on default layout.

View file

@ -15,3 +15,18 @@ 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 "infinity60.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}

View file

@ -46,3 +46,12 @@ const uint16_t fn_actions[] = {
};
// 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) {
};

View file

@ -80,3 +80,12 @@ const uint16_t PROGMEM fn_actions[] = {
};
// 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) {
};

View file

@ -111,3 +111,13 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
const uint16_t fn_actions[] = {
};
// 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) {
};

View file

@ -62,6 +62,8 @@ void matrix_init(void)
#endif
memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, MATRIX_ROWS);
matrix_init_quantum();
}
uint8_t matrix_scan(void)
@ -146,6 +148,7 @@ uint8_t matrix_scan(void)
}
debouncing = false;
}
matrix_scan_quantum();
return 1;
}

View file

@ -20,49 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060
#define DEVICE_VER 0x0001
#define MANUFACTURER Wootpatoot
#define PRODUCT Lets Split
#define DESCRIPTION A split keyboard for the cheap makers
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#ifdef SUBPROJECT_rev1
#include "rev1/config.h"
#endif

View file

@ -1,188 +0,0 @@
#include "lets_split.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
ADJUST,
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = KEYMAP( \
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = KEYMAP( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = KEYMAP( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
[3] = KEYMAP( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
_______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
[4] = KEYMAP( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
_______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = KEYMAP( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case ADJUST:
if (record->event.pressed) {
layer_on(_ADJUST);
} else {
layer_off(_ADJUST);
}
return false;
break;
}
return true;
}

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