From eac8fa799909817bfc7cb4043448f85551154c6b Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Sat, 10 Dec 2016 00:49:11 +0200 Subject: Implemented basic key combination feature --- build_keyboard.mk | 5 +++ quantum/process_keycode/process_combo.c | 66 +++++++++++++++++++++++++++++++++ quantum/process_keycode/process_combo.h | 25 +++++++++++++ quantum/quantum.c | 3 ++ quantum/quantum.h | 4 ++ 5 files changed, 103 insertions(+) create mode 100644 quantum/process_keycode/process_combo.c create mode 100644 quantum/process_keycode/process_combo.h diff --git a/build_keyboard.mk b/build_keyboard.mk index ce505de12..14f4f36bc 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -144,6 +144,11 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c endif +ifeq ($(strip $(COMBO_ENABLE)), yes) + OPT_DEFS += -DCOMBO_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c +endif + ifeq ($(strip $(VIRTSER_ENABLE)), yes) OPT_DEFS += -DVIRTSER_ENABLE endif diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c new file mode 100644 index 000000000..a6cfed11a --- /dev/null +++ b/quantum/process_keycode/process_combo.c @@ -0,0 +1,66 @@ +#include "process_combo.h" +#include "print.h" + +// __attribute__ ((weak)) +// combo_t key_combos[] = { + +// }; + +#define SEND_KEY(key) \ +do { \ + register_code16(key); \ + send_keyboard_report(); \ + unregister_code16(key); \ +} while(0) + + +#define ALL_COMBO_KEYS_ARE_DOWN (((1<state) +static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) +{ + uint8_t count = 0; + bool is_combo_key = false; + // bool combo_key_released = false; + + // Count the number of combo keys + for (const uint16_t *key = combo->keys; COMBO_END != pgm_read_word(key); ++key, ++count); + + for (uint8_t i = 0; i < count; ++i) { + uint16_t key = pgm_read_word(&combo->keys[i]); + + if (key == keycode) { + is_combo_key = true; + + if (record->event.pressed) { + combo->state |= (1<state) { + // The combo was sent, no need to send released key + return true; + } + + combo->state &= ~(1<action); + combo->state = 0; + } + + return is_combo_key; +} + + +bool process_combo(uint16_t keycode, keyrecord_t *record) +{ + bool is_combo_key = false; + + for (int i = 0; i < NUM_ELEMS(key_combos); ++i) { + combo_t *combo = &key_combos[i]; + is_combo_key |= process_single_combo(combo, keycode, record); + } + + return !is_combo_key; +} \ No newline at end of file diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h new file mode 100644 index 000000000..68786c0f1 --- /dev/null +++ b/quantum/process_keycode/process_combo.h @@ -0,0 +1,25 @@ +#ifndef PROCESS_COMBO_H +#define PROCESS_COMBO_H + +#include +#include "progmem.h" +#include "quantum.h" + + +typedef struct +{ + const uint16_t *keys; + uint16_t action; + uint32_t state; +} combo_t; + + +#define COMBO_END 0 +#define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a]) + + +extern combo_t key_combos[1]; + +bool process_combo(uint16_t keycode, keyrecord_t *record); + +#endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index f653564a6..eabeacff8 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -113,6 +113,9 @@ bool process_record_quantum(keyrecord_t *record) { if (!( process_record_kb(keycode, record) && + #ifdef COMBO_ENABLE + process_combo(keycode, record) && + #endif #ifdef MIDI_ENABLE process_midi(keycode, record) && #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index e6adf974a..8614c053a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -63,6 +63,10 @@ extern uint32_t default_layer_state; #include "process_printer.h" #endif +#ifdef COMBO_ENABLE + #include "process_combo.h" +#endif + #define SEND_STRING(str) send_string(PSTR(str)) void send_string(const char *str); -- cgit v1.2.3-24-g4f1b From b6bf4e0dce062a535685c4e772f613252d401ed3 Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Sat, 10 Dec 2016 16:11:59 +0200 Subject: Added support for timing out combos if a key as been pressed for longer than COMBO_TERM --- quantum/process_keycode/process_combo.c | 107 +++++++++++++++++++++++--------- quantum/process_keycode/process_combo.h | 20 +++++- quantum/quantum.c | 5 ++ 3 files changed, 101 insertions(+), 31 deletions(-) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index a6cfed11a..ff7e8aba5 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -1,11 +1,6 @@ #include "process_combo.h" #include "print.h" -// __attribute__ ((weak)) -// combo_t key_combos[] = { - -// }; - #define SEND_KEY(key) \ do { \ register_code16(key); \ @@ -13,54 +8,110 @@ do { \ unregister_code16(key); \ } while(0) +#define COMBO_TIMER_ELAPSED -1 + +#if COMBO_TERM +#define IS_COMBO_KEY_HELD(combo) (COMBO_TIMER_ELAPSED == combo->timer ? false : true) +#define RESET_COMBO_TIMER_AND_KEY(combo) combo->timer = 0; combo->key = 0 +#else +#define IS_COMBO_KEY_HELD(combo) (true) +#define RESET_COMBO_TIMER_AND_KEY(combo) do {} while (0) +#endif + + +__attribute__ ((weak)) +combo_t key_combos[COMBO_COUNT] = { + +}; + +static inline void reset_combo(combo_t *combo) +{ + combo->state = 0; + RESET_COMBO_TIMER_AND_KEY(combo); +} #define ALL_COMBO_KEYS_ARE_DOWN (((1<state) +#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) +#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<keys; ;++count) { + uint16_t key = pgm_read_word(&keys[count]); + if (keycode == key) index = count; + if (COMBO_END == key) break; + } - // Count the number of combo keys - for (const uint16_t *key = combo->keys; COMBO_END != pgm_read_word(key); ++key, ++count); + /* Return if not a combo key */ + if (-1 == index) return false; - for (uint8_t i = 0; i < count; ++i) { - uint16_t key = pgm_read_word(&combo->keys[i]); + bool is_combo_active = IS_COMBO_KEY_HELD(combo); - if (key == keycode) { - is_combo_key = true; + if (record->event.pressed) { + KEY_STATE_DOWN(index); + +#if COMBO_TERM + if (is_combo_active) { + combo->timer = timer_read(); + combo->key = keycode; + } +#endif - if (record->event.pressed) { - combo->state |= (1<state) { - // The combo was sent, no need to send released key - return true; - } + } else { + if (is_combo_active && combo->state) { /* Combo key was tapped */ + RESET_COMBO_TIMER_AND_KEY(combo); + SEND_KEY(keycode); + } - combo->state &= ~(1<key) { /* Held combo key was released */ + unregister_code16(combo->key); } +#endif + + KEY_STATE_UP(index); } - if (ALL_COMBO_KEYS_ARE_DOWN) { + if (ALL_COMBO_KEYS_ARE_DOWN && is_combo_active) { SEND_KEY(combo->action); - combo->state = 0; + reset_combo(combo); + } + + if(NO_COMBO_KEYS_ARE_DOWN && !is_combo_active) { + reset_combo(combo); } - return is_combo_key; + return is_combo_active; } - bool process_combo(uint16_t keycode, keyrecord_t *record) { bool is_combo_key = false; - for (int i = 0; i < NUM_ELEMS(key_combos); ++i) { + for (int i = 0; i < COMBO_COUNT; ++i) { combo_t *combo = &key_combos[i]; is_combo_key |= process_single_combo(combo, keycode, record); } return !is_combo_key; +} + +void matrix_scan_combo(void) +{ +#if COMBO_TERM + for (int i = 0; i < COMBO_COUNT; ++i) { + combo_t *combo = &key_combos[i]; + if (combo->timer && + combo->timer != COMBO_TIMER_ELAPSED && + timer_elapsed(combo->timer) > COMBO_TERM) { + + combo->timer = COMBO_TIMER_ELAPSED; + unregister_code16(combo->key); + register_code16(combo->key); + } + } +#endif } \ No newline at end of file diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index 68786c0f1..c475acd33 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -5,21 +5,35 @@ #include "progmem.h" #include "quantum.h" +#ifndef COMBO_TERM +#define COMBO_TERM TAPPING_TERM +#endif typedef struct { const uint16_t *keys; uint16_t action; uint32_t state; +#if COMBO_TERM + uint16_t timer; + uint16_t key; +#endif } combo_t; +#if COMBO_TERM +#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0, .timer = 0, .key = 0} +#else +#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0 } +#endif #define COMBO_END 0 -#define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a]) +#ifndef COMBO_COUNT +#define COMBO_COUNT 0 +#endif - -extern combo_t key_combos[1]; +extern combo_t key_combos[COMBO_COUNT]; bool process_combo(uint16_t keycode, keyrecord_t *record); +void matrix_scan_combo(void); #endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index eabeacff8..7767b6301 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -509,6 +509,11 @@ void matrix_scan_quantum() { #ifdef TAP_DANCE_ENABLE matrix_scan_tap_dance(); #endif + + #ifdef COMBO_ENABLE + matrix_scan_combo(); + #endif + matrix_scan_kb(); } -- cgit v1.2.3-24-g4f1b From ebe351a6905d5031d5383b4ad7fe551e0e844d52 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 15 Dec 2016 07:22:31 +0800 Subject: enable brackets using the - key on the right, and cleanups --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index f3d02f688..3d7e1893c 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,7 +58,7 @@ 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), + 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), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -209,12 +209,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 -- cgit v1.2.3-24-g4f1b From 6e7cfa83b9424061914793b02757fa4ec75b356b Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Fri, 16 Dec 2016 21:50:28 +0200 Subject: Refactored as well as added support for action keys in combos --- quantum/process_keycode/process_combo.c | 123 ++++++++++++++++++-------------- quantum/process_keycode/process_combo.h | 34 +++++---- 2 files changed, 89 insertions(+), 68 deletions(-) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index ff7e8aba5..e2189ad98 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -1,39 +1,39 @@ #include "process_combo.h" #include "print.h" -#define SEND_KEY(key) \ -do { \ - register_code16(key); \ - send_keyboard_report(); \ - unregister_code16(key); \ -} while(0) #define COMBO_TIMER_ELAPSED -1 -#if COMBO_TERM -#define IS_COMBO_KEY_HELD(combo) (COMBO_TIMER_ELAPSED == combo->timer ? false : true) -#define RESET_COMBO_TIMER_AND_KEY(combo) combo->timer = 0; combo->key = 0 -#else -#define IS_COMBO_KEY_HELD(combo) (true) -#define RESET_COMBO_TIMER_AND_KEY(combo) do {} while (0) -#endif - __attribute__ ((weak)) -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { }; -static inline void reset_combo(combo_t *combo) +__attribute__ ((weak)) +void process_combo_event(uint8_t combo_index, bool pressed) { + +} + +static uint8_t current_combo_index = 0; + +static inline void send_combo(uint16_t action, bool pressed) { - combo->state = 0; - RESET_COMBO_TIMER_AND_KEY(combo); + if (action) { + if (pressed) { + register_code16(action); + } else { + unregister_code16(action); + } + } else { + process_combo_event(current_combo_index, pressed); + } } -#define ALL_COMBO_KEYS_ARE_DOWN (((1<state) -#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) -#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<state) +#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) +#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<timer ? false : true; if (record->event.pressed) { KEY_STATE_DOWN(index); - -#if COMBO_TERM + if (is_combo_active) { - combo->timer = timer_read(); - combo->key = keycode; - } + if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ + send_combo(combo->keycode, true); + combo->timer = COMBO_TIMER_ELAPSED; + } else { /* Combo key was pressed */ + combo->timer = timer_read(); +#ifdef COMBO_ALLOW_ACTION_KEYS + combo->prev_record = *record; +#else + combo->prev_key = keycode; #endif - + } + } } else { - if (is_combo_active && combo->state) { /* Combo key was tapped */ - RESET_COMBO_TIMER_AND_KEY(combo); - SEND_KEY(keycode); + if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */ + send_combo(combo->keycode, false); } -#if COMBO_TERM - if (!is_combo_active && keycode == combo->key) { /* Held combo key was released */ - unregister_code16(combo->key); - } + if (is_combo_active) { /* Combo key was tapped */ +#ifdef COMBO_ALLOW_ACTION_KEYS + record->event.pressed = true; + process_action(record, store_or_get_action(record->event.pressed, record->event.key)); + record->event.pressed = false; + process_action(record, store_or_get_action(record->event.pressed, record->event.key)); +#else + register_code16(keycode); + send_keyboard_report(); + unregister_code16(keycode); #endif + combo->timer = 0; + } - KEY_STATE_UP(index); + KEY_STATE_UP(index); } - if (ALL_COMBO_KEYS_ARE_DOWN && is_combo_active) { - SEND_KEY(combo->action); - reset_combo(combo); - } - - if(NO_COMBO_KEYS_ARE_DOWN && !is_combo_active) { - reset_combo(combo); + if (NO_COMBO_KEYS_ARE_DOWN) { + combo->timer = 0; } return is_combo_active; @@ -91,8 +100,8 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) { bool is_combo_key = false; - for (int i = 0; i < COMBO_COUNT; ++i) { - combo_t *combo = &key_combos[i]; + 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); } @@ -101,17 +110,25 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) void matrix_scan_combo(void) { -#if COMBO_TERM for (int i = 0; i < COMBO_COUNT; ++i) { combo_t *combo = &key_combos[i]; if (combo->timer && combo->timer != COMBO_TIMER_ELAPSED && timer_elapsed(combo->timer) > COMBO_TERM) { - + + /* This disables the combo, meaning key events for this + * combo will be handled by the next processors in the chain + */ combo->timer = COMBO_TIMER_ELAPSED; - unregister_code16(combo->key); - register_code16(combo->key); + +#ifdef COMBO_ALLOW_ACTION_KEYS + process_action(&combo->prev_record, + store_or_get_action(combo->prev_record.event.pressed, + combo->prev_record.event.key)); +#else + unregister_code16(combo->prev_key); + register_code16(combo->prev_key); +#endif } } -#endif -} \ No newline at end of file +} diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index c475acd33..847f2b737 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -5,35 +5,39 @@ #include "progmem.h" #include "quantum.h" -#ifndef COMBO_TERM -#define COMBO_TERM TAPPING_TERM -#endif - typedef struct { const uint16_t *keys; - uint16_t action; + uint16_t keycode; +#ifdef EXTRA_EXTRA_LONG_COMBOS uint32_t state; -#if COMBO_TERM +#elif EXTRA_LONG_COMBOS + uint16_t state; +#else + uint8_t state; +#endif uint16_t timer; - uint16_t key; +#ifdef COMBO_ALLOW_ACTION_KEYS + keyrecord_t prev_record; +#else + uint16_t prev_key; #endif } combo_t; -#if COMBO_TERM -#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0, .timer = 0, .key = 0} -#else -#define COMBO(ck, ca) {.keys = &(ck)[0], .action = (ca), .state = 0 } -#endif +#define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} +#define COMBO_ACTION(ck) {.keys = &(ck)[0]} + #define COMBO_END 0 #ifndef COMBO_COUNT #define COMBO_COUNT 0 #endif - -extern combo_t key_combos[COMBO_COUNT]; +#ifndef COMBO_TERM +#define COMBO_TERM TAPPING_TERM +#endif bool process_combo(uint16_t keycode, keyrecord_t *record); void matrix_scan_combo(void); +void process_combo_event(uint8_t combo_index, bool pressed); -#endif \ No newline at end of file +#endif -- cgit v1.2.3-24-g4f1b From 40abf8bc9ce22cab472f79e3a97c413ac5648986 Mon Sep 17 00:00:00 2001 From: Ofer Plesser Date: Fri, 16 Dec 2016 22:00:29 +0200 Subject: Moved combo processing lower down in process logic --- quantum/quantum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 7767b6301..e5385bc21 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -113,9 +113,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!( process_record_kb(keycode, record) && - #ifdef COMBO_ENABLE - process_combo(keycode, record) && - #endif #ifdef MIDI_ENABLE process_midi(keycode, record) && #endif @@ -131,6 +128,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifndef DISABLE_CHORDING process_chording(keycode, record) && #endif + #ifdef COMBO_ENABLE + process_combo(keycode, record) && + #endif #ifdef UNICODE_ENABLE process_unicode(keycode, record) && #endif -- cgit v1.2.3-24-g4f1b From 0aa413af44b292e4b44d8f8aee1a92f2cb113438 Mon Sep 17 00:00:00 2001 From: Jonas Oberschweiber Date: Sat, 31 Dec 2016 19:37:56 +0100 Subject: Add support for supplementary planes for OS X --- quantum/process_keycode/process_unicode.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index cd3a610b4..2606cf0c8 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -116,7 +116,16 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { const uint32_t* map = unicode_map; uint16_t index = keycode & 0x7FF; uint32_t code = pgm_read_dword_far(&map[index]); - if ((code > 0xFFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { + if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { + // Convert to UTF-16 surrogate pair + code -= 0x10000; + uint32_t lo = code & 0x3ff; + uint32_t hi = (code & 0xffc00) >> 10; + unicode_input_start(); + register_hex32(hi + 0xd800); + register_hex32(lo + 0xdc00); + unicode_input_finish(); + } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { // when character is out of range supported by the OS unicode_map_input_error(); } else { -- cgit v1.2.3-24-g4f1b From 6f44ca7a59d60e20c1d35e8edc916571f5fe40ef Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 15 Jan 2017 23:12:42 -0500 Subject: oneshot timeout would only timeout after an event. After setting a ONESHOT_TIMEOUT value, the oneshot layer state would not expire without an event being triggered (key pressed). The reason was that in the process_record function we would return priort to execute the process_action function if it detected a NOEVENT cycle. The process_action contained the codes to timeout the oneshot layer state. The codes to clear the oneshot layer state have been move just in front of where we check for the NOEVENT cycle in the process_record function. --- tmk_core/common/action.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index d485b46c7..a77177240 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -102,6 +102,13 @@ bool process_record_quantum(keyrecord_t *record) { void process_record(keyrecord_t *record) { +#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_layer_timed_out()) { + dprintf("Oneshot layer: timeout\n"); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + if (IS_NOEVENT(record->event)) { return; } if(!process_record_quantum(record)) @@ -126,13 +133,6 @@ void process_action(keyrecord_t *record, action_t action) uint8_t tap_count = record->tap.count; #endif -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - dprintf("Oneshot layer: timeout\n"); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } -#endif - if (event.pressed) { // clear the potential weak mods left by previously pressed keys clear_weak_mods(); -- cgit v1.2.3-24-g4f1b From 1ac15e6b3a6c43669d5b107e4ca550d2aa7c284c Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Tue, 17 Jan 2017 20:34:05 +0800 Subject: put shell nav under tab, introduce an OSL for the brackets layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 3d7e1893c..2a64331db 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,18 +58,18 @@ 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, + 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, KC_FN3, 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 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -406,6 +406,7 @@ void matrix_scan_user(void) { switch (layer) { case NUMBER: case SYMBOL: + case BRACKETS: ergodox_right_led_2_on(); break; case KEY_NAV: -- cgit v1.2.3-24-g4f1b From 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Mon Sep 17 00:00:00 2001 From: SjB Date: Tue, 17 Jan 2017 21:47:07 -0500 Subject: added mods status bit to visualizer. Since we can't read the real_mods and oneshot_mods static variable directly within the update_user_visualizer_state function (Threading and serial link). We are know storing the mods states in the visualizer_keyboard_status_t structure. We can now display the status of the modifier keys on the LCD display. --- quantum/visualizer/visualizer.c | 58 ++++++++++++++++++++++++++++++++++++++++- quantum/visualizer/visualizer.h | 9 ++++++- tmk_core/common/keyboard.c | 2 +- 3 files changed, 66 insertions(+), 3 deletions(-) diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index 54f6faaa4..5826d909e 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c @@ -53,10 +53,13 @@ SOFTWARE. #define "Visualizer thread priority not defined" #endif +// mods status +#include "action_util.h" static visualizer_keyboard_status_t current_status = { .layer = 0xFFFFFFFF, .default_layer = 0xFFFFFFFF, + .mods = 0xFF, .leds = 0xFFFFFFFF, .suspended = false, }; @@ -64,6 +67,7 @@ static visualizer_keyboard_status_t current_status = { static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) { return status1->layer == status2->layer && status1->default_layer == status2->default_layer && + status1->mods == status2->mods && status1->leds == status2->leds && status1->suspended == status2->suspended; } @@ -307,6 +311,45 @@ bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_s gdispFlush(); return false; } + +static void format_mods_bitmap_string(uint8_t mods, char* buffer) { + *buffer = ' '; + ++buffer; + + for (int i = 0; i<8; i++) + { + uint32_t mask = (1u << i); + if (mods & mask) { + *buffer = '1'; + } else { + *buffer = '0'; + } + ++buffer; + + if (i==3) { + *buffer = ' '; + ++buffer; + } + } + *buffer = 0; +} + +bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) { + (void)animation; + + const char* title = "Modifier states"; + const char* mods_header = " CSAG CSAG "; + char status_buffer[12]; + + gdispClear(White); + gdispDrawString(0, 0, title, state->font_fixed5x8, Black); + gdispDrawString(0, 10, mods_header, state->font_fixed5x8, Black); + format_mods_bitmap_string(state->status.mods, status_buffer); + gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black); + + gdispFlush(); + return false; +} #endif // LCD_ENABLE bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state) { @@ -350,6 +393,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { visualizer_keyboard_status_t initial_status = { .default_layer = 0xFFFFFFFF, .layer = 0xFFFFFFFF, + .mods = 0xFF, .leds = 0xFFFFFFFF, .suspended = false, }; @@ -499,7 +543,18 @@ void update_status(bool changed) { #endif } -void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) { +uint8_t visualizer_get_mods() { + uint8_t mods = get_mods(); + +#ifndef NO_ACTION_ONESHOT + if (!has_oneshot_mods_timed_out()) { + mods |= get_oneshot_mods(); + } +#endif + return mods; +} + +void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds) { // Note that there's a small race condition here, the thread could read // a state where one of these are set but not the other. But this should // not really matter as it will be fixed during the next loop step. @@ -523,6 +578,7 @@ void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) { visualizer_keyboard_status_t new_status = { .layer = state, .default_layer = default_state, + .mods = mods, .leds = leds, .suspended = current_status.suspended, }; diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h index 53e250725..315af5022 100644 --- a/quantum/visualizer/visualizer.h +++ b/quantum/visualizer/visualizer.h @@ -34,10 +34,14 @@ SOFTWARE. #include "lcd_backlight.h" #endif +// use this function to merget both real_mods and oneshot_mods in a uint16_t +uint8_t visualizer_get_mods(void); + // This need to be called once at the start void visualizer_init(void); // This should be called at every matrix scan -void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds); +void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds); + // This should be called when the keyboard goes to suspend state void visualizer_suspend(void); // This should be called when the keyboard wakes up from suspend state @@ -61,6 +65,7 @@ struct keyframe_animation_t; typedef struct { uint32_t layer; uint32_t default_layer; + uint8_t mods; uint32_t leds; // See led.h for available statuses bool suspended; } visualizer_keyboard_status_t; @@ -129,6 +134,8 @@ bool keyframe_set_backlight_color(keyframe_animation_t* animation, visualizer_st bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state); // Displays a bitmap (0/1) of all the currently active layers bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); +// Displays a bitmap (0/1) of all the currently active mods +bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 371d93f3e..765350792 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -188,7 +188,7 @@ MATRIX_LOOP_END: #endif #ifdef VISUALIZER_ENABLE - visualizer_update(default_layer_state, layer_state, host_keyboard_leds()); + visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds()); #endif // update LED -- cgit v1.2.3-24-g4f1b From 489d0ab5818555b8f8ff6e9e7d9a9ea717902ab0 Mon Sep 17 00:00:00 2001 From: Arthur Nogueira Neves Date: Wed, 18 Jan 2017 21:12:02 -0500 Subject: this is the atreus doc --- keyboards/atreus/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index a4077668e..8baa581f0 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -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. -- cgit v1.2.3-24-g4f1b From 072237bce814fd49765be7f5a6fcb57821c1e31d Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 19 Jan 2017 22:45:30 +0800 Subject: introduce shell_layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2a64331db..c4b99d55a 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -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,7 +59,7 @@ 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(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + 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, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -80,6 +81,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), +// permanent shell layer - meant to be used while in a terminal +[SHELL_LAYER] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), + KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT), + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + LALT(KC_B),LALT(KC_F), + LALT(KC_D), + KC_TRNS,RCTL(KC_W),KC_TRNS, + // right hand + RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, + KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + MEH(KC_V), KC_TRNS, KC_TRNS +), + // shell navigation layer [SHELL_NAV] = KEYMAP( // left hand @@ -246,7 +273,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) ), @@ -407,6 +434,7 @@ void matrix_scan_user(void) { case NUMBER: case SYMBOL: case BRACKETS: + //case SHELL_LAYER: ergodox_right_led_2_on(); break; case KEY_NAV: -- cgit v1.2.3-24-g4f1b From dc3937d485bf2325d1ed26c3456475b1b09617f1 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 20 Jan 2017 21:22:18 +0000 Subject: simplify --- keyboards/planck/keymaps/callum/keymap.c | 51 ++++++++----------------------- keyboards/planck/keymaps/callum/readme.md | 12 ++++---- 2 files changed, 19 insertions(+), 44 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 4d0151710..a1254d975 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -7,22 +7,21 @@ extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. #define _BASE 0 #define _MOVE 1 #define _SYMB 2 #define _MOUSE 3 #define _FUNC 4 +#define CMDLEFT LGUI(KC_LEFT) +#define CMDRGHT LGUI(KC_RGHT) +#define ENDASH LALT(KC_MINS) +#define POUND LALT(KC_3) + enum planck_keycodes { MOVE = SAFE_RANGE, SYMB, - FUNC, - BELOW, - ABOVE + FUNC }; // Fillers to make layering more clear @@ -55,16 +54,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Below| | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* SYMB @@ -79,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH }, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND }, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -153,30 +152,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case BELOW: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_RGHT); - unregister_code(KC_RGHT); - unregister_code(KC_LGUI); - register_code(KC_ENT); - unregister_code(KC_ENT); - } - return false; - break; - case ABOVE: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_LEFT); - unregister_code(KC_LEFT); - unregister_code(KC_LGUI); - register_code(KC_ENT); - unregister_code(KC_ENT); - register_code(KC_UP); - unregister_code(KC_UP); - } - return false; - break; } return true; } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 0baeba46d..f970cd974 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,11 +2,11 @@ This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. +- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. ``` /* BASE @@ -27,9 +27,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Below| | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ @@ -63,9 +63,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | Lock | | | | | + * | | F21 | F22 | F23 | F24 | | | Power| | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ -``` + ``` -- cgit v1.2.3-24-g4f1b From 01e750a37230fd7df9ef57a9d1564bde4bee6da6 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:15:37 +0800 Subject: couple of changes to the shell layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index c4b99d55a..2bb5bcd12 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -100,11 +100,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // bottom row - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - MEH(KC_V), KC_TRNS, KC_TRNS + KC_LEFT, KC_RIGHT, + KC_HOME, + KC_END, KC_TRNS, KC_TRNS ), // shell navigation layer -- cgit v1.2.3-24-g4f1b From cbb1927d6f7511d7778239e02d834f392b83dd25 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 16:22:40 +0100 Subject: Add Swiss German layout for Ergodox EZ - Add Swiss German layout for Ergodox EZ based on default layout for Ergodox EZ. - Minor changes in the event loop to prevent flashing of leds. --- .../keymaps/swissgerman_ez/keyboard-layout.json | 417 ++++++++++++++++++++ .../keymaps/swissgerman_ez/keyboard-layout.png | Bin 0 -> 75633 bytes .../keymaps/swissgerman_ez/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../swissgerman_ez/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ keyboards/ergodox/keymaps/swissgerman_ez/keymap.c | 260 +++++++++++++ keyboards/ergodox/keymaps/swissgerman_ez/readme.md | 15 + 6 files changed, 1121 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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 + }, + "", + { + "x": 4.5 + }, + "", + { + "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 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "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" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "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", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "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" + ], + [ + { + "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", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "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" + ], + [ + { + "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", + { + "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 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "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 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c new file mode 100644 index 000000000..c6717abff --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c @@ -0,0 +1,260 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#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 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) + +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| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |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, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, 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; + } + 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(); + break; + case 1: + ergodox_right_led_1_on(); + + ergodox_board_led_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case 2: + ergodox_right_led_2_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_3_off(); + 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); + +} diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md new file mode 100644 index 000000000..039a08588 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md @@ -0,0 +1,15 @@ +# ErgoDox EZ 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 2 & 3](keyboard-layout_2_3.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. + -- cgit v1.2.3-24-g4f1b From bf0b355bc820a017544860a5b90e405f45e66592 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 16:24:41 +0100 Subject: Add Swiss German layout for Ergodox Infinity - Add Swiss German layout for Ergodox Infinity based on default layout for Ergodox EZ. - Minor changes in the event loop to prevent flashing display background lights. --- .../swissgerman_infinity/keyboard-layout.json | 417 ++++++++++++++++++++ .../swissgerman_infinity/keyboard-layout.png | Bin 0 -> 75633 bytes .../swissgerman_infinity/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../swissgerman_infinity/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ .../ergodox/keymaps/swissgerman_infinity/keymap.c | 252 ++++++++++++ .../ergodox/keymaps/swissgerman_infinity/readme.md | 14 + 6 files changed, 1112 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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 + }, + "", + { + "x": 4.5 + }, + "", + { + "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 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "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" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "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", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "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" + ], + [ + { + "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", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "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" + ], + [ + { + "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", + { + "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 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "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 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c new file mode 100644 index 000000000..0ccb7f47e --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c @@ -0,0 +1,252 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "visualizer/lcd_backlight.h" +#include "string.h" + +#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 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) + +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| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |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, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, 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; + } + 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(); + lcd_backlight_hal_color(0, 0, 0); + break; + case 1: + lcd_backlight_hal_color(5000, 0, 0); + break; + case 2: + lcd_backlight_hal_color(0, 5000, 0); + 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); + +} diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md new file mode 100644 index 000000000..1c35f7473 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md @@ -0,0 +1,14 @@ +# ErgoDox Infinity 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 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version. -- cgit v1.2.3-24-g4f1b From 4cf0f7dd16d60aef363e91977597334017e60924 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:42:23 +0800 Subject: make shell layer more compatible with default layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2bb5bcd12..7ed0c7f12 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, 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, - KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + 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(MOUSE), RCTL(KC_S), @@ -81,30 +81,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -// permanent shell layer - meant to be used while in a terminal + +// 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,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), - KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + 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,LALT(KC_DOT), + 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 - LALT(KC_B),LALT(KC_F), - LALT(KC_D), - KC_TRNS,RCTL(KC_W),KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, // right hand - RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, - KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_DOWN, KC_TRNS, 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 - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster - KC_LEFT, KC_RIGHT, - KC_HOME, - KC_END, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), // shell navigation layer -- cgit v1.2.3-24-g4f1b From f7462aaa613a08ba4b86dbb912ce26722cfccaff Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 12:30:06 -0500 Subject: Got ps2avrGB to work with the V-USB protocol --- build_keyboard.mk | 4 + keyboards/ps2avrGB/Makefile | 3 + keyboards/ps2avrGB/README.md | 61 +++++ keyboards/ps2avrGB/config.h | 44 ++++ keyboards/ps2avrGB/keymaps/default/keymap.c | 34 +++ keyboards/ps2avrGB/matrix.c | 105 ++++++++ keyboards/ps2avrGB/program | 74 ++++++ keyboards/ps2avrGB/ps2avrGB.c | 0 keyboards/ps2avrGB/ps2avrGB.h | 54 ++++ keyboards/ps2avrGB/rules.mk | 38 +++ keyboards/ps2avrGB/usbconfig.h | 396 ++++++++++++++++++++++++++++ tmk_core/common.mk | 8 + tmk_core/common/avr/bootloader.c | 10 + tmk_core/common/avr/suspend.c | 2 + tmk_core/common/avr/timer.c | 33 ++- tmk_core/common/command.c | 2 + tmk_core/protocol/vusb.mk | 7 +- tmk_core/protocol/vusb/main.c | 6 +- tmk_core/protocol/vusb/vusb.c | 22 +- 19 files changed, 886 insertions(+), 17 deletions(-) create mode 100644 keyboards/ps2avrGB/Makefile create mode 100644 keyboards/ps2avrGB/README.md create mode 100644 keyboards/ps2avrGB/config.h create mode 100644 keyboards/ps2avrGB/keymaps/default/keymap.c create mode 100644 keyboards/ps2avrGB/matrix.c create mode 100755 keyboards/ps2avrGB/program create mode 100644 keyboards/ps2avrGB/ps2avrGB.c create mode 100644 keyboards/ps2avrGB/ps2avrGB.h create mode 100644 keyboards/ps2avrGB/rules.mk create mode 100644 keyboards/ps2avrGB/usbconfig.h diff --git a/build_keyboard.mk b/build_keyboard.mk index ce505de12..b85557d4a 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -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 diff --git a/keyboards/ps2avrGB/Makefile b/keyboards/ps2avrGB/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/ps2avrGB/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md new file mode 100644 index 000000000..f8360aec0 --- /dev/null +++ b/keyboards/ps2avrGB/README.md @@ -0,0 +1,61 @@ +ps2avrGB keyboard firmware +========================== + +This is a port of the QMK firmware for boards that are based on the +ps2avrGB firmware, like the [ps2avrGB +keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold +by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/). + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. + +## Supported Boards + +Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been +tested so far (since it's the only one I own). But other boards that use +the ps2avrGB firmware should work as well. + +## Installing + +First, install the requirements. These commands are for OSX, but all you +need is the AVR toolchain and `bootloadHID` for flashing: + +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +In order to use the `./program` script, which can reboot the board into +the bootloader, you'll need Python 2 with PyUSB installed: + +``` +$ pip install pyusb +``` + +Then, with the keyboard plugged in, simply run this command from the +`qmk_firmware` directory: + +``` +$ make ps2avrGB-program +``` + +If you prefer, you can just build it and flash the firmware directly with +`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it +in the bootloader: + +``` +$ make ps2avrGB +$ bootloadHID -r ps2avrGB_default.hex +``` + +## Troubleshooting + +From my experience, it's really hard to brick these boards. But these +tricks have been useful when it got stuck in a weird scenario. + +1. Try plugging the board in while pressing `L_Ctrl`. This will force it + to boot only the bootloader without loading the firmware. Once this is + done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly + to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h new file mode 100644 index 000000000..cd5d1ab5a --- /dev/null +++ b/keyboards/ps2avrGB/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER winkeyless.kr +#define PRODUCT ps2avrGB + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +/* only support one hard-coded backlight color for now */ +#define BACKLIGHT_LEVELS 0 +#define BACKLIGHT_COLOR 0x110000 + +#define NO_UART 1 +#define EEPROM_BOOTLOADER_START 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c new file mode 100644 index 000000000..43cc6bce3 --- /dev/null +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +#include "ps2avrGB.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( \ + ESC, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,PSCR,HOME,END, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, FN1, \ + FN2, A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + FN0, LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ + ), + KEYMAP( \ + NO, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, NO, \ + NO, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,DEL, NO, \ + NO, NO, NO, NO, NO, NO, NO, PGUP,NO, NO, NO, NO, NO, NO, TRNS,\ + FN2, NO, NO, PGDN,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ + TRNS,NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ + TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + ), + KEYMAP( \ + NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ + NO, NO, NO, NO, END, NO, NO, NO, NO, NO, HOME,NO, NO, NO, NO, \ + NO, BTN1,MS_U,BTN2,NO, NO, NO, PGUP,FN1, NO, NO, NO, NO, NO, TRNS,\ + FN2, MS_L,MS_D,MS_R,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ + TRNS,NO, DEL, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ + TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_TOGGLE(2), + [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), +}; diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c new file mode 100644 index 000000000..e487ca182 --- /dev/null +++ b/keyboards/ps2avrGB/matrix.c @@ -0,0 +1,105 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) +{ +} diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program new file mode 100755 index 000000000..a88d9cd9b --- /dev/null +++ b/keyboards/ps2avrGB/program @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# Copyright 2017 Luiz Ribeiro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from __future__ import print_function + +import os +import sys +import time +import usb + +if len(sys.argv) < 2: + print('Usage: %s ' % sys.argv[0]) + sys.exit(1) + +print('Searching for ps2avrGB... ', end='') + +dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) +if dev is None: + raise ValueError('Device not found') + +print('Found', end='\n\n') + +print('Device Information:') +print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) +print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) +print('Manufacturer: %s' % (dev.iManufacturer)) +print('Serial: %s' % (dev.iSerialNumber)) +print('Product: %s' % (dev.iProduct), end='\n\n') + +print('Transferring control to bootloader... ', end='') + +dev.set_configuration() + +request_type = usb.util.build_request_type( + usb.util.CTRL_OUT, + usb.util.CTRL_TYPE_CLASS, + usb.util.CTRL_RECIPIENT_DEVICE) + +USBRQ_HID_SET_REPORT = 0x09 +HID_REPORT_OPTION = 0x0301 + + +try: + dev.ctrl_transfer( + request_type, + USBRQ_HID_SET_REPORT, + HID_REPORT_OPTION, + 0, + [0, 0, 0xFF] + [0] * 5 + ) +except usb.core.USBError: + # for some reason I keep getting USBError, but it works! + pass + +# wait a bit until bootloader starts up +time.sleep(2) + +print('OK') +print('Programming...') +if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: + print('\nDone!') diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h new file mode 100644 index 000000000..1da26adb2 --- /dev/null +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -0,0 +1,54 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#include +#include +#include "keycode.h" +#include "action.h" +#include "action_code.h" +#include "action_layer.h" +#include "action_macro.h" +#include "action_util.h" +#include "report.h" +#include "host.h" +#include "print.h" +#include "debug.h" +#include "keymap.h" + + +#define KEYMAP( \ + K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ +) \ +{ \ + { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ + { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ + { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ + { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ + { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ + { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ + { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ + { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ +} + +#endif diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk new file mode 100644 index 000000000..d747e8929 --- /dev/null +++ b/keyboards/ps2avrGB/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32a + +PROTOCOL = VUSB + +# disable UART since atmega32a apparently doesn't have it +NO_UART = yes +# this simplifies things for now +NO_SUSPEND_POWER_DOWN = yes + +# Processor frequency. +# Normally the first thing your program should do is set the clock prescaler, +# so your program will run at the correct speed. You should also set this +# variable to same clock speed. The _delay_ms() macro uses this, and many +# examples use this variable to calculate timings. Do not add a "UL" here. +F_CPU = 12000000 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#BACKLIGHT_ENABLE = yes + +# V-USB debug level: To use ps2_usart.c level must be 0 +# ps2_usart.c requires USART to receive PS/2 signal. +OPT_DEFS = -DDEBUG_LEVEL=0 +OPS_DEFS += -DPROTOCOL_VUSB +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + +CUSTOM_MATRIX = yes +SRC = matrix.c + +#---------------- Programming Options -------------------------- +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/ps2avrGB/usbconfig.h new file mode 100644 index 000000000..d2d848fcd --- /dev/null +++ b/keyboards/ps2avrGB/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 3c1373c08..a86dccc61 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -80,6 +80,14 @@ ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif +ifeq ($(strip $(NO_UART)), yes) + TMK_COMMON_DEFS += -DNO_UART +endif + +ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) + TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN +endif + ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index ad547b985..98a24d178 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -89,6 +90,10 @@ void bootloader_jump(void) { _delay_ms(5); #endif + #ifdef EEPROM_BOOTLOADER_START + eeprom_write_byte((uint8_t *)EEPROM_BOOTLOADER_START, 0x00); + #endif + // watchdog reset reset_key = BOOTLOADER_RESET_KEY; wdt_enable(WDTO_250MS); @@ -114,6 +119,11 @@ void bootloader_jump(void) { #endif } +#ifdef __AVR_ATmega32A__ +// MCUSR is actually called MCUCSR in ATmega32A +#define MCUSR MCUCSR +#endif + /* this runs before main() */ void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3"))); void bootloader_jump_after_watchdog_reset(void) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 0c81e8361..0e97892d9 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -65,6 +65,7 @@ static uint8_t wdt_timeout = 0; static void power_down(uint8_t wdto) { +#ifndef __AVR_ATmega32A__ #ifdef PROTOCOL_LUFA if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif @@ -99,6 +100,7 @@ static void power_down(uint8_t wdto) // Disable watchdog after sleep wdt_disable(); +#endif } #endif diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c index 84af44488..369015200 100644 --- a/tmk_core/common/avr/timer.c +++ b/tmk_core/common/avr/timer.c @@ -29,25 +29,35 @@ volatile uint32_t timer_count; void timer_init(void) { - // Timer0 CTC mode - TCCR0A = 0x02; - #if TIMER_PRESCALER == 1 - TCCR0B = 0x01; + uint8_t prescaler = 0x01; #elif TIMER_PRESCALER == 8 - TCCR0B = 0x02; + uint8_t prescaler = 0x02; #elif TIMER_PRESCALER == 64 - TCCR0B = 0x03; + uint8_t prescaler = 0x03; #elif TIMER_PRESCALER == 256 - TCCR0B = 0x04; + uint8_t prescaler = 0x04; #elif TIMER_PRESCALER == 1024 - TCCR0B = 0x05; + uint8_t prescaler = 0x05; #else # error "Timer prescaler value is NOT vaild." #endif +#ifndef __AVR_ATmega32A__ + // Timer0 CTC mode + TCCR0A = 0x02; + + TCCR0B = prescaler; + OCR0A = TIMER_RAW_TOP; TIMSK0 = (1<. */ +#include +#include #include #include "usbdrv.h" #include "usbconfig.h" @@ -24,6 +26,7 @@ along with this program. If not, see . #include "debug.h" #include "host_driver.h" #include "vusb.h" +#include "bootloader.h" static uint8_t vusb_keyboard_leds = 0; @@ -163,6 +166,7 @@ static struct { uint16_t len; enum { NONE, + BOOTLOADER, SET_LED } kind; } last_req; @@ -193,6 +197,11 @@ usbRequest_t *rq = (void *)data; debug("SET_LED: "); last_req.kind = SET_LED; last_req.len = rq->wLength.word; +#ifdef BOOTLOADER_SIZE + } else if(rq->wValue.word == 0x0301) { + last_req.kind = BOOTLOADER; + last_req.len = rq->wLength.word; +#endif } return USB_NO_MSG; // to get data in usbFunctionWrite } else { @@ -220,6 +229,11 @@ uchar usbFunctionWrite(uchar *data, uchar len) last_req.len = 0; return 1; break; + case BOOTLOADER: + usbDeviceDisconnect(); + bootloader_jump(); + return 1; + break; case NONE: default: return -1; @@ -266,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = { 0x95, 0x06, // Report Count (6), 0x75, 0x08, // Report Size (8), 0x15, 0x00, // Logical Minimum (0), - 0x25, 0xFF, 0x00 // Logical Maximum(255), + 0x25, 0xFF, 0x00, // Logical Maximum(255), 0x05, 0x07, // Usage Page (Key Codes), 0x19, 0x00, // Usage Minimum (0), 0x29, 0xFF, // Usage Maximum (255), @@ -336,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = { 0xa1, 0x01, // COLLECTION (Application) 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x25, 0xb7, 0x00 // LOGICAL_MAXIMUM (0xb7) + 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) 0x19, 0x01, // USAGE_MINIMUM (0x1) 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 0x75, 0x10, // REPORT_SIZE (16) @@ -481,11 +495,11 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) /* interface index */ switch (rq->wIndex.word) { case 0: - usbMsgPtr = keyboard_hid_report; + usbMsgPtr = (unsigned char *)keyboard_hid_report; len = sizeof(keyboard_hid_report); break; case 1: - usbMsgPtr = mouse_hid_report; + usbMsgPtr = (unsigned char *)mouse_hid_report; len = sizeof(mouse_hid_report); break; } -- cgit v1.2.3-24-g4f1b From 461dfd44621ef31cabc08136d4714ca24ed651fa Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 13:44:36 -0500 Subject: Simplification and code polish on ps2avrGB directory --- keyboards/ps2avrGB/config.h | 2 -- keyboards/ps2avrGB/matrix.c | 3 +-- keyboards/ps2avrGB/ps2avrGB.h | 12 ----------- keyboards/ps2avrGB/rules.mk | 47 ++++++++++++++++++++++++------------------- 4 files changed, 27 insertions(+), 37 deletions(-) diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index cd5d1ab5a..dfaea5979 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -#include "config_common.h" - #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D // TODO: share these strings with usbconfig.h diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c index e487ca182..beaa54c40 100644 --- a/keyboards/ps2avrGB/matrix.c +++ b/keyboards/ps2avrGB/matrix.c @@ -100,6 +100,5 @@ inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -void matrix_print(void) -{ +void matrix_print(void) { } diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 1da26adb2..1527c604e 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -17,20 +17,8 @@ along with this program. If not, see . #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H -#include -#include #include "keycode.h" #include "action.h" -#include "action_code.h" -#include "action_layer.h" -#include "action_macro.h" -#include "action_util.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - #define KEYMAP( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk index d747e8929..e2b5922ea 100644 --- a/keyboards/ps2avrGB/rules.mk +++ b/keyboards/ps2avrGB/rules.mk @@ -1,38 +1,43 @@ +# Copyright 2017 Luiz Ribeiro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + # MCU name MCU = atmega32a - PROTOCOL = VUSB -# disable UART since atmega32a apparently doesn't have it +# unsupported features for now NO_UART = yes -# this simplifies things for now NO_SUSPEND_POWER_DOWN = yes +BACKLIGHT_ENABLE = no -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. +# processor frequency F_CPU = 12000000 -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#BACKLIGHT_ENABLE = yes +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes -# V-USB debug level: To use ps2_usart.c level must be 0 -# ps2_usart.c requires USART to receive PS/2 signal. OPT_DEFS = -DDEBUG_LEVEL=0 -OPS_DEFS += -DPROTOCOL_VUSB OPT_DEFS += -DBOOTLOADER_SIZE=2048 +# custom matrix setup CUSTOM_MATRIX = yes SRC = matrix.c -#---------------- Programming Options -------------------------- +# programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex -- cgit v1.2.3-24-g4f1b From c26c81c7f3973b2b4e085b53d37ef6fbddd66c9e Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:20:47 +0100 Subject: Merged keymap for Ergodox EZ & Infinity - Merged keymap for Ergodox EZ & Infinity into one single keymap using pre-processor macros. --- .../keymaps/swissgerman/keyboard-layout.json | 417 ++++++++++++++++++++ .../keymaps/swissgerman/keyboard-layout.png | Bin 0 -> 75633 bytes .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../keymaps/swissgerman/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ keyboards/ergodox/keymaps/swissgerman/keymap.c | 275 +++++++++++++ keyboards/ergodox/keymaps/swissgerman/readme.md | 15 + 6 files changed, 1136 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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 + }, + "", + { + "x": 4.5 + }, + "", + { + "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 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "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" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "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", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "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" + ], + [ + { + "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", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "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" + ], + [ + { + "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", + { + "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 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "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 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c new file mode 100644 index 000000000..a969393bb --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -0,0 +1,275 @@ +#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 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) + +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| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |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, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, 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; + } + 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); +} diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md new file mode 100644 index 000000000..49889cd65 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/readme.md @@ -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 2 & 3](keyboard-layout_2_3.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. + -- cgit v1.2.3-24-g4f1b From 250628de04aabd65d6465c5a6afe48332e8d7f53 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:22:24 +0100 Subject: Removed Ergodox EZ & Infinity specific keymaps - Removed the keymaps for Swiss German spefic for Ergodox EZ and Infinity after previously merging them. --- .../keymaps/swissgerman_ez/keyboard-layout.json | 417 -------------------- .../keymaps/swissgerman_ez/keyboard-layout.png | Bin 75633 -> 0 bytes .../keymaps/swissgerman_ez/keyboard-layout_1_2.png | Bin 54604 -> 0 bytes .../swissgerman_ez/keyboard-layout_2_3.json | 429 --------------------- keyboards/ergodox/keymaps/swissgerman_ez/keymap.c | 260 ------------- keyboards/ergodox/keymaps/swissgerman_ez/readme.md | 15 - .../swissgerman_infinity/keyboard-layout.json | 417 -------------------- .../swissgerman_infinity/keyboard-layout.png | Bin 75633 -> 0 bytes .../swissgerman_infinity/keyboard-layout_1_2.png | Bin 54604 -> 0 bytes .../swissgerman_infinity/keyboard-layout_2_3.json | 429 --------------------- .../ergodox/keymaps/swissgerman_infinity/keymap.c | 252 ------------ .../ergodox/keymaps/swissgerman_infinity/readme.md | 14 - 12 files changed, 2233 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keymap.c delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/readme.md delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json deleted file mode 100644 index 7a0397f72..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json +++ /dev/null @@ -1,417 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "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 - }, - "", - { - "x": 4.5 - }, - "", - { - "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 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "£\n$\n\n}", - { - "x": 1, - "a": 7 - }, - "", - { - "x": 10.5, - "a": 6 - }, - "AltGr" - ], - [ - { - "y": -0.9950000000000001, - "x": 14, - "a": 7 - }, - "" - ], - [ - { - "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" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png deleted file mode 100644 index aff6af851..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png deleted file mode 100644 index 835816b53..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json deleted file mode 100644 index e3d366057..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "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", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5 - }, - "7", - { - "x": 1 - }, - "9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "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", - { - "x": 10.5, - "t": "#b81c1c" - }, - "5" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "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" - ], - [ - { - "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", - "a": 4 - }, - "[", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1 - }, - "]", - { - "x": 8.5 - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "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" - ], - [ - { - "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", - { - "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 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "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 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c deleted file mode 100644 index c6717abff..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#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 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) - -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| | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |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, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, 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; - } - 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(); - break; - case 1: - ergodox_right_led_1_on(); - - ergodox_board_led_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - case 2: - ergodox_right_led_2_on(); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_3_off(); - 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); - -} diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md deleted file mode 100644 index 039a08588..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# ErgoDox EZ 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 2 & 3](keyboard-layout_2_3.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. - diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json deleted file mode 100644 index 7a0397f72..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json +++ /dev/null @@ -1,417 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "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 - }, - "", - { - "x": 4.5 - }, - "", - { - "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 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "£\n$\n\n}", - { - "x": 1, - "a": 7 - }, - "", - { - "x": 10.5, - "a": 6 - }, - "AltGr" - ], - [ - { - "y": -0.9950000000000001, - "x": 14, - "a": 7 - }, - "" - ], - [ - { - "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" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png deleted file mode 100644 index aff6af851..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png deleted file mode 100644 index 835816b53..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json deleted file mode 100644 index e3d366057..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "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", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5 - }, - "7", - { - "x": 1 - }, - "9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "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", - { - "x": 10.5, - "t": "#b81c1c" - }, - "5" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "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" - ], - [ - { - "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", - "a": 4 - }, - "[", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1 - }, - "]", - { - "x": 8.5 - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "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" - ], - [ - { - "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", - { - "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 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "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 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c deleted file mode 100644 index 0ccb7f47e..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c +++ /dev/null @@ -1,252 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" -#include "visualizer/lcd_backlight.h" -#include "string.h" - -#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 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) - -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| | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |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, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, 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; - } - 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(); - lcd_backlight_hal_color(0, 0, 0); - break; - case 1: - lcd_backlight_hal_color(5000, 0, 0); - break; - case 2: - lcd_backlight_hal_color(0, 5000, 0); - 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); - -} diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md deleted file mode 100644 index 1c35f7473..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# ErgoDox Infinity 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 2 & 3](keyboard-layout_2_3.json) - -![Layout Layer 0](keyboard-layout.png) -![Layout Layer 1&2](keyboard-layout_1_2.png) - -## Changelog -* Jan 21, 2017: - * Initial version. -- cgit v1.2.3-24-g4f1b From 6b5cd656fd32033d1b5d117381208cd6708721ed Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:55:18 +0100 Subject: Correct layout description of ergodox swissgerman - Added missing HTML macros to media layer. --- .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 54604 -> 56347 bytes .../keymaps/swissgerman/keyboard-layout_2_3.json | 31 +++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png index 835816b53..e0a455369 100644 Binary files a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json index e3d366057..332f8f3b5 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json @@ -97,18 +97,20 @@ }, "}", { - "x": 8.5 + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" }, - "7", + "7\n\n\nHTML ul", { "x": 1 }, - "9" + "9\n\n\nHTML ol" ], [ { "y": -0.875, - "x": 5.5 + "x": 5.5, + "t": "#b81c1c" }, "|", { @@ -158,16 +160,14 @@ }, "(\n\n\n", { - "x": 10.5, - "t": "#b81c1c" + "x": 10.5 }, - "5" + "5\n\n\nHTML li" ], [ { "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" + "x": 2.5 }, "$\n\n\n", { @@ -237,13 +237,12 @@ { "y": -0.75, "x": 3.5, - "t": "#b81c1c", + "t": "#b81c1c\n\n\n#529151", "a": 4 }, - "[", + "[\n\n\nHTML code", { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" + "x": 10.5 }, "2\n\n\n" ], @@ -255,11 +254,13 @@ }, "^", { - "x": 1 + "x": 1, + "t": "#b81c1c\n\n\n#529151" }, "]", { - "x": 8.5 + "x": 8.5, + "t": "#b81c1c" }, "1", { -- cgit v1.2.3-24-g4f1b From eb6abb6305d66033b67a9860b57b21765b5b46bb Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:58:28 +0100 Subject: Renamed JSON source of Ergodox Swiss German - Renamed the JSON source files for the layout description of the Ergodox Swiss German keymap --- .../keymaps/swissgerman/keyboard-layout_1_2.json | 430 +++++++++++++++++++++ .../keymaps/swissgerman/keyboard-layout_2_3.json | 430 --------------------- keyboards/ergodox/keymaps/swissgerman/readme.md | 2 +- 3 files changed, 431 insertions(+), 431 deletions(-) create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json new file mode 100644 index 000000000..332f8f3b5 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json @@ -0,0 +1,430 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "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", + { + "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 + }, + "" + ], + [ + { + "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", + { + "x": 10.5 + }, + "5\n\n\nHTML li" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "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" + ], + [ + { + "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" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "]", + { + "x": 8.5, + "t": "#b81c1c" + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "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" + ], + [ + { + "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", + { + "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 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "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 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json deleted file mode 100644 index 332f8f3b5..000000000 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json +++ /dev/null @@ -1,430 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "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", - { - "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 - }, - "" - ], - [ - { - "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", - { - "x": 10.5 - }, - "5\n\n\nHTML li" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "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" - ], - [ - { - "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" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "]", - { - "x": 8.5, - "t": "#b81c1c" - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "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" - ], - [ - { - "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", - { - "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 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "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 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md index 49889cd65..b1061c1dd 100644 --- a/keyboards/ergodox/keymaps/swissgerman/readme.md +++ b/keyboards/ergodox/keymaps/swissgerman/readme.md @@ -4,7 +4,7 @@ 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 2 & 3](keyboard-layout_2_3.json) +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) -- cgit v1.2.3-24-g4f1b From 9ce38cbccf073fccea6f7ee6492bf472a48852b8 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 17:09:17 -0500 Subject: Simplified and polished a bit the code changes on tmk_core --- keyboards/ps2avrGB/config.h | 2 +- tmk_core/common/avr/bootloader.c | 6 ++++-- tmk_core/common/avr/suspend.c | 2 -- tmk_core/common/command.c | 1 + tmk_core/protocol/vusb.mk | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index dfaea5979..f0bef2464 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define BACKLIGHT_COLOR 0x110000 #define NO_UART 1 -#define EEPROM_BOOTLOADER_START 1 +#define BOOTLOADHID_BOOTLOADER 1 /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index 98a24d178..34db8d0b0 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -90,8 +90,10 @@ void bootloader_jump(void) { _delay_ms(5); #endif - #ifdef EEPROM_BOOTLOADER_START - eeprom_write_byte((uint8_t *)EEPROM_BOOTLOADER_START, 0x00); + #ifdef BOOTLOADHID_BOOTLOADER + // force bootloadHID to stay in bootloader mode, so that it waits + // for a new firmware to be flashed + eeprom_write_byte((uint8_t *)1, 0x00); #endif // watchdog reset diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 0e97892d9..0c81e8361 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -65,7 +65,6 @@ static uint8_t wdt_timeout = 0; static void power_down(uint8_t wdto) { -#ifndef __AVR_ATmega32A__ #ifdef PROTOCOL_LUFA if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif @@ -100,7 +99,6 @@ static void power_down(uint8_t wdto) // Disable watchdog after sleep wdt_disable(); -#endif } #endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index beba768ec..f79d5a257 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -236,6 +236,7 @@ static void print_status(void) print_val_hex8(host_keyboard_leds()); #ifndef PROTOCOL_VUSB + // these aren't set on the V-USB protocol, so we just ignore them for now print_val_hex8(keyboard_protocol); print_val_hex8(keyboard_idle); #endif diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk index 4d90510af..897b833e1 100644 --- a/tmk_core/protocol/vusb.mk +++ b/tmk_core/protocol/vusb.mk @@ -2,7 +2,7 @@ VUSB_DIR = protocol/vusb OPT_DEFS += -DPROTOCOL_VUSB -SRC += $(VUSB_DIR)/main.c \ +SRC += $(VUSB_DIR)/main.c \ $(VUSB_DIR)/vusb.c \ $(VUSB_DIR)/usbdrv/usbdrv.c \ $(VUSB_DIR)/usbdrv/usbdrvasm.S \ @@ -16,7 +16,7 @@ SRC += $(COMMON_DIR)/sendchar_uart.c \ $(COMMON_DIR)/uart.c endif + # Search Path -#VPATH += $(TMK_PATH)/$(VUSB_DIR) VPATH += $(TMK_PATH)/$(VUSB_DIR) VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv -- cgit v1.2.3-24-g4f1b From bfbab75292a3e1fa9fea501fc3c37698c16dedd5 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 18:15:39 -0500 Subject: Slightly saner default keymap for ps2avrGB and removed some unused code --- keyboards/ps2avrGB/config.h | 4 ---- keyboards/ps2avrGB/keymaps/default/keymap.c | 27 ++++----------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index f0bef2464..b5c696f3f 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -29,10 +29,6 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -/* only support one hard-coded backlight color for now */ -#define BACKLIGHT_LEVELS 0 -#define BACKLIGHT_COLOR 0x110000 - #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index 43cc6bce3..bd1ce775c 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -2,33 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( \ - ESC, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,PSCR,HOME,END, \ + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,HOME,END, \ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, FN1, \ - FN2, A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, INS, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - FN0, LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ - ), - KEYMAP( \ - NO, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, NO, \ - NO, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,DEL, NO, \ - NO, NO, NO, NO, NO, NO, NO, PGUP,NO, NO, NO, NO, NO, NO, TRNS,\ - FN2, NO, NO, PGDN,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ - TRNS,NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ - TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ - ), - KEYMAP( \ - NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ - NO, NO, NO, NO, END, NO, NO, NO, NO, NO, HOME,NO, NO, NO, NO, \ - NO, BTN1,MS_U,BTN2,NO, NO, NO, PGUP,FN1, NO, NO, NO, NO, NO, TRNS,\ - FN2, MS_L,MS_D,MS_R,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ - TRNS,NO, DEL, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ - TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + LCTL,LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ ), }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_TOGGLE(2), - [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), }; -- cgit v1.2.3-24-g4f1b From 642d0acef547c8276ed82a319d2e16c5a977d1a4 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 18:23:44 -0500 Subject: Added a copyright header to the default keymap... ¯\_(ツ)_/¯ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ps2avrGB/keymaps/default/keymap.c | 17 +++++++++++++++++ keyboards/ps2avrGB/ps2avrGB.h | 1 + 2 files changed, 18 insertions(+) diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index bd1ce775c..5c66cde59 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include "ps2avrGB.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 1527c604e..6432e3be9 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -14,6 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H -- cgit v1.2.3-24-g4f1b From 803a861b4e5cce8da2f1260273ee5d918b0f58a7 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sun, 22 Jan 2017 10:32:17 +0800 Subject: document BRACKETS and SHELL_LAYER --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 3e4a2545b..54da74f7f 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -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. -- cgit v1.2.3-24-g4f1b From 3fd9aa3660331b05144f9cf7cebb60bef32a352f Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:30:18 +0100 Subject: SG Ergodox layout: Add
macro to media layer - Added
macro to media layer of Swiss German layout for Ergodox --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index a969393bb..54a8299cb 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -18,6 +18,7 @@ #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); \ @@ -30,6 +31,13 @@ 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); @@ -130,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | + * | | |H_CODE| |H_BR | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -147,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_TRNS, 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, @@ -202,6 +210,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) SEND_TAG("code"); } break; + case 14: + if (record->event.pressed) { + SEND_SHORT_TAG("br"); + } } return MACRO_NONE; }; -- cgit v1.2.3-24-g4f1b From 5c4a73d788470a3fc53b8dd06b808cc662d37795 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:32:40 +0100 Subject: SG Ergodox layout: Add ENTER to left keyboard - Swiss German Ergodox layout: Added ENTER key to left keyboard half on media layer such that the enter key is available on both halves to be able to flash both halves without an additional keyboard. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 54a8299cb..93e36d032 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| + * |Enter | | | | | |Brwser| * | | |------| |------| |Back | * | | | | | | | | * `--------------------' `--------------------' -- cgit v1.2.3-24-g4f1b From c2c8a120228fe8b8bfc15f05f4a39f35f6372b08 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:35:24 +0100 Subject: SG Ergodox layout: Minor code formatting changes - Swiss German Ergodox layout: Removed unnecessary spaces. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 93e36d032..3f90c4e63 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -197,7 +197,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case 11: if (record->event.pressed) { - SEND_TAG( "ul" ); + SEND_TAG("ul"); } break; case 12: -- cgit v1.2.3-24-g4f1b From afd2c2ee9eac95869b8f9366f8861baf64444509 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:43:46 +0100 Subject: SG Ergodox layout: Fixed ENTER key mapping - Swiss German Ergodox layout: Additional ENTER key was mapped to wrong layer and keyboard half. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 3f90c4e63..2291fb651 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_ENT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -159,7 +159,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, - 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, -- cgit v1.2.3-24-g4f1b From 08c192caea1d0c1815b86461705f23d96f010e76 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:57:58 +0100 Subject: SG Ergodox layout: Updated layout documentation - Swiss German Ergodox layout: Updated layout documentation based on previous layout changes. --- .../keymaps/swissgerman/keyboard-layout.json | 4 +++- .../keymaps/swissgerman/keyboard-layout_1_2.json | 12 +++++++++--- .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 56347 -> 58099 bytes 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json index 7a0397f72..6958952b4 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json @@ -1,6 +1,8 @@ [ { - "backcolor": "#ffffff" + "backcolor": "#ffffff", + "name": "Ergodox Swiss German Layout - Base Layer", + "author": "Andreas Schmidt (https://github.com/remigius42)" }, [ { diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json index 332f8f3b5..38a728514 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json @@ -1,6 +1,8 @@ [ { - "backcolor": "#ffffff" + "backcolor": "#ffffff", + "name": "Ergodox Swiss German Layout - Symbol & Media Layer", + "author": "Andreas Schmidt (https://github.com/remigius42)" }, [ { @@ -257,7 +259,7 @@ "x": 1, "t": "#b81c1c\n\n\n#529151" }, - "]", + "]\n\n\nHTML br", { "x": 8.5, "t": "#b81c1c" @@ -378,10 +380,14 @@ ], [ { + "t": "#000000\n\n\n#529151", + "a": 4, "h": 2 }, - "", + "\n\n\nEnter", { + "t": "#000000", + "a": 7, "h": 2 }, "", diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png index e0a455369..54c4a7587 100644 Binary files a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ -- cgit v1.2.3-24-g4f1b From 84661ac44b15bd5e60cc223779fea05784672011 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sun, 22 Jan 2017 12:06:14 -0500 Subject: Upgrade AVR 8-bit Toolchain to 3.5.4 on Travis --- .travis.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e74744a96..b206d1451 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 -- cgit v1.2.3-24-g4f1b From 9d24943ec1285c2d5d5853390abd5eb4e0cd7a2c Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:37:48 -0500 Subject: Refactor code to eliminate duplicate defines * Moved duplicated defines out of inappropriate source files (matrix pins in keymap subdirectory) * Eliminated default keymap directory * Hardcoded serial keymap to use serial defines and EE_CONFIG * Hardcoded i2c keymap to use i2c defines --- keyboards/lets_split/config.h | 43 ------ keyboards/lets_split/keymaps/default/keymap.c | 188 -------------------------- keyboards/lets_split/keymaps/i2c/config.h | 85 +----------- keyboards/lets_split/keymaps/serial/config.h | 87 +----------- keyboards/lets_split/rev1/config.h | 5 +- keyboards/lets_split/rev2/config.h | 4 +- 6 files changed, 16 insertions(+), 396 deletions(-) delete mode 100644 keyboards/lets_split/keymaps/default/keymap.c diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 4db45ab0b..7df0c5752 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -20,49 +20,6 @@ along with this program. If not, see . #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 diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c deleted file mode 100644 index 6f1f71f5f..000000000 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index 72e5ae66b..efe8bb0f2 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -14,89 +14,14 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ - -#ifndef CONFIG_H -#define CONFIG_H - -#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 - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - #define USE_I2C -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - #define I2C_MASTER_LEFT // #define I2C_MASTER_RIGHT -/* 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)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * 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 - +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index b0ad522fc..cd766cc4f 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -15,88 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H -#include "config_common.h" +#define USE_SERIAL -/* 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 +#define EE_HANDS -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - -// #define USE_I2C - -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT -// #define I2C_MASTER_RIGHT - -/* 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)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * 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 +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 825e5ec24..4d3d382a4 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split #define PRODUCT Lets Split v1 #define DESCRIPTION A split keyboard for the cheap makers @@ -42,13 +41,13 @@ along with this program. If not, see . // #define USE_I2C // Use serial if not using I2C -#ifndef USE_I2C +/*#ifndef USE_I2C # define USE_SERIAL #endif // #define EE_HANDS -#define I2C_MASTER_LEFT +#define I2C_MASTER_LEFT*/ // #define I2C_MASTER_RIGHT /* COL2ROW or ROW2COL */ diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index e9689d773..ed9e106db 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -42,13 +42,13 @@ along with this program. If not, see . // #define USE_I2C // Use serial if not using I2C -#ifndef USE_I2C +/*#ifndef USE_I2C # define USE_SERIAL #endif // #define EE_HANDS -#define I2C_MASTER_LEFT +#define I2C_MASTER_LEFT*/ // #define I2C_MASTER_RIGHT /* COL2ROW or ROW2COL */ -- cgit v1.2.3-24-g4f1b From efa526f57016f691fbdd75b1088f7e47240615ea Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:46:43 -0500 Subject: Created lines to uncomment keyboards built upside down * Reverses column order to fix left-to-right key order that occurs if PCB assembled upside down. --- keyboards/lets_split/rev1/config.h | 2 ++ keyboards/lets_split/rev2/config.h | 1 + 2 files changed, 3 insertions(+) diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 4d3d382a4..b73a7fb34 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } uncomment this line and comment line above if you need to reverse left-to-right key order + #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index ed9e106db..86f6ad1be 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,6 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER -- cgit v1.2.3-24-g4f1b From a00957abca4a7c67d25450246fbe73fda09b0e72 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:50:08 -0500 Subject: Fixed keymap matrix on rev2 * Fixed keymap matrix in rev2 so that left half and right half match when in same orientation. --- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 990976de2..7c397912f 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3-24-g4f1b From 99d548c4fbf207a0d38077d655bcf86a92db562f Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:57:30 -0500 Subject: Missed commenting out notes at end of line --- keyboards/lets_split/rev1/config.h | 2 +- keyboards/lets_split/rev2/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index b73a7fb34..e5e9a1c82 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 86f6ad1be..07d3aa506 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER -- cgit v1.2.3-24-g4f1b From 89461e743efbe49092c30cbd71c51ccecbfdd8a9 Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Sun, 22 Jan 2017 19:01:07 -0500 Subject: More keyboard map tweaking (#1019) * Add HOME/END keys as upper/lower on arrow-up/down * Reduce .hex file size by turning off unneeded options * Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand --- keyboards/planck/keymaps/cbbrowne/Makefile | 4 ++-- keyboards/planck/keymaps/cbbrowne/keymap.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/cbbrowne/Makefile b/keyboards/planck/keymaps/cbbrowne/Makefile index b1c70ace7..19e5c2a84 100644 --- a/keyboards/planck/keymaps/cbbrowne/Makefile +++ b/keyboards/planck/keymaps/cbbrowne/Makefile @@ -12,11 +12,11 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -API_SYSEX_ENABLE = yes # Enable SYSEX API (+5390) +API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 2be4dab4b..0448a8d11 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -110,15 +110,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_RAISE] = { /* RAISE */ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {_______, 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, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} + {_______, KC_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, + {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} }, [_LOWER] = { /* LOWER */ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {_______, 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, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______}, - {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} + {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} }, [_KEYPAD] = { /* Key Pad */ {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, -- cgit v1.2.3-24-g4f1b From 372af5e3f6dc2bc362dee1ea8615769d6df7f9a9 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 22:06:53 -0500 Subject: More code cleanup Missed a few commented out vestigal defines in revx/config.h that had been moved to keymap/serial and i2c. --- keyboards/lets_split/rev1/config.h | 11 ----------- keyboards/lets_split/rev2/config.h | 12 ------------ 2 files changed, 23 deletions(-) diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index e5e9a1c82..2f5bde953 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -41,17 +41,6 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER -// #define USE_I2C -// Use serial if not using I2C -/*#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT*/ -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 07d3aa506..b34d7c004 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -40,18 +40,6 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER -// #define USE_I2C - -// Use serial if not using I2C -/*#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT*/ -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -- cgit v1.2.3-24-g4f1b From 841d7e6a1d74b1fc45575ed551132ec27353ebf3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 23 Jan 2017 13:55:24 -0500 Subject: turn off rgb_midi in ez --- keyboards/ergodox/ez/config.h | 2 +- keyboards/ergodox/ez/ez.c | 8 ++++---- quantum/process_keycode/process_music.c | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index 6a8c66d7d..e4f95c302 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 255 #define RGBLIGHT_VAL_STEP 12 -#define RGB_MIDI +// #define RGB_MIDI #define RGBW_BB_TWI #define RGBW 1 diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index 039e4c6bb..3e19f2302 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c @@ -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; } diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index ca68bef6c..1e2648bff 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -114,6 +114,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { music_sequence_interval+=10; return false; } + #define MUSIC_MODE_GUITAR #ifdef MUSIC_MODE_CHROMATIC float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row)); -- cgit v1.2.3-24-g4f1b From 245f77b863b1dbea9d87381b5f5cff2516553d1d Mon Sep 17 00:00:00 2001 From: Dylan Scott Date: Wed, 9 Nov 2016 07:45:20 +1100 Subject: Compare Makefile with itself instead of using `--help` --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 66c0ff30f..636eae3e5 100644 --- a/Makefile +++ b/Makefile @@ -487,7 +487,7 @@ $(SUBPROJECTS): %: %-allkm .PHONY: % %: # Check if we have the CMP tool installed - cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; + cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; # Check if the submodules are dirty, and display a warning if they are git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ @@ -531,4 +531,4 @@ BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) -include $(ROOT_DIR)/testlist.mk \ No newline at end of file +include $(ROOT_DIR)/testlist.mk -- cgit v1.2.3-24-g4f1b From a777495683128fc56aa2d0081f27ff4c5c86d219 Mon Sep 17 00:00:00 2001 From: SjB Date: Mon, 23 Jan 2017 22:01:33 -0500 Subject: fix: infinity60 keyboard was not using quantum features. the quantum matrix codes where not being initialized or/and called so no feature of the quantum firmware could be used. These codes have been added and now we can enjoy the quantum firmware goodness. --- keyboards/infinity60/infinity60.c | 15 +++++++++++++++ keyboards/infinity60/matrix.c | 3 +++ 2 files changed, 18 insertions(+) diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c index e471250fe..fdeed5124 100644 --- a/keyboards/infinity60/infinity60.c +++ b/keyboards/infinity60/infinity60.c @@ -15,3 +15,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #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(); +} + diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c index d2f185288..b6ccf86c3 100644 --- a/keyboards/infinity60/matrix.c +++ b/keyboards/infinity60/matrix.c @@ -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; } -- cgit v1.2.3-24-g4f1b From 2b3859937b1e7f96b684408d31ff12a4e682f7ee Mon Sep 17 00:00:00 2001 From: SjB Date: Sat, 21 Jan 2017 02:01:55 -0500 Subject: speeding up (un)register_code16 In register_code16 and unregister_code16 we call register_code and unregister_code twice, once for the mods and once for the keycode. The (un)register_code have many check to see that keycode we have sent however because we know that we are sending it a mods key, why not just skip all of it and call (un)register_mods instead. This will skip alot of checks and should speedup the loop a little. --- quantum/quantum.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 63ffe2074..1767faed4 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -33,14 +33,22 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { f(KC_RGUI); } +static inline void qk_register_mods(uint8_t kc) { + register_mods(MOD_BIT(kc)); +} + +static inline void qk_unregister_mods(uint8_t kc) { + unregister_mods(MOD_BIT(kc)); +} + void register_code16 (uint16_t code) { - do_code16 (code, register_code); + do_code16 (code, qk_register_mods); register_code (code); } void unregister_code16 (uint16_t code) { unregister_code (code); - do_code16 (code, unregister_code); + do_code16 (code, qk_unregister_mods); } __attribute__ ((weak)) -- cgit v1.2.3-24-g4f1b From 9111cc00f587188c68d3ed0379aae6675ad8d377 Mon Sep 17 00:00:00 2001 From: SjB Date: Tue, 24 Jan 2017 00:24:01 -0500 Subject: updated all the other keymaps to support the new changes. qmk firmware requires the matrix_init_user and matrix_scan_user function to be implementated. Added these function to all the existing keymaps. --- keyboards/infinity60/keymaps/default/keymap.c | 9 +++++++++ keyboards/infinity60/keymaps/depariel/keymap.c | 9 +++++++++ keyboards/infinity60/keymaps/hasu/keymap.c | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 443412857..8347c94b4 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -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) { + +}; diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index 7412b9b9d..57f9487f2 100755 --- a/keyboards/infinity60/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -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) { + +}; diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index d3728869a..9982078c1 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -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) { + +}; -- cgit v1.2.3-24-g4f1b From 3c32e38036fda17be4ff86235565fe4ac88cba33 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 24 Jan 2017 19:10:35 +0100 Subject: [deadcyclo layout] Added support for ergodox ez shine --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 79741 -> 96046 bytes .../deadcyclo/images/deadcyclo-layer-1-symbols.png | Bin 55349 -> 79904 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 29 ++++++++++++++------- keyboards/ergodox/keymaps/deadcyclo/readme.md | 25 +++++++++++++++--- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index 4208c5189..a70e37559 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png index ccda70e39..5adb7ac77 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index d75c805bf..208f67162 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, @@ -75,11 +75,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * |Toggle|Animat| | Hue+ | Hue- | * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| DEL | | - * | | | | | | | | + * |Bright|Bright|Solid | | | | | + * |ness- |ness+ |------| |------| DEL | | + * | | | | | EPRM | | | * `--------------------' `--------------------' */ // SYMBOLS @@ -90,18 +90,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, + RGB_TOG,RGB_MOD, + RGB_SLD, + RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, - KC_TRNS, KC_DEL, KC_TRNS + EPRM, KC_DEL, KC_TRNS ), /* Keymap 2: Media and mouse keys * @@ -254,12 +254,21 @@ void matrix_scan_user(void) { switch (layer) { case 1: ergodox_right_led_1_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0xff,0x00,0x00); + #endif break; case 2: ergodox_right_led_2_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0x00,0xff,0x00); + #endif break; case 3: ergodox_right_led_3_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0x00,0x00,0xff); + #endif break; case 4: ergodox_right_led_1_on(); // TODO: Make a fourth layer diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 809dd6eb5..a937cfceb 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -1,9 +1,11 @@ # ErgoDox EZ 1337 configuration -Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that -some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar -with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are -unfamiliar with tiling window managers) as much as possibly. +Custom layout based on the default layout. Intended for interational +users of us intl-altgr layout. Note that some common keys might be +missing, as this layout is intented to be used on *nix systems by +users familiar with their system. The layout is geared towards +avoiding using the rat (mouse for those of you who are unfamiliar with +tiling window managers) as much as possibly. # Layouts @@ -13,6 +15,19 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo [![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) +The base layer here is marked with the us international alt-gr layout, +including characters bound to what on an iso keyboard would be alt-gr +and on an ansi keyboard right alt. + +Regular (and irregular) modifier keys are marked with a yellowish +gray. Layer moderators are marked with blue, red and green, which are +the same colors each layer displays on the LEDs when active. + +All of the layer switch keys, except for the two center keys marked L1 +TOG, are dual purpose. Hence for example the top left key produces ESC +if tapped, and temporarilly toggles L3 when hold down. The two center +L1 TOG keys toggle L1 on and off for more permanent layer toggling. + ## Layer 1 - Symbols [![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) @@ -29,8 +44,10 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo - 02.01.2017 Added delete key on second layer - 10.01.2017 Added layer images to readme +- 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand # TODO - Add unicode support (direct input and indirect? see algernon layout for examples) - Add descriptions below each layer image of any special functions/keys +- Move Navigation keys to Layer 2 on right side, add a layer switch to L2 on left side as well, and use L3 for unicode stuff -- cgit v1.2.3-24-g4f1b From 37ed3d13a4d99c9880f713de497f84efbe937bdf Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 24 Jan 2017 21:54:34 +0100 Subject: [deadcyclo layout] Added unicode layer --- keyboards/ergodox/keymaps/deadcyclo/Makefile | 1 + .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 50926 -> 62258 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 43551 -> 58407 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 91 +++++++++++++++++---- keyboards/ergodox/keymaps/deadcyclo/readme.md | 33 ++++++-- 5 files changed, 98 insertions(+), 27 deletions(-) create mode 100644 keyboards/ergodox/keymaps/deadcyclo/Makefile diff --git a/keyboards/ergodox/keymaps/deadcyclo/Makefile b/keyboards/ergodox/keymaps/deadcyclo/Makefile new file mode 100644 index 000000000..039f07c8e --- /dev/null +++ b/keyboards/ergodox/keymaps/deadcyclo/Makefile @@ -0,0 +1 @@ +UNICODE_ENABLE = yes diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png index 481e63e32..a267ff23d 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 9ebba6734..6d73495c1 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 208f67162..c14ca6959 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -12,7 +12,10 @@ enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, VRSN, - RGB_SLD + RGB_SLD, + SHRUG, + YAY, + HUG }; // TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) @@ -103,14 +106,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, EPRM, KC_DEL, KC_TRNS ), -/* Keymap 2: Media and mouse keys +/* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | + * | | | | MsUp | | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -124,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// MEDIA AND MOUSE +// MEDIA , MOUSE and NAVIGATION [MDIA] = KEYMAP( KC_TRNS, 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, @@ -135,24 +138,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right 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_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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, 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 ), -/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example +/* Keymap 3: Unicode * * ,--------------------------------------------------. ,--------------------------------------------------. * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | up | | | | | | | | | | | | + * | | Shrug| yay | hug | | | | | | ■ | λ | → | ➙ | ▻ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | left | down | right| |------| |------| | | | | | | + * | | | | | | |------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -166,11 +169,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// NAVIGATION +// Unicode [NAVG] = KEYMAP( KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, SHRUG, YAY, HUG, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -178,7 +181,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, // right 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, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -192,6 +195,25 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; +static void ang_tap (uint16_t code, ...) { + uint16_t kc = code; + va_list ap; + + va_start(ap, code); + + do { + register_code16(kc); + unregister_code16(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); +} + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -233,13 +255,46 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case SHRUG: + if (record->event.pressed) { + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + } + return false; + break; + case YAY: + if (record->event.pressed) { + ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); + } + return false; + break; + case HUG: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + } + return false; + break; } return true; } // Runs just one time when the keyboard initializes. void matrix_init_user(void) { - + set_unicode_input_mode(UC_LNX); }; // Runs constantly in the background, in a loop. diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index a937cfceb..5426057e9 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -28,26 +28,41 @@ TOG, are dual purpose. Hence for example the top left key produces ESC if tapped, and temporarilly toggles L3 when hold down. The two center L1 TOG keys toggle L1 on and off for more permanent layer toggling. -## Layer 1 - Symbols +## Layer 1 - Symbols and RGB -[![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) +[![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) -## Layer 2 - Media and Mouse +The Symbols and RGB layer contains function keys, commonly used +symbols, a numpad and if you have the new Ergodox Ez shine keys for +controlling various RGB-led functions. In addition, it provides an up +and a down key for easy scrolling. RGB controller keys are yellow. -[![Layer 2 - Media and Mouse](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) +## Layer 2 - Media, Mouse and Navigation -## Layer 3 - Navigation +[![Layer 2 - Media, Mouse and Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) -[![Layer 3 - Navigation](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) +The Media, Mouse and unicode layer contains special keys for moving +the mouse and clicking on it with the keyboard. In addition it +provides standard media control keys, and default arrow keys. + +## Layer 3 - Unicode + +[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) + +The unicode layer provides keys for directly typing unicode (utf-8) # Changelog - 02.01.2017 Added delete key on second layer - 10.01.2017 Added layer images to readme - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand +- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 # TODO -- Add unicode support (direct input and indirect? see algernon layout for examples) -- Add descriptions below each layer image of any special functions/keys -- Move Navigation keys to Layer 2 on right side, add a layer switch to L2 on left side as well, and use L3 for unicode stuff +- Add support for unicode by name? (See algernon layout for example) +- Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) +- Make macros for gnu screen and i3wm +- Look into the app launch macros in algernon keymap +- Make other smileys like shrug and yay ¯\_(ツ)_/¯ and \o/ and others (see amon others [http://dongerlist.com](http://dongerlist.com) + -- cgit v1.2.3-24-g4f1b From b3cf96ec2e0fee322ac6314730fa6e3e43d76cb2 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:25:17 -0500 Subject: Add smt keymap for Preonic --- keyboards/preonic/keymaps/smt/Makefile | 3 + keyboards/preonic/keymaps/smt/keymap.c | 248 ++++++++++++++++++++++++++++++++ keyboards/preonic/keymaps/smt/readme.md | 1 + 3 files changed, 252 insertions(+) create mode 100644 keyboards/preonic/keymaps/smt/Makefile create mode 100644 keyboards/preonic/keymaps/smt/keymap.c create mode 100644 keyboards/preonic/keymaps/smt/readme.md diff --git a/keyboards/preonic/keymaps/smt/Makefile b/keyboards/preonic/keymaps/smt/Makefile new file mode 100644 index 000000000..3d4659ceb --- /dev/null +++ b/keyboards/preonic/keymaps/smt/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c new file mode 100644 index 000000000..4ef22bb97 --- /dev/null +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -0,0 +1,248 @@ +#include "preonic.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DVORAK 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +enum preonic_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_GRV, 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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_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_4, KC_5, KC_6, KC_HOME, KC_PGUP}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case 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 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 LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md new file mode 100644 index 000000000..e911968dd --- /dev/null +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 51fe4f0d3429387ee512c22c5c1daffe63e2db9a Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:55:40 -0500 Subject: Update readme for smt Preonic keymap --- keyboards/preonic/keymaps/smt/readme.md | 86 ++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index e911968dd..b2052b37c 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -1 +1,85 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file +# smt's Preonic keymap + +This keymap is primarily based on the default Preonic keymap, which in turn is derived from Planck's default. + +Notable differences from the default are: + +1. **Dvorak by default** + + I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + +2. **Right Shift** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +## Dvorak (default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | / | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Qwerty (same as default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Lower + +This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +## Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. + +I haven't completely filled this layer, which leaves room for future mappings and macros. + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3-24-g4f1b From 8af48194f211ed30910e5fc4f7abc3195a5fb16f Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Wed, 25 Jan 2017 15:16:38 +0100 Subject: [deadcyclo layout] Added lotsof new emojis and some new unicode keys --- .../images/deadcyclo-layer-3-navigation.png | Bin 58407 -> 55517 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 188 +++++++++++++++++++-- keyboards/ergodox/keymaps/deadcyclo/readme.md | 1 + 3 files changed, 178 insertions(+), 11 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 6d73495c1..e60c3e59e 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index c14ca6959..7578c723d 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -15,7 +15,22 @@ enum custom_keycodes { RGB_SLD, SHRUG, YAY, - HUG + HUG, + SMILE, + SMILE2, + HMM1, + HMM2, + BEAR1, + BEAR2, + FUU, + EGGY1, + EGGY2, + FACE1, + FACE2, + UHU, + SMRK1, + SMRK2, + LOVE }; // TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) @@ -153,13 +168,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Shrug| yay | hug | | | | | | ■ | λ | → | ➙ | ▻ | | + * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | + * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | smrk1| smrk2| love | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -172,18 +187,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Unicode [NAVG] = KEYMAP( KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, SHRUG, YAY, HUG, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, + KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, + KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, + KC_TRNS, SMRK1, SMRK2, LOVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, + UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), KC_TRNS, + KC_TRNS, UC(0x2764), KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -288,6 +303,157 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case SMILE: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + } + return false; + break; + case SMILE2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case HMM1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + } + return false; + break; + case HMM2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case BEAR1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0295); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0294); unicode_input_finish(); + } + return false; + break; + case BEAR2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FUU: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + } + return false; + break; + case EGGY1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0xff09); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + } + return false; + break; + case EGGY2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0020); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FACE1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FACE2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case UHU: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + } + return false; + break; + case SMRK1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + } + return false; + break; + case SMRK2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case LOVE: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + } + return false; + break; } return true; } diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 5426057e9..2ca5e822c 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -57,6 +57,7 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 10.01.2017 Added layer images to readme - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 +- 25.01.2017 Added lots of new emojis and some unicode keys # TODO -- cgit v1.2.3-24-g4f1b From 938422ce9901b7e15c738d6abaa78e0076ebdc84 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 25 Jan 2017 10:02:01 -0500 Subject: layer defines to enum --- keyboards/planck/keymaps/default/keymap.c | 17 ++++++++++------- keyboards/preonic/keymaps/default/keymap.c | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index ddbe4d7b2..1b1b998b2 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -14,13 +14,16 @@ extern keymap_config_t keymap_config; // 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 _PLOVER 5 -#define _ADJUST 16 + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; enum planck_keycodes { QWERTY = SAFE_RANGE, diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 78b4997a8..3313af945 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -9,12 +9,15 @@ // 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 preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; enum preonic_keycodes { QWERTY = SAFE_RANGE, -- cgit v1.2.3-24-g4f1b From 6546dddddb883b76243fd4088a5c7b38bd050c0d Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 10:57:42 -0500 Subject: Remove COLEMAK from preonic_keycodes enum --- keyboards/preonic/keymaps/smt/keymap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 4ef22bb97..5465d543a 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -18,7 +18,6 @@ enum preonic_keycodes { DVORAK = SAFE_RANGE, QWERTY, - COLEMAK, LOWER, RAISE, BACKLIT -- cgit v1.2.3-24-g4f1b From 63e406eca4da805617889f7ab769a781c0046742 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Thu, 26 Jan 2017 00:24:51 -0500 Subject: Add smt keymap for Planck --- keyboards/planck/keymaps/smt/Makefile | 3 + keyboards/planck/keymaps/smt/keymap.c | 232 +++++++++++++++++++++++++++++++++ keyboards/planck/keymaps/smt/readme.md | 78 +++++++++++ 3 files changed, 313 insertions(+) create mode 100644 keyboards/planck/keymaps/smt/Makefile create mode 100644 keyboards/planck/keymaps/smt/keymap.c create mode 100644 keyboards/planck/keymaps/smt/readme.md diff --git a/keyboards/planck/keymaps/smt/Makefile b/keyboards/planck/keymaps/smt/Makefile new file mode 100644 index 000000000..457a3d01d --- /dev/null +++ b/keyboards/planck/keymaps/smt/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c new file mode 100644 index 000000000..47e9d8c70 --- /dev/null +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -0,0 +1,232 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#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 _DVORAK 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +enum planck_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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_4, KC_5, KC_6, KC_HOME, KC_PGUP}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | _ | ? | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | - | / | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_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 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 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 LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md new file mode 100644 index 000000000..52d702df0 --- /dev/null +++ b/keyboards/planck/keymaps/smt/readme.md @@ -0,0 +1,78 @@ +# smt's Planck keymap + +This keymap is primarily based on the default Planck keymap. + +Notable differences from the default are: + +1. **Dvorak by default** + + I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + +2. **Right Shift** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +## Dvorak (default) + +``` +,-----------------------------------------------------------------------------------. +| 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 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Qwerty (same as default) + +``` +,-----------------------------------------------------------------------------------. +| 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 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Lower + +This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +## Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. + +I haven't completely filled this layer, which leaves room for future mappings and macros. + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | _ | ? | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | - | / | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + -- cgit v1.2.3-24-g4f1b From 1b20243092002637d0020b341801e5e26a61fd2f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 26 Jan 2017 01:26:17 -0500 Subject: Add gitter image, start update to qmk org --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index d33c3ad01..71f756667 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Quantum Mechanical Keyboard Firmware -[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) +[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). @@ -23,7 +23,7 @@ The project also includes community support for [lots of other keyboards](/keybo QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :) -This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new). +This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/qmk/qmk_firmware/issues/new). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed). @@ -31,7 +31,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest: -* [**The Wiki**](https://github.com/jackhumbert/qmk_firmware/wiki) - the entirety of the readme has been moved here +* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here * The readme for your own keyboard: This is found under `keyboards//`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. * The list of possible keycodes you can use in your keymap is actually spread out in a few different places: * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. -- cgit v1.2.3-24-g4f1b From c9ca36800884f63cf67d55565824bad0cb6d9be3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 26 Jan 2017 01:52:43 -0500 Subject: replace jackhumbert with qmk --- doc/BUILD_GUIDE.md | 4 ++-- doc/CYGWIN_GUIDE.md | 2 +- doc/HAND_WIRE.md | 6 +++--- doc/PCB_GUIDE.md | 6 +++--- keyboards/atreus/readme.md | 2 +- keyboards/ergodox/keymaps/ab/readme.md | 2 +- keyboards/ergodox/keymaps/algernon/readme.md | 4 ++-- keyboards/ergodox/keymaps/german-kinergo/readme.md | 2 +- keyboards/ergodox/keymaps/mclennon_osx/README.md | 2 +- keyboards/ergodox/keymaps/pvinis/Readme.md | 2 +- keyboards/ergodox/keymaps/supercoder/readme.md | 2 +- keyboards/ergodox/keymaps/win10_writers-block/readme.md | 2 +- keyboards/ergodox/readme.md | 2 +- keyboards/hhkb/readme.md | 2 +- keyboards/preonic/keymaps/smt/readme.md | 2 +- keyboards/s60-x/readme.md | 2 +- 16 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/BUILD_GUIDE.md b/doc/BUILD_GUIDE.md index 70a4e10fa..175019183 100644 --- a/doc/BUILD_GUIDE.md +++ b/doc/BUILD_GUIDE.md @@ -6,7 +6,7 @@ 1. If you have ever installed WinAVR, uninstall it. 2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! 7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell". @@ -38,7 +38,7 @@ Debian/Ubuntu example: If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). ## Verify Your Installation -1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. +1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. 4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. diff --git a/doc/CYGWIN_GUIDE.md b/doc/CYGWIN_GUIDE.md index 05e7a55f7..05d71961a 100755 --- a/doc/CYGWIN_GUIDE.md +++ b/doc/CYGWIN_GUIDE.md @@ -234,7 +234,7 @@ If you did everything else right. This part should be a snap! Grab the latest so ###Build Planck and Load the Firmware ``` $ cd ~/src -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/planck $ make ``` diff --git a/doc/HAND_WIRE.md b/doc/HAND_WIRE.md index 18cb7011f..17ef3116f 100644 --- a/doc/HAND_WIRE.md +++ b/doc/HAND_WIRE.md @@ -183,7 +183,7 @@ As you move along, be sure that the Teensy is staying in place - recutting and s From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. -To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). +To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: @@ -276,7 +276,7 @@ This can be accomplished by using the following `keymaps` definition: ), }; -Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. +Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. @@ -306,7 +306,7 @@ If you've done all of these things, keep in mind that sometimes you might have h Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) +There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) ## Trouble-shooting compiling diff --git a/doc/PCB_GUIDE.md b/doc/PCB_GUIDE.md index 3fad41dfb..16de71114 100644 --- a/doc/PCB_GUIDE.md +++ b/doc/PCB_GUIDE.md @@ -5,7 +5,7 @@ ### Windows 1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! @@ -32,7 +32,7 @@ Note that, since it will be directly accessing USB hardware, the `dfu-programmer` program needs to be run as root. ## Verify Your Installation -1. Clone the following repository: https://github.com/jackhumbert/qmk_firmware +1. Clone the following repository: https://github.com/qmk/qmk_firmware 2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck` 3. Run `make`. This should output a lot of information about the build process. @@ -80,7 +80,7 @@ when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to ### Keymap -Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h). +Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h). You can use modifiers with keycodes like this: diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 8baa581f0..476d1bce3 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -88,7 +88,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md index 6b1ac2be3..62e08e162 100644 --- a/keyboards/ergodox/keymaps/ab/readme.md +++ b/keyboards/ergodox/keymaps/ab/readme.md @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get * Easy on beginners. It has everything you need for your day to day usage. #### Cons -* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) +* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) * While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. #### Notes diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 015bd7cd3..3783eadf1 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -121,10 +121,10 @@ There is a very small tool in `tools/layer-notify`, that listens to the HID cons To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: [algernon:ez-layout]: https://github.com/algernon/ergodox-layout - [qmk]: https://github.com/jackhumbert/qmk_firmware + [qmk]: https://github.com/qmk/qmk_firmware ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware $ git clone https://github.com/algernon/ergodox-layout.git \ keyboards/ergodox/keymaps/algernon-master diff --git a/keyboards/ergodox/keymaps/german-kinergo/readme.md b/keyboards/ergodox/keymaps/german-kinergo/readme.md index 557d85a8a..beb74cf75 100644 --- a/keyboards/ergodox/keymaps/german-kinergo/readme.md +++ b/keyboards/ergodox/keymaps/german-kinergo/readme.md @@ -2,7 +2,7 @@ This layout is inspired by the "kinesis-qwerty-mod" from benblazak's [ergodox-firmware](https://github.com/benblazak/ergodox-firmware), as well as by the "german" layout from the -[qmk_firmware](https://github.com/jackhumbert/qmk_firmware). +[qmk_firmware](https://github.com/qmk/qmk_firmware). The goal was to have a layout that is pretty close to an ordinary German keyboard, so I don't have to make adjustments on the operating system level and I keep some of the muscle memory to use a regular keyboard. diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md index 60980d043..28cdb7c10 100644 --- a/keyboards/ergodox/keymaps/mclennon_osx/README.md +++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md @@ -2,4 +2,4 @@ This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. -If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). +If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/). diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md index 2a4a0c8f3..af2721054 100644 --- a/keyboards/ergodox/keymaps/pvinis/Readme.md +++ b/keyboards/ergodox/keymaps/pvinis/Readme.md @@ -59,7 +59,7 @@ I have two commented out layers that are just templates, so I can easily create # Building ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis $ make ``` diff --git a/keyboards/ergodox/keymaps/supercoder/readme.md b/keyboards/ergodox/keymaps/supercoder/readme.md index 8ef96eddf..df39ac7a9 100644 --- a/keyboards/ergodox/keymaps/supercoder/readme.md +++ b/keyboards/ergodox/keymaps/supercoder/readme.md @@ -22,7 +22,7 @@ your own: [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox $ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder $ make KEYMAP=supercoder diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md index e51e3c48f..83f91bce2 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -90,7 +90,7 @@ Your LEDs will change to indicate your layer. You'll know you are in the base la To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/` -[qmk]: https://github.com/jackhumbert/qmk_firmware +[qmk]: https://github.com/qmk/qmk_firmware ``` $ make keyboard=ergodox keymap=win10_writers-block diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index ca3eeba59..45b3354c1 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -25,7 +25,7 @@ If none of the existing keymaps suit you, you can create your own custom keymap. This will require some experience with coding. Follow these steps to customize a keymap: - - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + - Read the [qmk firmware README](https://github.com/qmk/qmk_firmware) from top to bottom. Then come back here. :) - Clone the qmk_firmware repository diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index 367c0a08f..ee7d11121 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -82,7 +82,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index b2052b37c..2dcc1927f 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,7 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! ## Dvorak (default) diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md index 94ce82922..408ad13ac 100644 --- a/keyboards/s60-x/readme.md +++ b/keyboards/s60-x/readme.md @@ -13,7 +13,7 @@ You only need to flash them onto your keyboard, which is explained below, there' ## Flashing your keyboard The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). -[QMK Firmware Flasher](https://github.com/jackhumbert/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. +[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. [Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. -- cgit v1.2.3-24-g4f1b From 87bc36253dd915c51571e1972b771f49db9673d3 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Thu, 26 Jan 2017 22:44:22 +1100 Subject: Fix documentation for TMK actions --- tmk_core/common/action_code.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 33da35f35..b15aaa0eb 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h @@ -47,10 +47,15 @@ along with this program. If not, see . * 0100|10| usage(10) (reserved) * 0100|11| usage(10) (reserved) * - * ACT_MOUSEKEY(0110): TODO: Not needed? + * + * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space? * 0101|xxxx| keycode Mouse key * - * 011x|xxxx xxxx xxxx (reseved) + * ACT_SWAP_HANDS(0110): + * 0110|xxxx| keycode Swap hands (keycode on tap, or options) + * + * + * 0111|xxxx xxxx xxxx (reserved) * * * Layer Actions(10xx) @@ -67,7 +72,6 @@ along with this program. If not, see . * ee: on event(01:press, 10:release, 11:both) * * 1001|xxxx|xxxx xxxx (reserved) - * 1001|oopp|BBBB BBBB 8-bit Bitwise Operation??? * * ACT_LAYER_TAP(101x): * 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP] -- cgit v1.2.3-24-g4f1b From 3131d655638927fb1802c6526f7b9b7afff03a5e Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Thu, 26 Jan 2017 09:31:27 -0600 Subject: Add avrdude target --- keyboards/lets_split/rules.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 1aee5313c..0dc549130 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -73,3 +73,13 @@ USE_I2C ?= yes SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro then hit any key to continue..."; \ + read -n 1 -s; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude -- cgit v1.2.3-24-g4f1b From 890ecf6a2ae1e782cdcd7750572c339c1ad7bb3a Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Thu, 26 Jan 2017 09:31:40 -0600 Subject: Update readme --- keyboards/lets_split/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 6e296737a..a63ce5907 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -74,6 +74,10 @@ not be very difficult to adapt it to support more if required. Flashing -------- +From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. + +Example: `make rev2-serial-avrdude` + If you define `EE_HANDS` in your `config.h`, you will need to set the EEPROM for the left and right halves. The EEPROM is used to store whether the half is left handed or right handed. This makes it so that the same firmware -- cgit v1.2.3-24-g4f1b From fffe76a7b7e3a1da58fb8e948b33df1fd9cdbf63 Mon Sep 17 00:00:00 2001 From: Albert Pretorius Date: Thu, 26 Jan 2017 20:07:47 +0000 Subject: albert ergodox keymap --- keyboards/ergodox/keymaps/albert/Makefile | 5 + keyboards/ergodox/keymaps/albert/config.h | 12 + keyboards/ergodox/keymaps/albert/keymap.c | 661 +++++++++++++++++++++++++++++ keyboards/ergodox/keymaps/albert/readme.md | 188 ++++++++ 4 files changed, 866 insertions(+) create mode 100644 keyboards/ergodox/keymaps/albert/Makefile create mode 100644 keyboards/ergodox/keymaps/albert/config.h create mode 100644 keyboards/ergodox/keymaps/albert/keymap.c create mode 100644 keyboards/ergodox/keymaps/albert/readme.md diff --git a/keyboards/ergodox/keymaps/albert/Makefile b/keyboards/ergodox/keymaps/albert/Makefile new file mode 100644 index 000000000..eb8544afe --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/Makefile @@ -0,0 +1,5 @@ +COMMAND_ENABLE = no # Commands for debug and configuration + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/albert/config.h b/keyboards/ergodox/keymaps/albert/config.h new file mode 100644 index 000000000..e6d363117 --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* using UK layout for space-cadet-shift */ +#define LSPO_KEY KC_9 +#define RSPC_KEY KC_0 + +#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis + +#endif diff --git a/keyboards/ergodox/keymaps/albert/keymap.c b/keyboards/ergodox/keymaps/albert/keymap.c new file mode 100644 index 000000000..dfbb311bd --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/keymap.c @@ -0,0 +1,661 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#include + +/* use UK keymap */ + +#define UK_HASH KC_NONUS_HASH +#define UK_BSLS KC_NONUS_BSLASH +#define UK_PIPE LSFT(UK_BSLS) + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers and hex +#define CRSR 3 // cursor keys +#define MOUS 4 // mouse keys +#define KEYW 5 // keyword macros +#define EMAC 6 // emacs + +// my macros +#define UM_ECET M(0) // { } +#define UM_0x M(1) +#define UM_PUB M(2) +#define UM_PRO M(3) +#define UM_PRV M(4) +#define UM_CLS M(5) +#define UM_STR M(6) +#define UM_RET M(7) +#define UM_INC M(8) +#define UM_OBJ M(9) +#define UM_GITLOG M(10) +#define UM_GOODM M(11) +#define UM_NAMESP M(12) +#define UM_EMTR M(14) // emacs toggle read-only +#define UM_EMWR M(15) // emacs write buffer (save) +#define UM_EMUN M(16) // emacs undo +#define UM_EMRE M(17) // emacs redo +#define UM_EMPB M(18) // emacs previous buffer +#define UM_EMNB M(19) // emacs next buffer +#define UM_GOODN M(20) +#define UM_ECETS M(22) // { }; +#define UM_TMPL M(23) +#define UM_TYPN M(24) +#define UM_CONT M(25) +#define UM_BREAK M(26) +#define UM_CONST M(27) +#define UM_SMILY M(28) +#define UM_SADF M(29) +#define UM_SCARF M(30) +#define UM_DECAF M(31) +#define UM_OPER M(32) +#define UM_NULP M(33) +#define UM_EXTR M(34) +#define UM_VIRT M(35) +#define UM_EMFB M(36) // emacs font bigger +#define UM_EMFS M(37) // emacs font smaller +#define UM_VOLAT M(38) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2| + * |--------+------+------+------+------+------| L6 | | L6 |------+------+------+------+------+--------| + * | LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L2 | lead | | lead | Ins | + * ,------|------|------| |------+------+------. + * | Space| BkSp | Home | | PgUp | Enter|Space | + * | / | / |------| |------| / | / | + * | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | + * `--------------------' `--------------------' + */ +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), + LT(NUMB, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, LT(CRSR, KC_V), LT(MOUS, KC_B), MO(EMAC), + CTL_T(KC_LBRC), ALT_T(KC_RBRC), UK_HASH, KC_LEFT, KC_RGHT, + TG(NUMB), KC_LEAD, + KC_HOME, + CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END), + // right hand + LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT), + MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC), + KC_LEAD, KC_INS, + KC_PGUP, + LT(KEYW, KC_PGDN), ALT_T(KC_ENT), CTL_T(KC_SPC) + ), +/* Keymap 1: Symbol Layer with F keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## | + * |--------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ## | ## | | ## | ## | + * ,------|------|------| |------+------+------. + * | | | ## | | ## | | | + * | ## | ## |------| |------| ## | ## | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[SYMB] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS, + KC_TRNS, LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_MINS), UK_HASH, + KC_TRNS, UK_BSLS, UK_PIPE, KC_GRV, KC_MINS, KC_SLSH, 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 + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_MINS, KC_PLUS, KC_EQL, LSFT(KC_QUOT), LSFT(UK_HASH), KC_F12, + KC_LCBR, KC_RCBR, KC_SCLN, KC_QUOT, UK_HASH, KC_TRNS, + KC_TRNS, KC_LBRC, KC_RBRC, LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_SLSH), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 2: Numerics and hex + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## | + * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | = | + | 0 | , | . | | 0 | , | . | + | = | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ## | ## | | ## | ## | + * ,------|------|------| |------+------+------. + * | | | ## | | ## | | | + * | ## | ## |------| |------| ## | ## | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[NUMB] = KEYMAP( + // left hand + KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x, + KC_TRNS, KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS, + KC_EQL, KC_PLUS, KC_0, KC_COMM, KC_DOT, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS, + UM_0x, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_EQL, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 3: Cursor movement + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Left | Down | Right| | | | | | Left | Down | Right| + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | ## | ## |------| |------| ## | ## | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[CRSR] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO, + KC_NO, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + KC_TRNS, KC_UP, KC_NO, KC_DOWN, KC_TRNS, KC_NO, KC_NO, + KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_TRNS, KC_TRNS, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, KC_NO, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO, + KC_NO, KC_NO, KC_TRNS, KC_DOWN, KC_NO, KC_UP, KC_TRNS, + KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_TRNS, KC_TRNS + ), +/* Keymap 4: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MOUS] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, + KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_BTN1, KC_MS_U, KC_BTN2, KC_MS_D, KC_NO, KC_TRNS, KC_NO, + KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_TRNS, KC_NO, KC_MS_D, KC_BTN1, KC_MS_U, KC_BTN2, + KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO + ), +/* Keymap 5: Keywords + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | scarf| sadf | smily| | | | decaf| | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | str | obj | | gitl |------| |------| | | | nulp | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | inc | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | ecet | ecets| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[KEYW] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO, + KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO, + KC_NO, KC_NO, UM_STR, UM_OBJ, KC_NO, UM_GITLOG, + KC_NO, KC_NO, UM_EXTR, UM_CLS, UM_VIRT, UM_BREAK, KC_NO, + KC_NO, KC_NO, UM_INC, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_TRNS, + // right hand + KC_NO, UM_DECAF, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, UM_TYPN, UM_CONT, UM_PRV, UM_PRO, UM_PUB, KC_NO, + KC_NO, KC_NO, KC_NO, UM_NULP, KC_NO, KC_NO, + KC_NO, UM_NAMESP, UM_GOODM, UM_GOODN, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + UM_ECET, UM_ECETS, + KC_NO, + KC_TRNS, KC_NO, KC_NO + ), +/* Keymap 6: emacs + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | empb | | emnb | emfs | emfb | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | emtr | | | | | | | | emun | emre | w-up | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | emwr | | | |------| |------| |w-left|w-down|w-rght| | | + * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | | | | | | | | | | | |w-down| | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[EMAC] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB, + KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, UM_EMWR, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO, + // right hand + UM_EMNB, UM_EMFS, UM_EMFB, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, UM_EMUN, UM_EMRE, LSFT(KC_UP), KC_NO, KC_NO, KC_NO, + KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, LSFT(KC_DOWN), KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO + ), +}; + +enum next_key_down_up { + NK_DOWN_UP, + NK_DOWN, + NK_UP // a bit of a hack, this works as long as NK_UP < KC_A +}; + +void send_keystrokes(uint8_t key, ...) +{ + va_list vl; + va_start(vl, key); + enum next_key_down_up nkdu = NK_DOWN_UP; + while (key != KC_NO) { + if (key < KC_A) { + nkdu = key; + } else { + switch (nkdu) { + case NK_DOWN_UP: + register_code(key); + case NK_UP: + unregister_code(key); + break; + case NK_DOWN: + register_code(key); + } + nkdu = NK_DOWN_UP; + } + key = va_arg(vl, int); + } + va_end(vl); +} + +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) { + return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(UP), + T(TAB), END); + } + break; + case 1: + if (record->event.pressed) { + return MACRO(T(0), T(X), END); + } + break; + case 2: + if (record->event.pressed) { + SEND_STRING("public"); + } + break; + case 3: + if (record->event.pressed) { + SEND_STRING("protected"); + } + break; + case 4: + if (record->event.pressed) { + SEND_STRING("private"); + } + break; + case 5: // class + if (record->event.pressed) { + return MACRO(T(C), T(L), T(A), T(S), T(S), T(ENT), + D(LSFT), T(LBRC), U(LSFT), T(ENT), + T(P), T(U), T(B), T(L), T(I), T(C), + D(LSFT), T(SCLN), U(LSFT), T(ENT), T(ENT), + T(P), T(R), T(I), T(V), T(A), T(T), T(E), + D(LSFT), T(SCLN), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT), + T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), + T(END), T(SPC), END); + } + break; + case 6: // struct + if (record->event.pressed) { + return MACRO(T(S), T(T), T(R), T(U), T(C), T(T), T(ENT), + D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT), + T(UP), T(UP), T(UP), T(UP), + T(END), T(SPC), END); + } + break; + case 7: + if (record->event.pressed) { + SEND_STRING("return"); + } + break; + case 8: // #include + if (record->event.pressed) { + return MACRO(T(NONUS_HASH), T(I), T(N), T(C), T(L), T(U), T(D), T(E), END); + } + break; + case 9: + if (record->event.pressed) { + SEND_STRING("objdump -CT -x -d"); + } + break; + case 10: + if (record->event.pressed) { + SEND_STRING("git log --oneline --graph --decorate=short"); + } + break; + case 11: + if (record->event.pressed) { + SEND_STRING("good morning"); + } + break; + case 12: + if (record->event.pressed) { + SEND_STRING("namespace"); + } + break; + case 14: // emacs toggle read-only + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(Q), U(LCTL), END); + } + break; + case 15: // emacs write buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(S), U(LCTL), END); + } + break; + case 16: // emacs undo + if (record->event.pressed) { + return MACRO(D(LCTL), D(LSFT), T(MINS), U(LSFT), U(LCTL), END); + } + break; + case 17: // emacs redo + if (record->event.pressed) { + return MACRO(D(LALT), D(LSFT), T(MINS), U(LSFT), U(LALT), END); + } + break; + case 18: // emacs previous buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), U(LCTL), T(LEFT), END); + } + break; + case 19: // emacs next buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), U(LCTL), T(RGHT), END); + } + break; + case 20: + if (record->event.pressed) { + SEND_STRING("good night"); + } + break; + case 22: // { }; + if (record->event.pressed) { + return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(UP), + T(TAB), END); + } + break; + case 23: + if (record->event.pressed) { + SEND_STRING("template"); + } + break; + case 24: + if (record->event.pressed) { + SEND_STRING("typename"); + } + break; + case 25: + if (record->event.pressed) { + SEND_STRING("continue"); + return MACRO(T(SCLN), END); + } + break; + case 26: + if (record->event.pressed) { + SEND_STRING("break"); + return MACRO(T(SCLN), END); + } + break; + case 27: + if (record->event.pressed) { + SEND_STRING("const"); + } + break; + case 28: + if (record->event.pressed) { + SEND_STRING(":-)"); + } + break; + case 29: + if (record->event.pressed) { + SEND_STRING(":-("); + } + break; + case 30: // dazed + if (record->event.pressed) { + send_keystrokes(NK_DOWN, KC_LSFT, KC_8, KC_MINS, KC_8, NK_UP, KC_LSFT, KC_NO); + } + break; + case 31: // decaf + if (record->event.pressed) { + send_keystrokes(NK_DOWN, KC_LSFT, KC_C, KC_9, KC_MINS, KC_0, NK_UP, KC_LSFT, KC_NO); + } + break; + case 32: + if (record->event.pressed) { + SEND_STRING("operator"); + } + break; + case 33: + if (record->event.pressed) { + SEND_STRING("nullptr"); + } + break; + case 34: + if (record->event.pressed) { + SEND_STRING("extern"); + } + break; + case 35: + if (record->event.pressed) { + SEND_STRING("virtual"); + } + break; + case 36: // emacs font smaller + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(EQL), U(LCTL), END); + } + break; + case 37: // emacs font bigger + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(MINS), U(LCTL), END); + } + break; + case 38: + if (record->event.pressed) { + SEND_STRING("volatile"); + } + break; + } + return MACRO_NONE; +} + +LEADER_EXTERNS(); + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_TWO_KEYS(KC_G, KC_A) { + SEND_STRING("git add ."); + } + SEQ_TWO_KEYS(KC_G, KC_D) { + SEND_STRING("git diff"); + } + SEQ_THREE_KEYS(KC_G, KC_D, KC_S) { + SEND_STRING("git diff --staged"); + } + SEQ_TWO_KEYS(KC_G, KC_L) { + SEND_STRING("git log"); + } + SEQ_THREE_KEYS(KC_G, KC_L, KC_O) { + SEND_STRING("git log --oneline"); + } + SEQ_TWO_KEYS(KC_G, KC_F) { + SEND_STRING("git fetch"); + } + SEQ_TWO_KEYS(KC_G, KC_O) { + SEND_STRING("git checkout"); + } + SEQ_TWO_KEYS(KC_G, KC_P) { + SEND_STRING("git pull"); + } + SEQ_TWO_KEYS(KC_G, KC_S) { + SEND_STRING("git status"); + } + SEQ_TWO_KEYS(KC_G, KC_C) { + SEND_STRING("git commit -m ''"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_THREE_KEYS(KC_G, KC_C, KC_A) { + SEND_STRING("git commit --amend"); + } + + SEQ_TWO_KEYS(KC_C, KC_C) { + SEND_STRING("const_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_D) { + SEND_STRING("dynamic_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_R) { + SEND_STRING("reinterpret_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_S) { + SEND_STRING("static_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + + SEQ_ONE_KEY(KC_SLSH) { + send_keystrokes(KC_SLSH, NK_DOWN, KC_LSFT, KC_8, KC_8, NK_UP, KC_LSFT, KC_ENT, + NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_ENT, + NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_SLSH, KC_UP, KC_END, KC_SPC, + KC_NO); + } + } +} diff --git a/keyboards/ergodox/keymaps/albert/readme.md b/keyboards/ergodox/keymaps/albert/readme.md new file mode 100644 index 000000000..e20e047ac --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/readme.md @@ -0,0 +1,188 @@ +# ErgoDox EZ Configuration for typing like a boss. + +This layout has 7 layers: +0. Base layers +1. Symbols and F-keys +2. Number pad (with hexadecimal) +3. Cursor keys +4. Mouse movement and clicks +5. Keyword macros +6. Emacs + +There are also some leader keys defined for frequently used commands (git etc). + +## The layers + +Double hashes (`##`) indicate transparent keys (`KC_TRNS`) and blanks indicate no key (`KC_NO`). + +### 0. Base layer + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp | +|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------| +| Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2| +|--------|------|------|------|------|------| L6 | | L6 |------|------|------|------|------|--------| +| LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | L2 | lead | | lead | Ins | + ,------|------|------| |------|------|------. + | Space| BkSp | Home | | PgUp | Enter|Space | + | / | / |------| |------| / | / | + | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | + `--------------------' `--------------------' +``` + +Space Cadet shift is enabled. Ctrl and Alt doubles up as normal keys when tapped. +SfLt and SfRt sends Shift + left and Shift + Right respectively - for use with emacs with `windmove-default-keybindings`. +Caps and Enter may be held down to activate layer 2 (hexadecimal number pad). +Please see `matrix_scan_user` function in `keymap.c` for list of commands available via `lead` key. + +### 1. Symbols and F-keys + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 | +|--------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## | +|--------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | ## | ## | | ## | ## | + ,------|------|------| |------|------|------. + | | | ## | | ## | | | + | ## | ## |------| |------| ## | ## | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` + +### 2. Number pad (with hexadecimal) + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## | +|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | = | + | 0 | , | . | | 0 | , | . | + | = | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | ## | ## | | ## | ## | + ,------|------|------| |------|------|------. + | | | ## | | ## | | | + | ## | ## |------| |------| ## | ## | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` + +### 3. Cursor keys + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | Left | Down | Right| | | | | | Left | Down | Right| + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | ## | ## |------| |------| ## | ## | + | | | | | | | | + `--------------------' `--------------------' +``` + +### 4. Mouse movement and clicks + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------| +| | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +### 5. Keyword macros + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | scarf| sadf | smily| | | | decaf| | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | str | obj | | gitl |------| |------| | | | nulp | | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | | | inc | | | | | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | ecet | ecets| + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` +Please see `keymap.c` for the keywords/commands. +Some are const, volatile, operator, return, template, typename, continue, private, +protected, public, struct, class, extern, virtual, break, namespace. +Also a git log command I use a lot (`git log --oneline --graph --decorate=short` (I know git can be configured but that is boring)). + +### 6. Emacs + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | empb | | emnb | emfs | emfb | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | emtr | | | | | | | | emun | emre | w-up | | | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | emwr | | | |------| |------| |w-left|w-down|w-rght| | | +|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| | | | | | | | | | | |w-down| | | | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | | | | | | | | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` +Some emacs shortcuts like toggle read/write mode (emtr), write file (emwr), previous-buffer (empb), +next-buffer (emnb), smaller font(emfs), larger font (emfb), undo (emun), redo (emre) and switching between windows in a frame. -- cgit v1.2.3-24-g4f1b From cfc4149712217625fcb75e50348094fd9df432f5 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Fri, 27 Jan 2017 10:28:42 +1100 Subject: Add ability to use tap macros without using functions --- quantum/keymap_common.c | 5 ++++- quantum/quantum_keycodes.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index eced3d2bb..5190f24e8 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); break; case QK_MACRO ... QK_MACRO_MAX: - action.code = ACTION_MACRO(keycode & 0xFF); + if (keycode & 0x800) // tap macros have upper bit set + action.code = ACTION_MACRO_TAP(keycode & 0xFF); + else + action.code = ACTION_MACRO(keycode & 0xFF); break; case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4853655f9..4566395fd 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -246,6 +246,7 @@ enum quantum_keycodes { #define M(kc) (kc | QK_MACRO) +#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) // L-ayer, T-ap - 256 keycode max, 16 layer max -- cgit v1.2.3-24-g4f1b From 13fa63b19223fea024fc6a395041ecc2419caa1d Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Fri, 27 Jan 2017 13:53:02 +0100 Subject: [deadcyclo layout] Added more unicode keys and ibus unicode compose trigger keys --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 96046 -> 79488 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 55517 -> 58886 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 42 ++++++++++----------- keyboards/ergodox/keymaps/deadcyclo/readme.md | 7 +++- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index a70e37559..2c03af581 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index e60c3e59e..c8c90cf5c 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 7578c723d..bfbf17be1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 | + * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | UNI | ~/L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | Home | | PgUp | Ins | @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT, + LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, KC_END, KC_SPC,KC_TAB,KC_LBRC, @@ -74,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD), + KC_LALT, KC_RALT,KC_LBRC,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, KC_RBRC,KC_BSPC, KC_ENT ), -/* Keymap 1: Symbol Layer +/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U)) * * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -166,18 +166,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 3: Unicode * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | VER | | | | | | | | | | | | | | + * | | ┌ | ┐ | └ | ┘ | │ | ─ | | ╔ | ╗ | ╚ | ╝ | ║ | ═ | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | | + * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | █ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | | + * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | ░ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | | | | | | + * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | ☐ | ☑ | ☒ | ✓ | ▄ | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | smrk1| smrk2| love | | | | | | | | + * | | smrk1| smrk2| love | VER | | ✔ | ✗ | ✘ | ● | ▀ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * | | | | ▒ | ▓ | * ,------|------|------| |------+------+------. * | | | | | | | | * | | |------| |------| | | @@ -186,23 +186,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // Unicode [NAVG] = KEYMAP( - KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, - KC_TRNS, SMRK1, SMRK2, LOVE, KC_TRNS, - KC_TRNS, KC_TRNS, + KC_TRNS, SMRK1, SMRK2, LOVE, VRSN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, - UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), KC_TRNS, - KC_TRNS, UC(0x2764), KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS + UC(0x2554), UC(0x2557), UC(0x255a), UC(0x255d), UC(0x2551), UC(0x2550), KC_TRNS, + KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), UC(0x2588), + UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), UC(0x2591), + KC_TRNS, UC(0x2764), UC(0x2610), UC(0x2611), UC(0x2612), UC(0x2713), UC(0x2584), + UC(0x2714), UC(0x2717), UC(0x2718), UC(0x25cf), UC(0x2580), + UC(0x2592), UC(0x2593), + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 2ca5e822c..fa41f0ec1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -28,6 +28,10 @@ TOG, are dual purpose. Hence for example the top left key produces ESC if tapped, and temporarilly toggles L3 when hold down. The two center L1 TOG keys toggle L1 on and off for more permanent layer toggling. +The UNI keys enter the linux ibus unicode composer mode +(ie. Ctrl+Shift+u). Use this to enter unicode characters. Hit the key, +type in the unicode hex value, and hit enter. + ## Layer 1 - Symbols and RGB [![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) @@ -58,12 +62,11 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 - 25.01.2017 Added lots of new emojis and some unicode keys +- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U) # TODO -- Add support for unicode by name? (See algernon layout for example) - Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) - Make macros for gnu screen and i3wm - Look into the app launch macros in algernon keymap -- Make other smileys like shrug and yay ¯\_(ツ)_/¯ and \o/ and others (see amon others [http://dongerlist.com](http://dongerlist.com) -- cgit v1.2.3-24-g4f1b From 8c794d73fa75fa2f3f985617a2b566974f3b29bf Mon Sep 17 00:00:00 2001 From: folkert4 Date: Fri, 27 Jan 2017 13:51:39 -0500 Subject: Added Espynn's keymap --- keyboards/planck/keymaps/espynn/Makefile | 63 +++++ .../planck/keymaps/espynn/keyboard-layout.jpg | Bin 0 -> 52908 bytes keyboards/planck/keymaps/espynn/keymap.c | 151 ++++++++++++ keyboards/planck/keymaps/espynn/layout.json | 271 +++++++++++++++++++++ keyboards/planck/keymaps/espynn/readme.md | 18 ++ 5 files changed, 503 insertions(+) create mode 100644 keyboards/planck/keymaps/espynn/Makefile create mode 100644 keyboards/planck/keymaps/espynn/keyboard-layout.jpg create mode 100644 keyboards/planck/keymaps/espynn/keymap.c create mode 100644 keyboards/planck/keymaps/espynn/layout.json create mode 100644 keyboards/planck/keymaps/espynn/readme.md diff --git a/keyboards/planck/keymaps/espynn/Makefile b/keyboards/planck/keymaps/espynn/Makefile new file mode 100644 index 000000000..44a030ba3 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/Makefile @@ -0,0 +1,63 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk 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. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg new file mode 100644 index 000000000..55e5396bf Binary files /dev/null and b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg differ diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c new file mode 100644 index 000000000..4a3fe32b8 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -0,0 +1,151 @@ +#include "planck.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif +#define PREVENT_STUCK_MODIFIERS +extern keymap_config_t keymap_config; + +// Symbolic names for macro IDs. +#define _QWERTY 0 // QUERTY layer +#define _LOWER 1 // Lower layer +#define _RAISE 2 // Raise layer +#define _CUSTOM 3 // Custom layer (LOWER + RAISE) +#define _BL 4 // Backlight +#define _CUS0 5 // Mobile# +#define _CUS1 6 // signature +#define _CUS2 7 // macro 2 +#define _CUS3 8 // macro 3 +#define _CUS4 9 // macro 4 +#define _CUS5 10 // email +#define _COPY 11 // copy +#define _PASTE 12 // paste +#define _CUT 13 // cut + +// Macro shortcuts. +#define QWERTY M(_LOWER) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) +#define CUSTOM M(_CUSTOM) +#define BL M(_BL) +#define CUS0 M(_CUS0) +#define CUS1 M(_CUS1) +#define CUS2 M(_CUS2) +#define CUS3 M(_CUS3) +#define CUS4 M(_CUS4) +#define CUS5 M(_CUS5) +#define COPY M(_COPY) +#define PASTE M(_PASTE) +#define CUT M(_CUT) + +// Func macro definitions. +#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER +#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE +#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) +#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift +#define ZM_NRM FUNC(4) // Zoom normal +#define ZM_IN FUNC(5) // Zoom out +#define ZM_OUT FUNC(6) // Zoom in + +// Enable these functions using FUNC(n) macro. +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), + [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), + [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), + [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), + [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), + [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), + [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), + }; + +// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = { /* QWERTY */ + {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_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, + {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, +[_LOWER] = { /* LOWER */ + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +[_RAISE] = { /* RAISE */ + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, +[_CUSTOM] = { /* CUSTOM */ + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {BL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +} +}; + +// Set a layer persistantly. +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Macro actions for each corresponding ID. +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _RAISE: // Raised layer. + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } + break; + case _LOWER: // Lowered layer. + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _CUSTOM); + } + break; + case _BL: // Backlight + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } else { + unregister_code(KC_RSFT); + } + break; + case _CUS0: // enter your mobile# here + return MACRODOWN(T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(9),END); + case _CUS1: // signature line for email + return MACRODOWN(T(ENT), T(ENT), T(MINS), T(J), T(W), END); + case _CUS2: // Custom macro 2 + return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_L), UP(KC_LSFT), END ); + case _CUS3: // custom macro 3 + return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_F), UP(KC_LSFT), END ); + case _CUS4: // custom macro 4 + return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END ); + case _CUS5: // Enter your email here + return MACRODOWN( TYPE(KC_F), + DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT), + TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END ); + case _CUT: //cut macro + return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END ); + case _COPY: // copy macro + return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END ); + case _PASTE: // paste macro + return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END ); + }; + return MACRO_NONE; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json new file mode 100644 index 000000000..38ccc3452 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/layout.json @@ -0,0 +1,271 @@ +[ + { + "backcolor": "#858585", + "name": "Planck 40%", + "author": "James Folkert", + "background": { + "name": "Aluminium brushed", + "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');" + }, + "switchMount": "cherry", + "switchBrand": "cherry", + "switchType": "MX1A-A1xx", + "pcb": true, + "plate": true + }, + [ + { + "fa": [ + 2, + 2, + 0, + 2 + ] + }, + "F1\n1\n\n!\n\n\n\n\n\n", + "F2\n2\n\n@\n\n\n\n\n\nQ", + "F3\n3\n\n#\n\n\n\n\n\nW", + "F4\n4\n\n$\n\n\n\n\n\nE", + "F5\n5\n\n%\n\n\n\n\n\nR", + "F6\n6\n\n^\n\n\n\n\n\nT", + "F7\n6\n\n&\n\n\n\n\n\nY", + "F8\n8\n\n*\nMacro4\n\n\n\n\nU", + "F9\n9\n\n(\n\n\n\n\n\nI", + { + "fa": [ + 0, + 0, + 0, + 2 + ] + }, + "F10\n0\n\n)\n\n\n\n\n\nO", + { + "fa": [ + 2, + 2, + 0, + 2 + ] + }, + "F11\n-\n\n_\n\n\n\n\n\nP", + "F12\n=\n\n+\n\n\n\n\n\n" + ], + [ + { + "a": 7, + "f": 3 + }, + "", + { + "f": 3 + }, + "A", + { + "f": 3 + }, + "S", + { + "f": 3 + }, + "D", + { + "t": "#ff0000", + "a": 4, + "f": 3 + }, + "\n(\n\n\n\n\n\n\n\nF", + { + "t": "#000000", + "f": 3 + }, + "\n)\n\n\n\n\n\n\n\nG", + { + "f": 3 + }, + "\n{\n\n\nMacro0\n\n\n\n\nH", + { + "t": "#ff0000", + "f": 3 + }, + "\n}\n\n\nMacro3\n\n\n\n\nJ", + { + "t": "#000000", + "f": 3 + }, + "{\n\n\n\n\n\n\n\n\nK", + { + "f": 3 + }, + "{\n\n\n\n\n\n\n\n\nL", + { + "fa": [ + 2, + 2, + 2, + 2, + 0, + 0, + 0, + 2 + ] + }, + "\\\n\n|\n\n\n\n\n:\n\n;", + { + "a": 7, + "fa": [ + 9 + ] + }, + "" + ], + [ + { + "f": 3 + }, + "Shift", + { + "f": 3 + }, + "Z", + { + "f": 3 + }, + "X\n\n\n\nCut", + { + "f": 3 + }, + "C\n\n\n\nCopy", + { + "a": 4, + "fa": [ + 2, + 2, + 2, + 2 + ] + }, + "\\\n[\n|\n{\nPaste\n\n\n\n\nV", + "|\n]\n\n}\nMacro1\n\n\n\n\nB", + "`\n'\n~\n\"\nMacro5\n\n\n\n\nN", + "~\n\"\n\n\nMacro2\n\n\n\n\nM", + { + "fa": [ + 2, + 2, + 2, + 2, + 0, + 0, + 0, + 1 + ] + }, + "[\n\n{\n\n\n\n\n<\n\n,", + "[\n\n{\n\n\n\n\n\n\n.", + { + "a": 6 + }, + "\n\n?\n\n\n\n\n\n/", + { + "a": 4, + "fa": [ + 2, + 2, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 0 + ] + }, + "\n\n\nShift\n\n\n\n\n\n\nShift" + ], + [ + { + "a": 7, + "f": 3 + }, + "Ctrl\n\n\n\nBLight", + { + "a": 4, + "fa": [ + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 9 + ] + }, + "\nZNorm\n\n\nRESET\n\n\n\n\n", + { + "fa": [ + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 6 + ] + }, + "\nZIn\n\n\n\n\n\n\n\n", + { + "fa": [ + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 1, + 9, + 9 + ] + }, + "\nZOut\n\n\n\n\n\n\n\n", + { + "a": 7, + "fa": [ + 9 + ] + }, + "⇓", + { + "a": 4, + "fa": [ + 9, + 5, + 5 + ], + "w": 2 + }, + "\n\n", + { + "a": 7 + }, + "⇑", + { + "a": 4, + "fa": [ + 2 + ] + }, + "\n\n\n\n\n\n\n\n\n←", + "\n\n\n\n\n\n\n\n\n↓", + "\n\n\n\n\n\n\n\n\n↑", + "\n\n\n\n\n\n\n\n\n→" + ] +] \ No newline at end of file diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md new file mode 100644 index 000000000..8882f4601 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/readme.md @@ -0,0 +1,18 @@ +# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard +Created by James Folkert: https://twitter.com/trekloFsemaJ +Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c + + +![Layout](keyboard-layout.png "Practical Keymap") + + +* Online keyboard layout editor: http://www.keyboard-layout-editor.com/ +* [JSON of raw layout] (layout.json "JSON of raw layout") + +# Notes +* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here +* I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4 +* add your mobile and email to the keymap before make +* RAISE and LOWER also acts as PgUp and PgDn when tapped. +* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works) +* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 2fe18a50ecddd5b8a8783f7185ad48b2e80d6bc0 Mon Sep 17 00:00:00 2001 From: Potiguar Faga Date: Fri, 27 Jan 2017 18:22:44 -0200 Subject: Clarify license on abnt2 keymap (#1038) --- quantum/keymap_extras/keymap_br_abnt2.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/quantum/keymap_extras/keymap_br_abnt2.h b/quantum/keymap_extras/keymap_br_abnt2.h index 0df177721..b001139dd 100644 --- a/quantum/keymap_extras/keymap_br_abnt2.h +++ b/quantum/keymap_extras/keymap_br_abnt2.h @@ -1,3 +1,19 @@ +/* Copyright 2017 Potiguar Faga + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef KEYMAP_BR_ABNT2_H #define KEYMAP_BR_ABNT2_H -- cgit v1.2.3-24-g4f1b From 321904b8e38e35e7db8a19488ee96456f6393672 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 01:37:59 -0500 Subject: Improve Planck keymap - added escape+shift mod-tap key - replaced BRITE with backtick --- keyboards/planck/keymaps/smt/keymap.c | 15 ++++++--------- keyboards/planck/keymaps/smt/readme.md | 29 +++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 47e9d8c70..51e5a40bf 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -1,6 +1,3 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - #include "planck.h" #include "action_layer.h" #ifdef AUDIO_ENABLE @@ -42,14 +39,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {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_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {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_MINS}, + {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Qwerty @@ -60,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md index 52d702df0..0e955a574 100644 --- a/keyboards/planck/keymaps/smt/readme.md +++ b/keyboards/planck/keymaps/smt/readme.md @@ -14,6 +14,16 @@ Notable differences from the default are: Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! +3. Escape + + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + +4. Backtick + + I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + + So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. + ## Dvorak (default) ``` @@ -24,7 +34,7 @@ Notable differences from the default are: |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -38,7 +48,7 @@ Notable differences from the default are: |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -76,3 +86,18 @@ I haven't completely filled this layer, which leaves room for future mappings an `-----------------------------------------------------------------------------------' ``` +## Adjust (Lower + Raise) + +Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. + +``` +,-----------------------------------------------------------------------------------. +| | Reset| | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3-24-g4f1b From 7c24ecf580471f7b0d360dd115d6730adf6e59d8 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 01:38:58 -0500 Subject: Carry over Planck updates to my Preonic keymap --- keyboards/preonic/keymaps/smt/keymap.c | 30 +++++++++++------------ keyboards/preonic/keymaps/smt/readme.md | 42 +++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 5465d543a..ba05d9ad5 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -1,9 +1,9 @@ #include "preonic.h" #include "action_layer.h" -#include "eeconfig.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif +#include "eeconfig.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. @@ -33,39 +33,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * | 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 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {KC_GRV, 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_GRV, 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_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_MINS}, + {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Qwerty * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * | 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 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______}, {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} @@ -98,9 +98,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | _ | + | { | } | | | + * | | | | | | | _ | ? | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | - | = | [ | ] | \ | + * | | | | | | | - | / | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = { {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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 2dcc1927f..393d9d3e3 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,17 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +3. Escape + + I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency... + +4. Backtick + + I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer. + + So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me. ## Dvorak (default) @@ -20,13 +30,13 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | / | +| Tab | " | , | . | P | Y | F | G | C | R | L | Bkps | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | O | E | U | I | D | H | T | N | S | - | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -36,13 +46,13 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +| 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 | |------+------+------+------+------+------+------+------+------+------+------+------| -| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | `-----------------------------------------------------------------------------------' ``` @@ -76,10 +86,28 @@ I haven't completely filled this layer, which leaves room for future mappings an |------+------+------+------+------+-------------+------+------+------+------+------| | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | | | | | | | _ | + | { | } | | | +| | | | | | | _ | ? | + | { | } | | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | | | | | | | - | = | [ | ] | \ | +| | | | | | | - | / | = | [ | ] | \ | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' ``` + +## Adjust (Lower + Raise) + +Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings. + +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Reset| | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3-24-g4f1b From a3357d078ee80123040679a357f63e93ff24c4c6 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Sat, 28 Jan 2017 18:42:35 +1100 Subject: Add support for various tapping macros A macro key can now be easily set to act as a modifier on hold, and press a shifted key when tapped. Or to switch layers when held, and again press a shifted key when tapped. Various other helper defines have been created which send macros when the key is pressed, released and tapped, cleaning up the action_get_macro function inside keymap definitions. The layer switching macros require a GCC extension - 'compound statements enclosed within parentheses'. The use of this extension is already present within the macro subsystem of this project, so its use in this commit should not cause any additional issues. MACRO_NONE had to be cast to a (macro_t*) to suppress compiler warnings within some tapping macros. --- quantum/quantum_keycodes.h | 1 + tmk_core/common/action_macro.h | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4566395fd..e0d469561 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -249,6 +249,7 @@ enum quantum_keycodes { #define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) + // L-ayer, T-ap - 256 keycode max, 16 layer max #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) diff --git a/tmk_core/common/action_macro.h b/tmk_core/common/action_macro.h index aedc32ec6..f373f5068 100644 --- a/tmk_core/common/action_macro.h +++ b/tmk_core/common/action_macro.h @@ -20,11 +20,33 @@ along with this program. If not, see . #include "progmem.h" -#define MACRO_NONE 0 + +typedef uint8_t macro_t; + +#define MACRO_NONE (macro_t*)0 #define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) #define MACRO_GET(p) pgm_read_byte(p) -typedef uint8_t macro_t; +// Sends press when the macro key is pressed, release when release, or tap_macro when the key has been tapped +#define MACRO_TAP_HOLD(record, press, release, tap_macro) ( ((record)->event.pressed) ? \ + ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? (press) : MACRO_NONE ) : \ + ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (tap_macro) : (release) ) ) + +// Holds down the modifier mod when the macro key is held, or sends macro instead when tapped +#define MACRO_TAP_HOLD_MOD(record, macro, mod) MACRO_TAP_HOLD(record, (MACRO(D(mod), END)), MACRO(U(mod), END), macro) + +// Holds down the modifier mod when the macro key is held, or pressed a shifted key when tapped (eg: shift+3 for #) +#define MACRO_TAP_SHFT_KEY_HOLD_MOD(record, key, mod) MACRO_TAP_HOLD_MOD(record, (MACRO(I(10), D(LSFT), T(key), U(LSFT), END)), mod) + + +// Momentary switch layer when held, sends macro if tapped +#define MACRO_TAP_HOLD_LAYER(record, macro, layer) ( ((record)->event.pressed) ? \ + ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? ({layer_on((layer)); MACRO_NONE; }) : MACRO_NONE ) : \ + ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : ({layer_off((layer)); MACRO_NONE; }) ) ) + +// Momentary switch layer when held, presses a shifted key when tapped (eg: shift+3 for #) +#define MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, key, layer) MACRO_TAP_HOLD_LAYER(record, MACRO(I(10), D(LSFT), T(key), U(LSFT), END), layer) + #ifndef NO_ACTION_MACRO -- cgit v1.2.3-24-g4f1b From 77e54e34e129a03e58c128171a7188978ec908b4 Mon Sep 17 00:00:00 2001 From: Luke Silva Date: Sat, 28 Jan 2017 18:43:41 +1100 Subject: Add luke keymap, as an example of the tapping macros --- keyboards/planck/keymaps/luke/Makefile | 25 +++ keyboards/planck/keymaps/luke/keymap.c | 355 ++++++++++++++++++++++++++++++++ keyboards/planck/keymaps/luke/readme.md | 2 + 3 files changed, 382 insertions(+) create mode 100644 keyboards/planck/keymaps/luke/Makefile create mode 100644 keyboards/planck/keymaps/luke/keymap.c create mode 100644 keyboards/planck/keymaps/luke/readme.md diff --git a/keyboards/planck/keymaps/luke/Makefile b/keyboards/planck/keymaps/luke/Makefile new file mode 100644 index 000000000..847686873 --- /dev/null +++ b/keyboards/planck/keymaps/luke/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c new file mode 100644 index 000000000..26dcb451b --- /dev/null +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -0,0 +1,355 @@ +/* + * A keyboard layout for the gridded planck. + * + * Copyright (C) 2017 Luke Silva + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + * + * This layout uses colemak by default, and is designed for programming, with easy access to symbols + * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters + * Eg: compare colemak 'this' to '(){\n}' on the symbol layer. + * + * The layout also supports a range of multilingual characters, covering those + * needed for French, German, Swedish and likely some other European Languages. + * In the future full support for Colemak's multilingual deadkeys may be introduced. + * + * The multilingual characters are inputted through QMK's unicode engine, using + * the Linux input method by default, however this can be changed at runtime. + * + */ + + +#include "planck.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +// Layers +#define _COLEMAK 0 +#define _QWERTY 1 +#define _SYM 2 +#define _NUM 3 +#define _GR 4 +#define _GR_S 5 +#define _ADJ 6 +#define _NAV 7 +#define _PLOVER 8 + +// Macro ID numbers +#define M_ALT_HASH 1 +#define M_GR_DASH 2 +#define M_SYM_LPRN 3 +#define M_NAV_UNDS 4 +#define M_NUM_RPRN 5 +#define M_CTRL_DLR 6 +#define M_LCBR_ENT 7 +#define M_PLOVER 8 +#define M_EXT_PLV 9 +#define M_WINDOWS 10 +#define M_LINUX 11 +#define M_OSX 12 +#define M_FUNCTION 13 +#define M_THEN 14 +#define M_CATCH 15 + +// Macro keys +#define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt +#define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name +#define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if() +#define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable +#define NUM_RPRN MACROTAP(M_NUM_RPRN) // tap for ), hold for numbers layer else if() +#define CTRL_DLR MACROTAP(M_CTRL_DLR) // tap for $, hold for ctrl $php_is_really_weird +#define LCBR_ENT M(M_LCBR_ENT) // {\n easier code formatting +#define PLOVER M(M_PLOVER) // PHROPB (plover) or ERFVIK(qwerty) starts plover +#define EXT_PLV M(M_EXT_PLV) // PHRO*F (plover) or ERFVYU(qwerty) stops plover +#define WINDOWS M(M_WINDOWS) // Sets Unicode handler to windows +#define LINUX M(M_LINUX) // Sets Unicode handler to linux +#define OSX M(M_OSX) // Sets Unicode handler to OSX +#define FUNCTION M(M_FUNCTION) +#define THEN M(M_THEN) +#define CATCH M(M_CATCH) + + +// Renames of QMK keys... (would have otherwise been a macro) +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) + + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ;: | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | A | R | S | T | D | H | N | E | I | O | '" | + * |------+------+------+------+------+------+------+------+------+------+------+------`---. + * |Shift=| Z | X | C | V | B | K | M | ,< | .> | /? |Shift/Ent | + * |------+------+------+------+------+------+------+------+------+------+------+----------| + * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle| + * `---------------------------------------------------------------------------------------' + */ + +[_COLEMAK] = { + {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_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, + {CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)} +}, + + + +/* QWERTY + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | A | S | D | F | G | H | J | K | L | ;: | '" | + * |------+------+------+------+------+------+------+------+------+------+------+------`---. + * |Shift=| Z | X | C | V | B | N | M | ,< | .> | /? |Shift/Ent | + * |------+------+------+------+------+------+------+------+------+------+------+----------| + * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle| + * `---------------------------------------------------------------------------------------' + */ + +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, + {CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} +}, + + +/* Symbols + * ,-----------------------------------------------------------------------------------. + * | Tab | ` | @ | / | * | ^ | % | : | + | - | Del | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | [ | ; | } | ( | " | ' | ) | {\n | ! | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Shift | . | { | < | > | ~ | X2 | = | & | | | ? |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Sym | _ |Space | NUM | X2 | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_SYM] = { + {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC}, + {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS}, + {KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT }, + {THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______} +}, + + +/* Numbers + * ,-----------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | x | D | E | F | + | - | 4 | 5 | 6 | 0 |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Shift | ( | A | B | C | * | / | 1 | 2 | 3 | ) |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | GR | SYM | _ |Space | NUM | 0 | . | f | | + * `-----------------------------------------------------------------------------------' + */ + +[_NUM] = { + {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT }, + {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______} +}, + + +/* Gr layer / international keys + * ,-----------------------------------------------------------------------------------. + * | | ä | å | | ¢£ | €¥ | | ë | ê | ü | ù | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | â | à | ß | | | | è | é | ï | ö | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | æ | ô | ç | œ | | | û | « | » | î | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_GR] = { + {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______}, + {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______}, + {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +// Shifted layer of the above +[_GR_S] = { + {_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______}, + {_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______}, + {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + + +/* Adjust Layer (Gr + Num) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+-------------+------+------+------+------+------+------+------+------+------| + * | | |Prntscr| ESC |VOLUP | PLAY | PREV |QWERTY|COLEMAK|PLOVER| | | + * |------+-------------+------+------+------+------+------+------+------+------+------| + * | | |BACKLIT| INS |VOLDWN| MUTE | NEXT | WIND |LINUX | OSX | | | + * |------+-------------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_ADJ] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, + {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + + +/* Navigation + * ,-----------------------------------------------------------------------------------. + * | | | BTN3 | BTN2 | BTN1 | | ACL0 | HOME | PGDN | PGUP | END | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |MSLEFT| MSDN | MSUP |MSRGHT| | ACL1 | LEFT | DOWN | UP | RGHT |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |WHLEFT| WHDN | WHUP |WHRGHT| | ACL2 |C-LEFT|C-PGDN|C-PGUP|C-RGHT|Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV| + * `-----------------------------------------------------------------------------------' + */ + +[_NAV] = { + {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC}, + {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT }, + {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______} +}, + +/* Plover Layer + * ,-----------------------------------------------------------------------------------. + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | # | A | O | E | U | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +} + + +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + + +void matrix_init_user(){ + set_unicode_input_mode(UC_LNX); +} + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case M_ALT_HASH: + return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 3, LALT); + case M_GR_DASH: + { + const macro_t* macro = MACRO_TAP_HOLD_LAYER(record, MACRO(T(MINS)), _GR); + update_tri_layer(_NUM, _GR, _ADJ); + return macro; + } + case M_SYM_LPRN: + return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 9, _SYM); + case M_NAV_UNDS: + return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, MINS, _NAV); + case M_NUM_RPRN: + { + const macro_t* macro = MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 0, _NUM); + update_tri_layer(_NUM, _GR, _ADJ); + return macro; + } + case M_CTRL_DLR: + return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 4, LCTL); + case M_LCBR_ENT: + return MACRODOWN(I(10), D(LSFT), T(LBRC), U(LSFT), T(ENT), END); + case M_PLOVER: + if (record->event.pressed) { + layer_and(0); + layer_on(_PLOVER); + default_layer_set(_PLOVER); + + // Starts plover + return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END); + } + break; + case M_EXT_PLV: + if (!record->event.pressed) { + layer_off(_PLOVER); + default_layer_set(_COLEMAK); + + //Pauses plover + return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END); + } + break; + case M_WINDOWS: + set_unicode_input_mode(UC_WIN); + break; + case M_LINUX: + set_unicode_input_mode(UC_LNX); + break; + case M_OSX: + set_unicode_input_mode(UC_OSX); + break; + case M_FUNCTION: + if (record->event.pressed) { + SEND_STRING("function"); + } + break; + case M_THEN: + if (record->event.pressed) { + SEND_STRING("then"); + } + break; + case M_CATCH: + if (record->event.pressed) { + SEND_STRING("catch"); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/planck/keymaps/luke/readme.md b/keyboards/planck/keymaps/luke/readme.md new file mode 100644 index 000000000..3a4824b5b --- /dev/null +++ b/keyboards/planck/keymaps/luke/readme.md @@ -0,0 +1,2 @@ +# A more basic Planck Layout for copying + -- cgit v1.2.3-24-g4f1b From 1d9e0b0120d0467b6f7ff146911f01b7c701fb93 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Sat, 28 Jan 2017 20:54:34 -0500 Subject: s/Bkps/Bksp --- keyboards/preonic/keymaps/smt/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index 393d9d3e3..016da7b01 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -30,7 +30,7 @@ Notable differences from the default are: ,-----------------------------------------------------------------------------------. | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | |------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | " | , | . | P | Y | F | G | C | R | L | Bkps | +| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| | Esc | A | O | E | U | I | D | H | T | N | S | - | |------+------+------+------+------+------|------+------+------+------+------+------| -- cgit v1.2.3-24-g4f1b From 4eafa8656468a444f1371ceca7baa5db7f239e55 Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Tue, 23 Aug 2016 14:43:21 -0700 Subject: new 'yale' keymap --- keyboards/planck/keymaps/yale/Makefile | 25 +++++++++ keyboards/planck/keymaps/yale/config.h | 11 ++++ keyboards/planck/keymaps/yale/keymap.c | 94 ++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 keyboards/planck/keymaps/yale/Makefile create mode 100644 keyboards/planck/keymaps/yale/config.h create mode 100644 keyboards/planck/keymaps/yale/keymap.c diff --git a/keyboards/planck/keymaps/yale/Makefile b/keyboards/planck/keymaps/yale/Makefile new file mode 100644 index 000000000..581e08cd0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/Makefile @@ -0,0 +1,25 @@ + + +# 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 = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/yale/config.h b/keyboards/planck/keymaps/yale/config.h new file mode 100644 index 000000000..8a916bbd0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS + +#endif + + + diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c new file mode 100644 index 000000000..24f5025d0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -0,0 +1,94 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. +// +//Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. + +#include "planck.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QW 0 +#define _NM 1 +#define _FN 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Ctrl/Tab| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter| + * `-----------------------------------------------------------------------------------' + */ +[_QW] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_T(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_RSFT}, + {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NM), KC_SPC, KC_SPC, MO(_FN), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} +}, +/* Number + * ,-----------------------------------------------------------------------------------. + * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | ` | [ | { | ( | / | \ | ) | } | ] | - | = | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ! | @ | # | $ | % | ^ | & | * | _ | + | ____ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ | + * `-----------------------------------------------------------------------------------' + */ +[_NM] = { + {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_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, + {KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +/* Function + * ,-----------------------------------------------------------------------------------. + * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ____ |Shift | Ctrl | Alt | GUI | ____ | Left | Down | Up |Right | Del | ____ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ____ | ____ | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = { + {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_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_TRNS}, + {KC_TRNS, M(0), KC_TRNS, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +} +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3-24-g4f1b From d549002d229b9ed626aae9ed9560a07e764debf0 Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Wed, 28 Sep 2016 18:29:54 -0700 Subject: mouse keys added --- keyboards/planck/keymaps/yale/keymap.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 24f5025d0..7bb27f62a 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -15,10 +15,11 @@ #define _QW 0 #define _NM 1 #define _FN 2 +#define _SU 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty +/* QW * ,-----------------------------------------------------------------------------------. * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -35,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NM), KC_SPC, KC_SPC, MO(_FN), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} }, -/* Number +/* NM * ,-----------------------------------------------------------------------------------. * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -50,9 +51,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, {KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} }, -/* Function +/* FN * ,-----------------------------------------------------------------------------------. * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -67,8 +68,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_TRNS}, {KC_TRNS, M(0), KC_TRNS, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -} + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, + +[_SU] = { + {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, KC_NO, KC_NO, KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO}, + {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, KC_NO, KC_NO}, + {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} +}, + }; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3-24-g4f1b From ad0ce40db07f6c2bfdcd560d983d25d8cd14fa11 Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Sat, 28 Jan 2017 18:35:06 -0800 Subject: usability tweaks --- keyboards/planck/keymaps/yale/keymap.c | 93 ++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 7bb27f62a..a0910860a 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -1,25 +1,28 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, // this is the style you want to emulate. // -//Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now. #include "planck.h" #ifdef BACKLIGHT_ENABLE - #include "backlight.h" + #include "backlight.h" #endif // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _QW 0 -#define _NM 1 -#define _FN 2 -#define _SU 3 +#define _QWERTY 0 +#define _NUM 5 +#define _FUNC 6 +#define _NAV 7 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QW +/* _QWERTY * ,-----------------------------------------------------------------------------------. * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -30,13 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter| * `-----------------------------------------------------------------------------------' */ -[_QW] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTL_T(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_RSFT}, - {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NM), KC_SPC, KC_SPC, MO(_FN), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_T(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_RSFT}, + {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} }, -/* NM + +/* _NUM * ,-----------------------------------------------------------------------------------. * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -47,35 +51,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ | * `-----------------------------------------------------------------------------------' */ -[_NM] = { - {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_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, - {KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +[_NUM] = { + {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, + {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} }, -/* FN + +/* _FUNC * ,-----------------------------------------------------------------------------------. * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | * |------+------+------+------+------+-------------+------+------+------+------+------| * | ____ |Shift | Ctrl | Alt | GUI | ____ | Left | Down | Up |Right | Del | ____ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ____ | ____ | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | + * | ____ |Light | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ | * `-----------------------------------------------------------------------------------' */ -[_FN] = { - {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_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_TRNS}, - {KC_TRNS, M(0), KC_TRNS, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_SU), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +[_FUNC] = { + {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, + {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______}, + {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______} }, -[_SU] = { - {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, KC_NO, KC_NO, KC_WH_D, KC_WH_U, KC_NO, KC_NO, KC_NO}, - {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, KC_NO, KC_NO}, - {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, - {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} +[_NAV] = { + {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX}, + {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, }; @@ -86,18 +91,18 @@ const uint16_t PROGMEM fn_actions[] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; }; -- cgit v1.2.3-24-g4f1b From 8df30c1c5689bad1331f4010eb80f2a7bd1a199a Mon Sep 17 00:00:00 2001 From: Yale Thomas Date: Sat, 28 Jan 2017 18:39:08 -0800 Subject: added picture of layout --- keyboards/planck/keymaps/yale/yale_layout_picture.jpg | Bin 0 -> 58141 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 keyboards/planck/keymaps/yale/yale_layout_picture.jpg diff --git a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg new file mode 100644 index 000000000..ab9c6b4eb Binary files /dev/null and b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg differ -- cgit v1.2.3-24-g4f1b From f644b9a07a34ae19a6014b08db656a4eeca1dcda Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 29 Jan 2017 12:06:24 -0500 Subject: registering a weak_mods when using register_code16 Scenario: Locking the KC_LSHIFT, and then using a tap dance key that registers a S(KC_9) will unregister the KC_LSHIFT. The tap dance or any keycode that is registered should not have the side effect of cancelling a locked moditifier. We should be using a similar logic as the TMK codes in tmk_core/comman/action.c:158. --- quantum/quantum.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 1767faed4..0aecd238e 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -33,22 +33,42 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { f(KC_RGUI); } +static inline void qk_register_weak_mods(uint8_t kc) { + add_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); +} + +static inline void qk_unregister_weak_mods(uint8_t kc) { + del_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); +} + static inline void qk_register_mods(uint8_t kc) { - register_mods(MOD_BIT(kc)); + add_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); } static inline void qk_unregister_mods(uint8_t kc) { - unregister_mods(MOD_BIT(kc)); + del_weak_mods(MOD_BIT(kc)); + send_keyboard_report(); } void register_code16 (uint16_t code) { - do_code16 (code, qk_register_mods); + if (IS_MOD(code) || code == KC_NO) { + do_code16 (code, qk_register_mods); + } else { + do_code16 (code, qk_register_weak_mods); + } register_code (code); } void unregister_code16 (uint16_t code) { unregister_code (code); - do_code16 (code, qk_unregister_mods); + if (IS_MOD(code) || code == KC_NO) { + do_code16 (code, qk_unregister_mods); + } else { + do_code16 (code, qk_unregister_weak_mods); + } } __attribute__ ((weak)) -- cgit v1.2.3-24-g4f1b From 45e0d09414c09c626d2349b6a5036a29fe03b1c6 Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 29 Jan 2017 12:56:20 -0500 Subject: moved oneshot cancellation code outside of process_record. The oneshot cancellation code do not depend on the action_tapping_process and since process_record get called via the action_tapping_process logic moved the oneshot cancellation code into the action_exec function just before the action_tapping_process call --- tmk_core/common/action.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index a77177240..f03670a7f 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -49,6 +49,13 @@ void action_exec(keyevent_t event) keyrecord_t record = { .event = event }; +#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_layer_timed_out()) { + dprintf("Oneshot layer: timeout\n"); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + #ifndef NO_ACTION_TAPPING action_tapping_process(record); #else @@ -100,15 +107,8 @@ bool process_record_quantum(keyrecord_t *record) { return true; } -void process_record(keyrecord_t *record) +void process_record(keyrecord_t *record) { -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - dprintf("Oneshot layer: timeout\n"); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } -#endif - if (IS_NOEVENT(record->event)) { return; } if(!process_record_quantum(record)) -- cgit v1.2.3-24-g4f1b From 5a860b71a1943358d0722ace9d2c13bd5c77c971 Mon Sep 17 00:00:00 2001 From: SjB Date: Sun, 29 Jan 2017 13:04:43 -0500 Subject: race condition between oneshot_mods and tap_dance since the keycode for a tap dance process gets process only after the TAPPING_TERM timeout, you really only have ONESHOT_TIMEOUT - TAPPING_TERM time to tap or double tap on the key. This fix save the oneshot_mods into the action.state structure and applies the mods with the keycode when it's registered. It also unregisters the mod when the the tap dance process gets reset. --- quantum/process_keycode/process_tap_dance.c | 7 ++++++- quantum/process_keycode/process_tap_dance.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 6ae362c4c..403dca538 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -43,12 +43,16 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti if (action->state.finished) return; action->state.finished = true; + add_mods(action->state.oneshot_mods); + send_keyboard_report(); _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); } static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) { _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); + del_mods(action->state.oneshot_mods); + send_keyboard_report(); } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { @@ -70,6 +74,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { action->state.keycode = keycode; action->state.count++; action->state.timer = timer_read(); + action->state.oneshot_mods = get_oneshot_mods(); process_tap_dance_action_on_each_tap (action); if (last_td && last_td != keycode) { @@ -109,7 +114,7 @@ void matrix_scan_tap_dance () { if (highest_td == -1) return; - for (int i = 0; i <= highest_td; i++) { +for (int i = 0; i <= highest_td; i++) { qk_tap_dance_action_t *action = &tap_dance_actions[i]; if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index f753cbba6..726752ecc 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -9,6 +9,7 @@ typedef struct { uint8_t count; + uint8_t oneshot_mods; uint16_t keycode; uint16_t timer; bool interrupted; -- cgit v1.2.3-24-g4f1b From ef9e544a7eb8551748dcf96729fde8d66ac6cc57 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 29 Jan 2017 22:22:32 -0500 Subject: Let's Split: establish rev2fliphalf subproject Subproject to accomodate second half pad built in opposite orientation (places TRRS jacks on opposing edges for shorter cable runs) --- keyboards/lets_split/config.h | 3 + keyboards/lets_split/keymaps/i2c/config.h | 3 + keyboards/lets_split/keymaps/serial/config.h | 3 + keyboards/lets_split/lets_split.h | 3 + keyboards/lets_split/rev2fliphalf/Makefile | 3 + keyboards/lets_split/rev2fliphalf/config.h | 91 ++++++++++++++++++++++++ keyboards/lets_split/rev2fliphalf/rev2fliphalf.c | 32 +++++++++ keyboards/lets_split/rev2fliphalf/rev2fliphalf.h | 28 ++++++++ keyboards/lets_split/rev2fliphalf/rules.mk | 5 ++ 9 files changed, 171 insertions(+) create mode 100644 keyboards/lets_split/rev2fliphalf/Makefile create mode 100644 keyboards/lets_split/rev2fliphalf/config.h create mode 100644 keyboards/lets_split/rev2fliphalf/rev2fliphalf.c create mode 100644 keyboards/lets_split/rev2fliphalf/rev2fliphalf.h create mode 100644 keyboards/lets_split/rev2fliphalf/rules.mk diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 7df0c5752..008fb0978 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -26,4 +26,7 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev2 #include "rev2/config.h" #endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif #endif diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index efe8bb0f2..332c990fc 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -24,4 +24,7 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" #endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index cd766cc4f..0e59b191b 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -26,4 +26,7 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" #endif \ No newline at end of file diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index 2cdfb061f..0de308c7a 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -7,6 +7,9 @@ #ifdef SUBPROJECT_rev2 #include "rev2.h" #endif +#ifdef SUBPROJECT_rev2fliphalf + #include "rev2fliphalf.h" +#endif #include "quantum.h" diff --git a/keyboards/lets_split/rev2fliphalf/Makefile b/keyboards/lets_split/rev2fliphalf/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2fliphalf/config.h b/keyboards/lets_split/rev2fliphalf/config.h new file mode 100644 index 000000000..1c45cf136 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#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 v2 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +//#define CATERINA_BOOTLOADER + +/* 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c new file mode 100644 index 000000000..c505d3a6e --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c @@ -0,0 +1,32 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h new file mode 100644 index 000000000..993e149dd --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h @@ -0,0 +1,28 @@ +#ifndef REV2FLIPHALF_H +#define REV2FLIPHALF_H + +#include "../lets_split.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2fliphalf/rules.mk b/keyboards/lets_split/rev2fliphalf/rules.mk new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif -- cgit v1.2.3-24-g4f1b From f400ac1d7d8ee968016fc1a3e84a053612fe07cc Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 30 Jan 2017 15:45:16 +0100 Subject: [deadcyclo layout] fixed failing tests --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index bfbf17be1..610dd7ffb 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -210,21 +210,6 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; -static void ang_tap (uint16_t code, ...) { - uint16_t kc = code; - va_list ap; - - va_start(ap, code); - - do { - register_code16(kc); - unregister_code16(kc); - wait_ms(50); - kc = va_arg(ap, int); - } while (kc != 0); - va_end(ap); -} - #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) @@ -284,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case YAY: if (record->event.pressed) { - ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); + SEND_STRING ("\\o/"); } return false; break; -- cgit v1.2.3-24-g4f1b From f70758622bc8be92987deac7163303cfe9b4f8b3 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 30 Jan 2017 19:42:27 +0100 Subject: [deadcyclo layout] Refactoring. Use custom functions and macros --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 503 ++++++++++++++------------- 1 file changed, 266 insertions(+), 237 deletions(-) diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 610dd7ffb..5774511cc 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -8,11 +8,21 @@ #define MDIA 2 // media keys #define NAVG 3 // navigation -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here +enum macros { + RUN +}; + +enum function_ids { + EMOJI, + EMOJI2, EPRM, VRSN, RGB_SLD, + GO_GROUP +}; + +/* opt can only be 0-15 */ +enum emojis { SHRUG, YAY, HUG, @@ -28,13 +38,56 @@ enum custom_keycodes { FACE1, FACE2, UHU, - SMRK1, + SMRK1 +}; + +enum emojis2 { SMRK2, LOVE }; -// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) +enum progmem_ids { + EMOJI_SHRUG, + EMOJI_YAY, + EMOJI_HUG, + EMOJI_SMILE, + EMOJI_SMILE2, + EMOJI_HMM1, + EMOJI_HMM2, + EMOJI_BEAR1, + EMOJI_BEAR2, + EMOJI_FUU, + EMOJI_EGGY1, + EMOJI_EGGY2, + EMOJI_FACE1, + EMOJI_FACE2, + EMOJI_UHU, + EMOJI_SMRK1, + EMOJI_SMRK2, + EMOJI_LOVE, + F_EPRM, + F_VRSN, + F_RGB_SLD, + I3_GO_GROUP_10, + I3_GO_GROUP_1, + I3_GO_GROUP_2, + I3_GO_GROUP_3, + I3_GO_GROUP_4, + I3_GO_GROUP_5, + I3_GO_GROUP_6, + I3_GO_GROUP_7, + I3_GO_GROUP_8, + I3_GO_GROUP_9, +}; + +// TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch) + +// TODO: Do stuff with hyper and meh keys +// TODO: Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) +// TODO: Make macros for gnu screen and i3wm // TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers +// TODO: Look into using tap dance +// TODO: Use leader key for stuff. See https://github.com/qmk/qmk_firmware/wiki const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -47,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | UNI | ~/L1 | + * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | Home | | PgUp | Ins | @@ -61,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), @@ -74,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LALT, KC_RALT,KC_LBRC,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), + KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, KC_RBRC,KC_BSPC, KC_ENT @@ -109,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RGB_TOG,RGB_MOD, - RGB_SLD, + F(F_RGB_SLD), RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, @@ -119,14 +172,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, - EPRM, KC_DEL, KC_TRNS + F(F_EPRM), KC_DEL, KC_TRNS ), /* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | gg(1)| | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | Up | | | | + * | | | | MsUp | RUN | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -144,8 +197,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA , MOUSE and NAVIGATION [MDIA] = KEYMAP( - KC_TRNS, 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, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6), +KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, @@ -153,7 +206,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, @@ -179,7 +232,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | ▒ | ▓ | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | | | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' @@ -187,10 +240,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Unicode [NAVG] = KEYMAP( KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), - KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, - KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, - KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, - KC_TRNS, SMRK1, SMRK2, LOVE, VRSN, + KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, + KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), + KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS, + KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -207,242 +260,219 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) + [EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG), + [EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY), + [EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG), + [EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE), + [EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2), + [EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1), + [EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2), + [EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1), + [EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2), + [EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU), + [EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1), + [EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2), + [EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1), + [EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2), + [EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU), + [EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1), + [EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2), + [EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE), + [F_EPRM] = ACTION_FUNCTION(EPRM), + [F_VRSN] = ACTION_FUNCTION(VRSN), + [F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD), + [I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0), + [I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1), + [I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2), + [I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3), + [I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4), + [I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5), + [I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6), + [I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7), + [I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8), + [I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9), }; #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) -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; - } - return MACRO_NONE; -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; + eeconfig_init(); break; case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); break; case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(1); +#endif break; - case SHRUG: - if (record->event.pressed) { - unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + case GO_GROUP: + register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL); + TAP_ONCE(KC_G); + if (opt == 0) { + TAP_ONCE(39); + } else { + TAP_ONCE(29+opt); } - return false; break; - case YAY: - if (record->event.pressed) { - SEND_STRING ("\\o/"); + case EMOJI: + switch(opt) { + case SHRUG: + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + break; + case YAY: + SEND_STRING ("\\o/"); + break; + case HUG: + unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + break; + case SMILE: + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + break; + case SMILE2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case HMM1: + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + break; + case HMM2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case BEAR1: + unicode_input_start(); register_hex(0x0295); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0294); unicode_input_finish(); + break; + case BEAR2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FUU: + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + break; + case EGGY1: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0xff09); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + break; + case EGGY2: + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0020); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FACE1: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FACE2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case UHU: + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + break; + case SMRK1: + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + break; } - return false; - break; - case HUG: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - } - return false; - break; - case SMILE: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - } - return false; - break; - case SMILE2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case HMM1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - } - return false; - break; - case HMM2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case BEAR1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0295); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0294); unicode_input_finish(); - } - return false; - break; - case BEAR2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FUU: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - } - return false; - break; - case EGGY1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0xff09); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - } - return false; - break; - case EGGY2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0020); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FACE1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FACE2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case UHU: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - } - return false; - break; - case SMRK1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - } - return false; - break; - case SMRK2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case LOVE: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - } - return false; break; + case EMOJI2: + switch(opt) { + case SMRK2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case LOVE: + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + break; + } + break; + } } - return true; } +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case RUN: + return MACRO( D(LCTL), T(I), U(LCTL), T(R), END ); + break; + } + } + return MACRO_NONE; +}; + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); @@ -450,7 +480,6 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); ergodox_board_led_off(); -- cgit v1.2.3-24-g4f1b From 4c3630dc1778129438440986f14731dcb7244262 Mon Sep 17 00:00:00 2001 From: Matthias Schmitt Date: Mon, 30 Jan 2017 23:10:28 +0100 Subject: update my neo2 keymap --- keyboards/ergodox/keymaps/software_neo2/keymap.c | 64 +++++++++++++----------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/keyboards/ergodox/keymaps/software_neo2/keymap.c b/keyboards/ergodox/keymaps/software_neo2/keymap.c index 41ace403d..571ca062c 100644 --- a/keyboards/ergodox/keymaps/software_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/software_neo2/keymap.c @@ -1,7 +1,8 @@ #include "ergodox.h" #include "debug.h" +#include "led.h" #include "action_layer.h" -#include "keymap_neo2.h" +#include "keymap_extras/keymap_neo2.h" // Layer names #define BASE 0 // default layer @@ -11,45 +12,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 |BackSpce| + * | Del | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 | ß | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | X | V | L | C | W | L1 | | L1 | K | H | G | F | Q | ß | + * | Tab | X | V | L | C | W | Esc | | Esc | K | H | G | F | Q | Y | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | U | I | A | E | O |------| |------| S | N | R | T | D | Y | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Ü/Ctrl| Ö/C-S| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | + * | NeoL1 | U | I | A | E | O |------| |------| S | N | R | T | D | NeoR1 | + * |--------+------+------+------+------+------| L1 | | L1 |------+------+------+------+------+--------| + * | LShift |Ü/Ctrl| Ö/Win| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | L1 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | Esc | + * |NeoL2 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | NeoR2| * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. + * ,-------------. ,---------------. * | App | LGui | | Alt |Ctrl/Esc| * ,------+------+------| |------+--------+------. - * | | |NeoL2 | |NeoL2 | | | - * | Tab |Backsp|------| |------| Space |Enter | - * | |ace |NeoL1 | |NeoL1 | | | + * | | | Enter| |Delete| | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | Tab | | Esc | | | * `--------------------' `----------------------' */ // 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_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, - KC_DELT, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, TG(1), - KC_CAPS, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, - KC_LSFT, CTL_T(NEO_UE), C_S_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, ALL_T(KC_NO), - DE_LESS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, - ALT_T(KC_APP),KC_LGUI, - NEO_L2_L, - KC_TAB,KC_BSPC,NEO_L1_L, + KC_DELT, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, + KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC, + NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, + KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1), + NEO_L2_L, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + C_S_T(KC_ESC),KC_LGUI, + KC_ENT, + KC_SPC,KC_BSPC,KC_TAB, // right hand - KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, - NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_Y, - MEH_T(KC_NO),NEO_B, NEO_M, KC_COMM, KC_DOT, NEO_J, KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ESC, - KC_LALT,CTL_T(KC_ESC), - NEO_L2_R, - NEO_L1_R,KC_SPC, KC_ENT + KC_MNXT, NEO_6, NEO_7, NEO_8, NEO_9, NEO_0, NEO_SS, + KC_ESC, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_Y, + NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, + TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R, + KC_LALT,KC_RGUI, + KC_DELT, + KC_ESC,KC_ENT, KC_SPC ), /* Keymap 1: Media and mouse keys * @@ -127,13 +128,16 @@ void matrix_scan_user(void) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); + ergodox_board_led_off(); + + if (host_keyboard_leds() & (1< Date: Tue, 31 Jan 2017 22:37:03 +0100 Subject: Add reddot handwired keyboard. --- keyboards/handwired/reddot/Makefile | 3 + keyboards/handwired/reddot/config.h | 162 +++++++++++++++++++++ .../handwired/reddot/keymaps/default/keymap.c | 29 ++++ .../handwired/reddot/keymaps/default/readme.md | 1 + keyboards/handwired/reddot/readme.md | 24 +++ keyboards/handwired/reddot/reddot.c | 7 + keyboards/handwired/reddot/reddot.h | 20 +++ keyboards/handwired/reddot/rules.mk | 88 +++++++++++ 8 files changed, 334 insertions(+) create mode 100755 keyboards/handwired/reddot/Makefile create mode 100755 keyboards/handwired/reddot/config.h create mode 100755 keyboards/handwired/reddot/keymaps/default/keymap.c create mode 100755 keyboards/handwired/reddot/keymaps/default/readme.md create mode 100755 keyboards/handwired/reddot/readme.md create mode 100755 keyboards/handwired/reddot/reddot.c create mode 100755 keyboards/handwired/reddot/reddot.h create mode 100755 keyboards/handwired/reddot/rules.mk diff --git a/keyboards/handwired/reddot/Makefile b/keyboards/handwired/reddot/Makefile new file mode 100755 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/reddot/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h new file mode 100755 index 000000000..15f114297 --- /dev/null +++ b/keyboards/handwired/reddot/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER upils +#define PRODUCT reddot +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* + * 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 { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c new file mode 100755 index 000000000..44ee2ce51 --- /dev/null +++ b/keyboards/handwired/reddot/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include "reddot.h" +#include "../../../../../quantum/keymap_extras/keymap_french.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ + KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\ + KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\ + KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\ + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), + + [1] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ + KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\ + KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\ + KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\ + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), +}; + + +const uint16_t PROGMEM fn_actions[] = { + ACTION_LAYER_TOGGLE(1), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + diff --git a/keyboards/handwired/reddot/keymaps/default/readme.md b/keyboards/handwired/reddot/keymaps/default/readme.md new file mode 100755 index 000000000..f04833c3e --- /dev/null +++ b/keyboards/handwired/reddot/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for handwired/reddot diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md new file mode 100755 index 000000000..11bcba54a --- /dev/null +++ b/keyboards/handwired/reddot/readme.md @@ -0,0 +1,24 @@ +## RedDot Specific Info ## + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent README.md](/README.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboard/reddot folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top README.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|] +``` +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/handwired/reddot/reddot.c b/keyboards/handwired/reddot/reddot.c new file mode 100755 index 000000000..4e1efc06c --- /dev/null +++ b/keyboards/handwired/reddot/reddot.c @@ -0,0 +1,7 @@ +#include "reddot.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} + diff --git a/keyboards/handwired/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h new file mode 100755 index 000000000..f0c4be557 --- /dev/null +++ b/keyboards/handwired/reddot/reddot.h @@ -0,0 +1,20 @@ +#ifndef REDDOT_H +#define REDDOT_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \ + k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \ + k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \ + { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \ +} + +#endif diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk new file mode 100755 index 000000000..9a4409fe6 --- /dev/null +++ b/keyboards/handwired/reddot/rules.mk @@ -0,0 +1,88 @@ + +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# for avr upload +USB ?= /dev/cu.usbmodem1421 +# +# 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) + + +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else + OPT_DEFS += -DATREUS_ASTAR + OPT_DEFS += -DCATERINA_BOOTLOADER + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) +endif +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# MCU name + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= 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 +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +upload: build + $(ATREUS_UPLOAD_COMMAND) + -- cgit v1.2.3-24-g4f1b From d8a9c63c265869822a77ad5c5cb7c8dfa4ff1f6c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 05:07:05 +0700 Subject: Implement runtime selectable output (USB or BT) --- tmk_core/protocol/lufa.mk | 1 + tmk_core/protocol/lufa/lufa.c | 116 ++++++++++++++-------------------- tmk_core/protocol/lufa/outputselect.c | 56 ++++++++++++++++ tmk_core/protocol/lufa/outputselect.h | 41 ++++++++++++ 4 files changed, 145 insertions(+), 69 deletions(-) create mode 100644 tmk_core/protocol/lufa/outputselect.c create mode 100644 tmk_core/protocol/lufa/outputselect.h diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 151d26cbc..26337cb94 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -15,6 +15,7 @@ endif LUFA_SRC = lufa.c \ descriptor.c \ + outputselect.c \ $(LUFA_SRC_USB) ifeq ($(strip $(MIDI_ENABLE)), yes) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 6dd5959dc..ba49284c9 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -53,6 +53,7 @@ #include "lufa.h" #include "quantum.h" #include +#include "outputselect.h" #ifdef NKRO_ENABLE #include "keycode_config.h" @@ -589,59 +590,33 @@ void EVENT_USB_Device_ControlRequest(void) /******************************************************************************* * Host driver -p ******************************************************************************/ static uint8_t keyboard_leds(void) { return keyboard_led_stats; } -#define SendToUSB 1 -#define SendToBT 2 -#define SendToBLE 4 - -static inline uint8_t where_to_send(void) { -#ifdef ADAFRUIT_BLE_ENABLE -#if 0 - if (adafruit_ble_is_connected()) { - // For testing, send to BLE as a priority - return SendToBLE; - } -#endif - - // This is the real policy - if (USB_DeviceState != DEVICE_STATE_Configured) { - if (adafruit_ble_is_connected()) { - return SendToBLE; - } - } -#endif - return ((USB_DeviceState == DEVICE_STATE_Configured) ? SendToUSB : 0) -#ifdef BLUETOOTH_ENABLE - || SendToBT -#endif - ; -} - static void send_keyboard(report_keyboard_t *report) { + uint8_t timeout = 255; + uint8_t where = where_to_send(); + #ifdef BLUETOOTH_ENABLE - bluefruit_serial_send(0xFD); - for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { - bluefruit_serial_send(report->raw[i]); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + bluefruit_serial_send(0xFD); + for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { + bluefruit_serial_send(report->raw[i]); + } } #endif - uint8_t timeout = 255; - uint8_t where = where_to_send(); - #ifdef ADAFRUIT_BLE_ENABLE - if (where & SendToBLE) { + if (where == OUTPUT_ADAFRUIT_BLE) { adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); } #endif - if (!(where & SendToUSB)) { + if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } @@ -681,30 +656,31 @@ static void send_keyboard(report_keyboard_t *report) static void send_mouse(report_mouse_t *report) { #ifdef MOUSE_ENABLE + uint8_t timeout = 255; + uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x03); - bluefruit_serial_send(report->buttons); - bluefruit_serial_send(report->x); - bluefruit_serial_send(report->y); - bluefruit_serial_send(report->v); // should try sending the wheel v here - bluefruit_serial_send(report->h); // should try sending the wheel h here - bluefruit_serial_send(0x00); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x03); + bluefruit_serial_send(report->buttons); + bluefruit_serial_send(report->x); + bluefruit_serial_send(report->y); + bluefruit_serial_send(report->v); // should try sending the wheel v here + bluefruit_serial_send(report->h); // should try sending the wheel h here + bluefruit_serial_send(0x00); + } #endif - uint8_t timeout = 255; - - uint8_t where = where_to_send(); - #ifdef ADAFRUIT_BLE_ENABLE - if (where & SendToBLE) { + if (where == OUTPUT_ADAFRUIT_BLE) { // FIXME: mouse buttons adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); } #endif - if (!(where & SendToUSB)) { + + if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } @@ -746,32 +722,34 @@ static void send_system(uint16_t data) static void send_consumer(uint16_t data) { + uint8_t timeout = 255; + uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; - uint16_t bitmap = CONSUMER2BLUEFRUIT(data); - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x02); - bluefruit_serial_send((bitmap>>8)&0xFF); - bluefruit_serial_send(bitmap&0xFF); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { + static uint16_t last_data = 0; + if (data == last_data) return; + last_data = data; + uint16_t bitmap = CONSUMER2BLUEFRUIT(data); + bluefruit_serial_send(0xFD); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x02); + bluefruit_serial_send((bitmap>>8)&0xFF); + bluefruit_serial_send(bitmap&0xFF); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x00); + bluefruit_serial_send(0x00); + } #endif - uint8_t timeout = 255; - uint8_t where = where_to_send(); - #ifdef ADAFRUIT_BLE_ENABLE - if (where & SendToBLE) { + if (where == OUTPUT_ADAFRUIT_BLE) { adafruit_ble_send_consumer_key(data, 0); } #endif - if (!(where & SendToUSB)) { + + if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c new file mode 100644 index 000000000..5d2457bff --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.c @@ -0,0 +1,56 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "lufa.h" +#include "outputselect.h" +#ifdef ADAFRUIT_BLE_ENABLE + #include "adafruit_ble.h" +#endif + +uint8_t desired_output = OUTPUT_DEFAULT; + +void set_output(uint8_t output) { + set_output_user(output); + desired_output = output; +} + +__attribute__((weak)) +void set_output_user(uint8_t output) { +} + +uint8_t auto_detect_output(void) { + if (USB_DeviceState == DEVICE_STATE_Configured) { + return OUTPUT_USB; + } + +#ifdef ADAFRUIT_BLE_ENABLE + if (adafruit_ble_is_connected()) { + return OUTPUT_ADAFRUIT_BLE; + } +#endif + +#ifdef BLUETOOTH_ENABLE + return OUTPUT_BLUETOOTH; // should check if BT is connected here +#endif + + return OUTPUT_NONE; +} + +uint8_t where_to_send(void) { + if (desired_output == OUTPUT_AUTO) { + return auto_detect_output(); + } + return desired_output; +} + diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 . +*/ + +enum outputs { + OUTPUT_AUTO, + + OUTPUT_NONE, + OUTPUT_USB, + OUTPUT_BLUETOOTH, + OUTPUT_ADAFRUIT_BLE, + + // backward compatibility + OUTPUT_USB_AND_BT +}; + +/** + * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default + */ +#ifndef OUTPUT_DEFAULT + #ifdef BLUETOOTH_ENABLE + #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT + #else + #define OUTPUT_DEFAULT OUTPUT_AUTO + #endif +#endif + +void set_output(uint8_t output); +void set_output_user(uint8_t output); +uint8_t auto_detect_output(void); +uint8_t where_to_send(void); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 407f949e4b1f1fcee7470df1ff28260d24215f10 Mon Sep 17 00:00:00 2001 From: Erik Dasque Date: Tue, 31 Jan 2017 19:59:59 -0500 Subject: Reverted Dockerfile to put the CMD back --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c42bbeb32..744ded857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,5 @@ ENV subproject=ez ENV keymap=default VOLUME /qmk -WORKDIR /qmk \ No newline at end of file +WORKDIR /qmk +CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap} -- cgit v1.2.3-24-g4f1b From f46c2b3ca07c83e13bea6fc33a3c95fed4a9ece2 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Tue, 31 Jan 2017 21:31:05 -0500 Subject: Introduces ALGR_T for dual-function AltGr --- quantum/quantum_keycodes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4853655f9..91324be35 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -290,6 +290,7 @@ enum quantum_keycodes { #define CTL_T(kc) MT(MOD_LCTL, kc) #define SFT_T(kc) MT(MOD_LSFT, kc) #define ALT_T(kc) MT(MOD_LALT, kc) +#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR #define GUI_T(kc) MT(MOD_LGUI, kc) #define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal #define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl -- cgit v1.2.3-24-g4f1b From c17070eca545f654f91cf3dcba6c6c611e0f8d03 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 15:35:21 +0700 Subject: Add layer switcher keycodes: OUT_AUTO, OUT_USB, OUT_BT, OUT_BLE --- quantum/quantum.c | 29 +++++++++++++++++++++++++++++ quantum/quantum_keycodes.h | 10 ++++++++++ 2 files changed, 39 insertions(+) diff --git a/quantum/quantum.c b/quantum/quantum.c index 63ffe2074..1d1a691e2 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,4 +1,5 @@ #include "quantum.h" +#include "outputselect.h" #ifndef TAPPING_TERM #define TAPPING_TERM 200 @@ -212,6 +213,34 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + case OUT_AUTO: + if (record->event.pressed) { + set_output(OUTPUT_AUTO); + } + return false; + break; + case OUT_USB: + if (record->event.pressed) { + set_output(OUTPUT_USB); + } + return false; + break; + #ifdef BLUETOOTH_ENABLE + case OUT_BT: + if (record->event.pressed) { + set_output(OUTPUT_BLUETOOTH); + } + return false; + break; + #endif + #ifdef ADAFRUIT_BLE_ENABLE + case OUT_BLE: + if (record->event.pressed) { + set_output(OUTPUT_ADAFRUIT_BLE); + } + return false; + break; + #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 4853655f9..4f1345b49 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -141,6 +141,16 @@ enum quantum_keycodes { PRINT_ON, PRINT_OFF, + // output selection + OUT_AUTO, + OUT_USB, +#ifdef BLUETOOTH_ENABLE + OUT_BT, +#endif +#ifdef ADAFRUIT_BLE_ENABLE + OUT_BLE, +#endif + // always leave at the end SAFE_RANGE }; -- cgit v1.2.3-24-g4f1b From 72e95809a1d3da869942441a2ad7107c7a55d688 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 17:55:13 +0700 Subject: Move outputselect to parent dir to satisfy non LUFA keyboards --- tmk_core/protocol/lufa/outputselect.c | 56 ----------------------------------- tmk_core/protocol/lufa/outputselect.h | 41 ------------------------- tmk_core/protocol/outputselect.c | 56 +++++++++++++++++++++++++++++++++++ tmk_core/protocol/outputselect.h | 41 +++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 tmk_core/protocol/lufa/outputselect.c delete mode 100644 tmk_core/protocol/lufa/outputselect.h create mode 100644 tmk_core/protocol/outputselect.c create mode 100644 tmk_core/protocol/outputselect.h diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c deleted file mode 100644 index 5d2457bff..000000000 --- a/tmk_core/protocol/lufa/outputselect.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "lufa.h" -#include "outputselect.h" -#ifdef ADAFRUIT_BLE_ENABLE - #include "adafruit_ble.h" -#endif - -uint8_t desired_output = OUTPUT_DEFAULT; - -void set_output(uint8_t output) { - set_output_user(output); - desired_output = output; -} - -__attribute__((weak)) -void set_output_user(uint8_t output) { -} - -uint8_t auto_detect_output(void) { - if (USB_DeviceState == DEVICE_STATE_Configured) { - return OUTPUT_USB; - } - -#ifdef ADAFRUIT_BLE_ENABLE - if (adafruit_ble_is_connected()) { - return OUTPUT_ADAFRUIT_BLE; - } -#endif - -#ifdef BLUETOOTH_ENABLE - return OUTPUT_BLUETOOTH; // should check if BT is connected here -#endif - - return OUTPUT_NONE; -} - -uint8_t where_to_send(void) { - if (desired_output == OUTPUT_AUTO) { - return auto_detect_output(); - } - return desired_output; -} - diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h deleted file mode 100644 index 79b4dd35d..000000000 --- a/tmk_core/protocol/lufa/outputselect.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -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 . -*/ - -enum outputs { - OUTPUT_AUTO, - - OUTPUT_NONE, - OUTPUT_USB, - OUTPUT_BLUETOOTH, - OUTPUT_ADAFRUIT_BLE, - - // backward compatibility - OUTPUT_USB_AND_BT -}; - -/** - * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default - */ -#ifndef OUTPUT_DEFAULT - #ifdef BLUETOOTH_ENABLE - #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT - #else - #define OUTPUT_DEFAULT OUTPUT_AUTO - #endif -#endif - -void set_output(uint8_t output); -void set_output_user(uint8_t output); -uint8_t auto_detect_output(void); -uint8_t where_to_send(void); \ No newline at end of file diff --git a/tmk_core/protocol/outputselect.c b/tmk_core/protocol/outputselect.c new file mode 100644 index 000000000..5d2457bff --- /dev/null +++ b/tmk_core/protocol/outputselect.c @@ -0,0 +1,56 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "lufa.h" +#include "outputselect.h" +#ifdef ADAFRUIT_BLE_ENABLE + #include "adafruit_ble.h" +#endif + +uint8_t desired_output = OUTPUT_DEFAULT; + +void set_output(uint8_t output) { + set_output_user(output); + desired_output = output; +} + +__attribute__((weak)) +void set_output_user(uint8_t output) { +} + +uint8_t auto_detect_output(void) { + if (USB_DeviceState == DEVICE_STATE_Configured) { + return OUTPUT_USB; + } + +#ifdef ADAFRUIT_BLE_ENABLE + if (adafruit_ble_is_connected()) { + return OUTPUT_ADAFRUIT_BLE; + } +#endif + +#ifdef BLUETOOTH_ENABLE + return OUTPUT_BLUETOOTH; // should check if BT is connected here +#endif + + return OUTPUT_NONE; +} + +uint8_t where_to_send(void) { + if (desired_output == OUTPUT_AUTO) { + return auto_detect_output(); + } + return desired_output; +} + diff --git a/tmk_core/protocol/outputselect.h b/tmk_core/protocol/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/outputselect.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 . +*/ + +enum outputs { + OUTPUT_AUTO, + + OUTPUT_NONE, + OUTPUT_USB, + OUTPUT_BLUETOOTH, + OUTPUT_ADAFRUIT_BLE, + + // backward compatibility + OUTPUT_USB_AND_BT +}; + +/** + * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default + */ +#ifndef OUTPUT_DEFAULT + #ifdef BLUETOOTH_ENABLE + #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT + #else + #define OUTPUT_DEFAULT OUTPUT_AUTO + #endif +#endif + +void set_output(uint8_t output); +void set_output_user(uint8_t output); +uint8_t auto_detect_output(void); +uint8_t where_to_send(void); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 2bef8b5b88547ce28fb056559b058e35109278b3 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 19:37:52 +0700 Subject: Limit outputselect to AVR only for now --- quantum/quantum.c | 4 +++ quantum/quantum.h | 1 - tmk_core/protocol/lufa.mk | 2 +- tmk_core/protocol/lufa/outputselect.c | 56 +++++++++++++++++++++++++++++++++++ tmk_core/protocol/lufa/outputselect.h | 41 +++++++++++++++++++++++++ tmk_core/protocol/outputselect.c | 56 ----------------------------------- tmk_core/protocol/outputselect.h | 41 ------------------------- 7 files changed, 102 insertions(+), 99 deletions(-) create mode 100644 tmk_core/protocol/lufa/outputselect.c create mode 100644 tmk_core/protocol/lufa/outputselect.h delete mode 100644 tmk_core/protocol/outputselect.c delete mode 100644 tmk_core/protocol/outputselect.h diff --git a/quantum/quantum.c b/quantum/quantum.c index 1d1a691e2..585692d4a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,5 +1,7 @@ #include "quantum.h" +#if defined(__AVR__) #include "outputselect.h" +#endif #ifndef TAPPING_TERM #define TAPPING_TERM 200 @@ -213,6 +215,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + #if defined(__AVR__) case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); @@ -241,6 +244,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif + #endif case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) diff --git a/quantum/quantum.h b/quantum/quantum.h index e6adf974a..810e9e4bb 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -15,7 +15,6 @@ #ifdef RGBLIGHT_ENABLE #include "rgblight.h" #endif - #include "action_layer.h" #include "eeconfig.h" #include diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 26337cb94..de0cc795f 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -8,7 +8,7 @@ LUFA_PATH ?= $(LUFA_DIR)/LUFA-git ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) # New build system from 20120730 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA - include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk + include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk else include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile endif diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c new file mode 100644 index 000000000..0110928de --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.c @@ -0,0 +1,56 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "quantum.h" +#include "outputselect.h" +#ifdef ADAFRUIT_BLE_ENABLE + #include "adafruit_ble.h" +#endif + +uint8_t desired_output = OUTPUT_DEFAULT; + +void set_output(uint8_t output) { + set_output_user(output); + desired_output = output; +} + +__attribute__((weak)) +void set_output_user(uint8_t output) { +} + +uint8_t auto_detect_output(void) { + if (USB_DeviceState == DEVICE_STATE_Configured) { + return OUTPUT_USB; + } + +#ifdef ADAFRUIT_BLE_ENABLE + if (adafruit_ble_is_connected()) { + return OUTPUT_ADAFRUIT_BLE; + } +#endif + +#ifdef BLUETOOTH_ENABLE + return OUTPUT_BLUETOOTH; // should check if BT is connected here +#endif + + return OUTPUT_NONE; +} + +uint8_t where_to_send(void) { + if (desired_output == OUTPUT_AUTO) { + return auto_detect_output(); + } + return desired_output; +} + diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Priyadi Iman Nurcahyo +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 . +*/ + +enum outputs { + OUTPUT_AUTO, + + OUTPUT_NONE, + OUTPUT_USB, + OUTPUT_BLUETOOTH, + OUTPUT_ADAFRUIT_BLE, + + // backward compatibility + OUTPUT_USB_AND_BT +}; + +/** + * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default + */ +#ifndef OUTPUT_DEFAULT + #ifdef BLUETOOTH_ENABLE + #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT + #else + #define OUTPUT_DEFAULT OUTPUT_AUTO + #endif +#endif + +void set_output(uint8_t output); +void set_output_user(uint8_t output); +uint8_t auto_detect_output(void); +uint8_t where_to_send(void); \ No newline at end of file diff --git a/tmk_core/protocol/outputselect.c b/tmk_core/protocol/outputselect.c deleted file mode 100644 index 5d2457bff..000000000 --- a/tmk_core/protocol/outputselect.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "lufa.h" -#include "outputselect.h" -#ifdef ADAFRUIT_BLE_ENABLE - #include "adafruit_ble.h" -#endif - -uint8_t desired_output = OUTPUT_DEFAULT; - -void set_output(uint8_t output) { - set_output_user(output); - desired_output = output; -} - -__attribute__((weak)) -void set_output_user(uint8_t output) { -} - -uint8_t auto_detect_output(void) { - if (USB_DeviceState == DEVICE_STATE_Configured) { - return OUTPUT_USB; - } - -#ifdef ADAFRUIT_BLE_ENABLE - if (adafruit_ble_is_connected()) { - return OUTPUT_ADAFRUIT_BLE; - } -#endif - -#ifdef BLUETOOTH_ENABLE - return OUTPUT_BLUETOOTH; // should check if BT is connected here -#endif - - return OUTPUT_NONE; -} - -uint8_t where_to_send(void) { - if (desired_output == OUTPUT_AUTO) { - return auto_detect_output(); - } - return desired_output; -} - diff --git a/tmk_core/protocol/outputselect.h b/tmk_core/protocol/outputselect.h deleted file mode 100644 index 79b4dd35d..000000000 --- a/tmk_core/protocol/outputselect.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2017 Priyadi Iman Nurcahyo -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 . -*/ - -enum outputs { - OUTPUT_AUTO, - - OUTPUT_NONE, - OUTPUT_USB, - OUTPUT_BLUETOOTH, - OUTPUT_ADAFRUIT_BLE, - - // backward compatibility - OUTPUT_USB_AND_BT -}; - -/** - * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default - */ -#ifndef OUTPUT_DEFAULT - #ifdef BLUETOOTH_ENABLE - #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT - #else - #define OUTPUT_DEFAULT OUTPUT_AUTO - #endif -#endif - -void set_output(uint8_t output); -void set_output_user(uint8_t output); -uint8_t auto_detect_output(void); -uint8_t where_to_send(void); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 98f9a2e6dfe302ad12844a8ed140bb34ed2c592f Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 20:18:52 +0700 Subject: Fix wrong include --- tmk_core/protocol/lufa/outputselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c index 0110928de..5d2457bff 100644 --- a/tmk_core/protocol/lufa/outputselect.c +++ b/tmk_core/protocol/lufa/outputselect.c @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "quantum.h" +#include "lufa.h" #include "outputselect.h" #ifdef ADAFRUIT_BLE_ENABLE #include "adafruit_ble.h" -- cgit v1.2.3-24-g4f1b From e7c4f621f14b60bde68c01ae076cac49cac9927e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 1 Feb 2017 22:30:06 +0700 Subject: Restrict outputselect to LUFA only for now --- quantum/quantum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 585692d4a..ad957a1b1 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1,5 +1,5 @@ #include "quantum.h" -#if defined(__AVR__) +#ifdef PROTOCOL_LUFA #include "outputselect.h" #endif @@ -215,7 +215,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif - #if defined(__AVR__) + #ifdef PROTOCOL_LUFA case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); -- cgit v1.2.3-24-g4f1b From a3da586505034584c75f4407e9ee1edeba50e0f8 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Wed, 1 Feb 2017 21:57:44 -0500 Subject: Fix V-USB bug on Windows 10 --- tmk_core/protocol/vusb/vusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index a8c13b928..022ac6f6b 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -280,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = { 0x95, 0x06, // Report Count (6), 0x75, 0x08, // Report Size (8), 0x15, 0x00, // Logical Minimum (0), - 0x25, 0xFF, 0x00, // Logical Maximum(255), + 0x26, 0xFF, 0x00, // Logical Maximum(255), 0x05, 0x07, // Usage Page (Key Codes), 0x19, 0x00, // Usage Minimum (0), 0x29, 0xFF, // Usage Maximum (255), @@ -350,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = { 0xa1, 0x01, // COLLECTION (Application) 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 0x15, 0x01, // LOGICAL_MINIMUM (0x1) - 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) + 0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) 0x19, 0x01, // USAGE_MINIMUM (0x1) 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 0x75, 0x10, // REPORT_SIZE (16) -- cgit v1.2.3-24-g4f1b From f787f4291a6e3a363343f80c1c81b13b065ae974 Mon Sep 17 00:00:00 2001 From: Osamu Aoki Date: Thu, 2 Feb 2017 23:15:08 +0900 Subject: Typo fixes --- Makefile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 550be8195..9d9c9629d 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,10 @@ ifdef SILENT endif # We need to make sure that silent is always turned off at the top level -# Otherwise the [OK], [ERROR] and [WARN] messags won't be displayed correctly +# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly override SILENT := false -ON_ERROR := error_occured=1 +ON_ERROR := error_occurred=1 STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) @@ -34,13 +34,13 @@ ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE)) STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) BUILD_DIR := $(ROOT_DIR)/.build TEST_DIR := $(BUILD_DIR)/test -ERROR_FILE := $(BUILD_DIR)/error_occured +ERROR_FILE := $(BUILD_DIR)/error_occurred MAKEFILE_INCLUDED=yes # Helper function to process the newt element of a space separated path # It works a bit like the traditional functional head tail -# so the CURRENT_PATH_ELEMENT will beome the new head +# so the CURRENT_PATH_ELEMENT will become the new head # and the PATH_ELEMENTS are the rest that are still unprocessed define NEXT_PATH_ELEMENT $$(eval CURRENT_PATH_ELEMENT := $$(firstword $$(PATH_ELEMENTS))) @@ -84,7 +84,7 @@ endif # Only consider folders with makefiles, to prevent errors in case there are extra folders KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile))) -#Compability with the old make variables, anything you specify directly on the command line +#Compatibility with the old make variables, anything you specify directly on the command line # always overrides the detected folders ifdef keyboard KEYBOARD := $(keyboard) @@ -106,7 +106,7 @@ endif #$(info Keyboards: $(KEYBOARDS)) -# Set the default goal depening on where we are running make from +# Set the default goal depending on where we are running make from # this handles the case where you run make without any arguments .DEFAULT_GOAL := all ifneq ($(KEYMAP),) @@ -170,7 +170,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3 endef # A recursive helper function for finding the longest match -# $1 The list to be checed +# $1 The list to be checked # It works by always removing the currently matched item from the list # and call itself recursively, until a match is found define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2 @@ -180,7 +180,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2 $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1)) # If a match is found in the current list, otherwise just return what we had before ifeq ($$(RULE_FOUND),true) - # Save the best match so far and call itself recursivel + # Save the best match so far and call itself recursively BEST_MATCH := $$(MATCHED_ITEM) BEST_MATCH_RULE := $$(RULE) RULE_FOUND := false @@ -337,7 +337,7 @@ define PARSE_SUBPROJECT $$(eval $$(call PARSE_ALL_KEYMAPS)) endif else - # As earlier mentione,d when allsb is specified, we call our self recursively + # As earlier mentioned when allsb is specified, we call our self recursively # for all of the subprojects $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS))) endif @@ -403,11 +403,11 @@ define BUILD printf "$$(MAKE_MSG)\n\n"; \ $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; \ if [ $$$$? -gt 0 ]; \ - then error_occured=1; \ + then error_occurred=1; \ fi; endef -# Just parse all the keymaps for a specifc keyboard +# Just parse all the keymaps for a specific keyboard define PARSE_ALL_KEYMAPS $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) endef @@ -428,7 +428,7 @@ define BUILD_TEST printf "$$(TEST_MSG)\n"; \ $$(TEST_EXECUTABLE); \ if [ $$$$? -gt 0 ]; \ - then error_occured=1; \ + then error_occurred=1; \ fi; \ printf "\n"; endif @@ -448,7 +448,7 @@ endef # Set the silent mode depending on if we are trying to compile multiple keyboards or not -# By default it's on in that case, but it can be overriden by specifying silent=false +# By default it's on in that case, but it can be overridden by specifying silent=false # from the command line define SET_SILENT_MODE ifdef SUB_IS_SILENT @@ -465,16 +465,16 @@ include $(ROOT_DIR)/message.mk # The empty line is important here, as it will force a new shell to be created for each command # Otherwise the command line will become too long with a lot of keyboards and keymaps define RUN_COMMAND -+error_occured=0;\ ++error_occurred=0;\ $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ -if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; +if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; endef define RUN_TEST -+error_occured=0;\ ++error_occurred=0;\ $($(TEST)_COMMAND)\ -if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; +if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; endef @@ -514,7 +514,7 @@ endif .PHONY: all all: all-keyboards test-all -# Define some shortcuts, mostly for compability with the old syntax +# Define some shortcuts, mostly for compatibility with the old syntax .PHONY: all-keyboards all-keyboards: allkb-allsp-allkm -- cgit v1.2.3-24-g4f1b From e667e9f6da17c5551379b168cc97647b44972d10 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 3 Feb 2017 21:00:10 -0500 Subject: Fix compile warnings in light_ws2812.c Fixes the warning "function declaration isn't a prototype" by explicitly making the parameter list void. --- quantum/light_ws2812.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c index a883b1388..55bdd9cd8 100755 --- a/quantum/light_ws2812.c +++ b/quantum/light_ws2812.c @@ -70,7 +70,7 @@ void I2C_WriteBit(unsigned char c) // Inits bitbanging port, must be called before using the functions below // -void I2C_Init() +void I2C_Init(void) { I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); @@ -82,7 +82,7 @@ void I2C_Init() // Send a START Condition // -void I2C_Start() +void I2C_Start(void) { // set both to high at the same time I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); @@ -97,7 +97,7 @@ void I2C_Start() // Send a STOP Condition // -void I2C_Stop() +void I2C_Stop(void) { I2C_CLOCK_HI(); _delay_us(I2C_DELAY); -- cgit v1.2.3-24-g4f1b From 3faf06c880ef5fedb4dfaaef2bc35d75c392a076 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 3 Feb 2017 21:06:43 -0500 Subject: Fix compile warnings in egodox robot_test_layout Fixes the warning "right shift count >= width of type" by adding UL to the end of constants. --- keyboards/ergodox/keymaps/robot_test_layout/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c index 480be177f..e9e2597d7 100644 --- a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c +++ b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c @@ -68,7 +68,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_FF0000: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0xff0000); + EZ_RGB(0xff0000UL); register_code(KC_1); unregister_code(KC_1); #endif } @@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_00FF00: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0x00ff00); + EZ_RGB(0x00ff00UL); register_code(KC_2); unregister_code(KC_2); #endif } @@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_0000FF: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0x0000ff); + EZ_RGB(0x0000ffUL); register_code(KC_3); unregister_code(KC_3); #endif } @@ -95,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_FFFFFF: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE - EZ_RGB(0xffffff); + EZ_RGB(0xffffffUL); register_code(KC_4); unregister_code(KC_4); #endif } -- cgit v1.2.3-24-g4f1b From 101465b6edf98ed1a09b2f4db28c6be66b3f52fb Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Fri, 3 Feb 2017 21:09:50 -0500 Subject: Add missing header to ergodox ordinary keymap --- keyboards/ergodox/keymaps/ordinary/keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 302c41cc8..5c01d9678 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -1,5 +1,6 @@ #include "ergodox.h" #include "led.h" +#include "mousekey.h" #include "debug.h" #include "action_layer.h" #include "action_util.h" -- cgit v1.2.3-24-g4f1b From d961c80df2391631f7b3f46afa595ce93f51f217 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Sun, 5 Feb 2017 19:41:08 -0500 Subject: Remove unused matrix_raw variable in matrix.c --- quantum/matrix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/quantum/matrix.c b/quantum/matrix.c index 07eb87bc3..fd312bffb 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -66,7 +66,6 @@ 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_raw[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -166,7 +165,6 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; - matrix_raw[i] = 0; matrix_debouncing[i] = 0; } -- cgit v1.2.3-24-g4f1b From 8cbf61c91923e5399b158f7f9258096cb0089ce2 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Sun, 5 Feb 2017 19:42:00 -0500 Subject: Add new DIODE_DIRECTION option The previous two options were COL2ROW, ROW2COL; this adds CUSTOM_MATRIX to disable the built-in matrix scanning code. Most notably, this obviates the need to set MATRIX_ROW_PINS or MATRIX_COL_PINS. --- quantum/config_common.h | 6 ++++-- quantum/matrix.c | 12 +++++++----- quantum/template/config.h | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/quantum/config_common.h b/quantum/config_common.h index 4bdb2065d..28f68b9c7 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -2,8 +2,10 @@ #define CONFIG_DEFINITIONS_H /* diode directions */ -#define COL2ROW 0 -#define ROW2COL 1 +#define COL2ROW 0 +#define ROW2COL 1 +#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ + /* I/O pins */ #ifndef F0 #define B0 0x30 diff --git a/quantum/matrix.c b/quantum/matrix.c index fd312bffb..ac523482a 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -60,8 +60,10 @@ along with this program. If not, see . extern const matrix_row_t matrix_mask[]; #endif +#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -75,7 +77,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static void unselect_rows(void); static void select_row(uint8_t row); static void unselect_row(uint8_t row); -#else // ROW2COL +#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); @@ -132,7 +134,7 @@ uint8_t matrix_cols(void) { // /* PORTxn */ // _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); // } -// #else +// #elif (DIODE_DIRECTION == ROW2COL) // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { // /* DDRxn */ // _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); @@ -157,7 +159,7 @@ void matrix_init(void) { #if (DIODE_DIRECTION == COL2ROW) unselect_rows(); init_cols(); -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) unselect_cols(); init_rows(); #endif @@ -192,7 +194,7 @@ uint8_t matrix_scan(void) } -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { @@ -334,7 +336,7 @@ static void unselect_rows(void) } } -#else // ROW2COL +#elif (DIODE_DIRECTION == ROW2COL) static void init_rows(void) { diff --git a/quantum/template/config.h b/quantum/template/config.h index b02f0c7eb..c61c4a618 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 -- cgit v1.2.3-24-g4f1b From 06d21009b2198a2941f4c341807ad2290b5967f6 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Sun, 5 Feb 2017 19:55:08 -0500 Subject: Minor cleanup --- tmk_core/common/keyboard.c | 1 + tmk_core/common/matrix.h | 2 +- tmk_core/common/report.h | 7 ------- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 765350792..3aa82231b 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -14,6 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + #include #include "keyboard.h" #include "matrix.h" diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index cee3593ee..2543f5abc 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -50,7 +50,7 @@ void matrix_init(void); uint8_t matrix_scan(void); /* whether modified from previous scan. used after matrix_scan. */ bool matrix_is_modified(void) __attribute__ ((deprecated)); -/* whether a swtich is on */ +/* whether a switch is on */ bool matrix_is_on(uint8_t row, uint8_t col); /* matrix state on row */ matrix_row_t matrix_get_row(uint8_t row); diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 0c799eca3..8fb28b6ce 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -134,13 +134,6 @@ typedef union { } nkro; #endif } __attribute__ ((packed)) report_keyboard_t; -/* -typedef struct { - uint8_t mods; - uint8_t reserved; - uint8_t keys[REPORT_KEYS]; -} __attribute__ ((packed)) report_keyboard_t; -*/ typedef struct { uint8_t buttons; -- cgit v1.2.3-24-g4f1b From 21015918b405d4ec5f8fc3517accff28f6ebdf17 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Mon, 6 Feb 2017 12:40:32 +0000 Subject: change cmd-l and cmd-r for actual home and end --- keyboards/planck/keymaps/callum/keymap.c | 6 ++---- keyboards/planck/keymaps/callum/readme.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index a1254d975..2acd988ea 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -12,8 +12,6 @@ extern keymap_config_t keymap_config; #define _SYMB 2 #define _MOUSE 3 #define _FUNC 4 -#define CMDLEFT LGUI(KC_LEFT) -#define CMDRGHT LGUI(KC_RGHT) #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) @@ -50,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | + * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index f970cd974..71e200b9d 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -23,7 +23,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | + * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| -- cgit v1.2.3-24-g4f1b From 835cacb031faabadf2c09de51323506f8f41b4ef Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:04:28 -0500 Subject: fixes qmk.fm linking, tests out auto version incrementing --- util/travis_compiled_push.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f432976d0..9f23db972 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,6 +7,25 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +increment_version () +{ + declare -a part=( ${1//\./ } ) + part[2]=$((part[2] + 1)) + new="${part[*]}" + echo -e "${new// /.}" +} + +NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) +if [[ $NEFM -gt 0 ]] ; then + echo "Essential files modified." + lasttag=$(git tag | grep -Ev '\-' | head -1) + newtag=$(increment_version $lasttag) + git tag $newtag + git push --tags +else + echo "No essential files modified." +fi + make ergodox-ez AUTOGEN=true find . -name ".build" | xargs rm -rf @@ -23,5 +42,5 @@ cp ../qmk_firmware/readme.md qmk_readme.md ./generate.sh git add -A -git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}" +git commit -m "generated from qmk/qmk_firmware@${rev}" git push -- cgit v1.2.3-24-g4f1b From 3a76f24cbdd0894af85fee79e371c5ca7cda0f71 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:42:18 -0500 Subject: [skip build] testing travis script --- .travis.yml | 4 +++- util/travis_compiled_push.sh | 40 ++++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index b206d1451..e904d8af8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,9 @@ install: before_script: - avr-gcc --version script: -- make $TARGET AUTOGEN=$AUTOGEN +- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then +make $TARGET AUTOGEN=$AUTOGEN +fi' addons: apt: packages: diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 9f23db972..f12da913c 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -26,21 +26,25 @@ else echo "No essential files modified." fi -make ergodox-ez AUTOGEN=true - -find . -name ".build" | xargs rm -rf -cd .. -git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git -cd qmk.fm -git submodule update --init --recursive -rm -rf keyboard -rm -rf keyboards -cp -r ../qmk_firmware/keyboards . -mkdir keyboards/ergodox_ez/ -cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html -cp ../qmk_firmware/readme.md qmk_readme.md -./generate.sh - -git add -A -git commit -m "generated from qmk/qmk_firmware@${rev}" -git push +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + + make ergodox-ez AUTOGEN=true + + find . -name ".build" | xargs rm -rf + cd .. + git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git + cd qmk.fm + git submodule update --init --recursive + rm -rf keyboard + rm -rf keyboards + cp -r ../qmk_firmware/keyboards . + mkdir keyboards/ergodox_ez/ + cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html + cp ../qmk_firmware/readme.md qmk_readme.md + ./generate.sh + + git add -A + git commit -m "generated from qmk/qmk_firmware@${rev}" + git push + +fi \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 470c8436c2428dba885dfa6e4b7d4f5e725a9d07 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:46:44 -0500 Subject: [skip build] testing travis script --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e904d8af8..1a0a7bf15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,9 +19,7 @@ install: before_script: - avr-gcc --version script: -- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then -make $TARGET AUTOGEN=$AUTOGEN -fi' +- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi' addons: apt: packages: -- cgit v1.2.3-24-g4f1b From 98adda34c9095658fcc6a294a13f1264752b4df6 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:54:54 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f12da913c..f1b4b2ae5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -21,7 +21,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-$TRAVIS_BRANCH else echo "No essential files modified." fi -- cgit v1.2.3-24-g4f1b From cf8dac3538feffe4d52c0776456dd67d5787b059 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:56:39 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f1b4b2ae5..d0bb0db55 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,6 +7,8 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +if [[ "$TRAVIS_BRANCH" == "master" ]] ; then + increment_version () { declare -a part=( ${1//\./ } ) @@ -21,7 +23,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-$TRAVIS_BRANCH + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-master else echo "No essential files modified." fi @@ -47,4 +49,6 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git commit -m "generated from qmk/qmk_firmware@${rev}" git push +fi + fi \ No newline at end of file -- cgit v1.2.3-24-g4f1b From ee386a29d1a8b46f16c5c139db74624f829d9a53 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 17:00:30 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index d0bb0db55..b70999c72 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -23,7 +23,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-master + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware else echo "No essential files modified." fi -- cgit v1.2.3-24-g4f1b From 0e548f8b5d6b89de877f098ea919eaea87511b6e Mon Sep 17 00:00:00 2001 From: dungdung Date: Mon, 6 Feb 2017 14:08:21 -0800 Subject: Christmas mode now works with even RGBED_NUM Added Christmas mode steps to reduce red and green colors blending into each other Added Christmas mode interval Increased green hue to 120 --- quantum/rgblight.c | 8 ++++---- quantum/rgblight.h | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 52a09817a..f91f3caff 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -237,7 +237,7 @@ void rgblight_mode(uint8_t mode) { #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif - } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) { + } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) { // MODE 2-5, breathing // MODE 6-8, rainbow mood // MODE 9-14, rainbow swirl @@ -450,7 +450,7 @@ void rgblight_task(void) { } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { // mode = 21 to 23, knight mode rgblight_effect_knight(rgblight_config.mode - 21); - } else { + } else if (rgblight_config.mode == 24) { // mode = 24, christmas mode rgblight_effect_christmas(); } @@ -604,13 +604,13 @@ void rgblight_effect_christmas(void) { static uint16_t last_timer = 0; uint16_t hue; uint8_t i; - if (timer_elapsed(last_timer) < 1000) { + if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) { return; } last_timer = timer_read(); current_offset = (current_offset + 1) % 2; for (i = 0; i < RGBLED_NUM; i++) { - hue = 0 + ((RGBLED_NUM * (i + current_offset)) % 2) * 80; + hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120; sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); } rgblight_set(); diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 726b8de72..12e858305 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -22,6 +22,14 @@ #define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4 #endif +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +#endif + #ifndef RGBLIGHT_HUE_STEP #define RGBLIGHT_HUE_STEP 10 #endif -- cgit v1.2.3-24-g4f1b From 5a1b68d562036ff26820069baafe40654eef70a3 Mon Sep 17 00:00:00 2001 From: dungdung Date: Mon, 6 Feb 2017 14:09:29 -0800 Subject: Added mode reverse step function --- quantum/rgblight.c | 8 ++++++++ quantum/rgblight.h | 1 + 2 files changed, 9 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f91f3caff..7e057b63e 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -219,6 +219,14 @@ void rgblight_step(void) { } rgblight_mode(mode); } +void rgblight_step_reverse(void) { + uint8_t mode = 0; + mode = rgblight_config.mode - 1; + if (mode < 1) { + mode = RGBLIGHT_MODES; + } + rgblight_mode(mode); +} void rgblight_mode(uint8_t mode) { if (!rgblight_config.enable) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 12e858305..a63b24604 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -73,6 +73,7 @@ void rgblight_decrease(void); void rgblight_toggle(void); void rgblight_enable(void); void rgblight_step(void); +void rgblight_step_reverse(void); void rgblight_mode(uint8_t mode); void rgblight_set(void); void rgblight_update_dword(uint32_t dword); -- cgit v1.2.3-24-g4f1b From a7882b1ffceb6002dd1adf916a8fc32523227860 Mon Sep 17 00:00:00 2001 From: dungdung Date: Mon, 6 Feb 2017 14:14:56 -0800 Subject: Added non-animated gradient mode --- quantum/rgblight.c | 19 +++++++++++++++++++ quantum/rgblight.h | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 7e057b63e..dd1b91c63 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -66,6 +66,8 @@ __attribute__ ((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; __attribute__ ((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; +__attribute__ ((weak)) +const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; rgblight_config_t rgblight_config; rgblight_config_t inmem_config; @@ -255,6 +257,12 @@ void rgblight_mode(uint8_t mode) { #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); #endif + } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { + // MODE 25-34, static gradient + + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif } rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } @@ -358,6 +366,17 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { // rainbow mood and rainbow swirl, ignore the change of hue hue = rgblight_config.hue; + } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { + // static gradient + uint16_t _hue; + int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1; + uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]); + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360; + dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); + } + rgblight_set(); } } rgblight_config.hue = hue; diff --git a/quantum/rgblight.h b/quantum/rgblight.h index a63b24604..2b3e791bf 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -2,7 +2,7 @@ #define RGBLIGHT_H #ifdef RGBLIGHT_ANIMATIONS - #define RGBLIGHT_MODES 24 + #define RGBLIGHT_MODES 34 #else #define RGBLIGHT_MODES 1 #endif -- cgit v1.2.3-24-g4f1b From 5c8cdfd2b579c198ad37504772e663783f530685 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 17:51:20 -0500 Subject: [skip build] testing travis script --- .travis.yml | 1 + util/travis_compiled_push.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1a0a7bf15..792f2cd05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ language: c branches: except: - /^.*-automated-build$/ + - /^[0-9]+\.[0-9]+\.[0-9]+/ env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index b70999c72..8025ccb8f 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -20,7 +20,8 @@ increment_version () NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." - lasttag=$(git tag | grep -Ev '\-' | head -1) + git fetch --tags + lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware -- cgit v1.2.3-24-g4f1b From 35edb382ee6390e1208806ce74d7dc1f4ab08f5d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 18:28:37 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 8025ccb8f..3751da1e5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -21,7 +21,7 @@ NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/ if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." git fetch --tags - lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -1) + lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware -- cgit v1.2.3-24-g4f1b From 0537977ba1412aa2ba753e152eec445e18858244 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 6 Feb 2017 19:14:57 -0500 Subject: Reverse rev2 and rev2fliphalf Flipped definitions on what constitutes "fliphalf" by popular demand. --- keyboards/lets_split/rev2/config.h | 6 +++--- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index b34d7c004..1c45cf136 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -35,10 +35,10 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -#define CATERINA_BOOTLOADER +//#define CATERINA_BOOTLOADER /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 7c397912f..990976de2 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3-24-g4f1b From 5d55a44afa97386798bf7dd760123fbde8d35a28 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 6 Feb 2017 19:21:21 -0500 Subject: Revert "Reverse rev2 and rev2fliphalf" This reverts commit 0537977ba1412aa2ba753e152eec445e18858244. --- keyboards/lets_split/rev2/config.h | 6 +++--- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 1c45cf136..b34d7c004 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -35,10 +35,10 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } -//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order -//#define CATERINA_BOOTLOADER +#define CATERINA_BOOTLOADER /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 990976de2..7c397912f 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3-24-g4f1b From 2a2be010d9d8c10d872c01637f4b4cd263f9bc1b Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 6 Feb 2017 19:23:10 -0500 Subject: Reverse rev2 and rev2fliphalf Flipped definitions on what constitutes "fliphalf" by popular demand. --- keyboards/lets_split/rev2/rev2.h | 8 ++++---- keyboards/lets_split/rev2fliphalf/rev2fliphalf.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 7c397912f..990976de2 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h index 993e149dd..7dc8e5ba8 100644 --- a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3-24-g4f1b From 3dbdd153040087f23d63204b142f355936ae8bc0 Mon Sep 17 00:00:00 2001 From: Nic Aitch Date: Mon, 6 Feb 2017 19:57:34 -0600 Subject: Check for a new serial port every second --- keyboards/lets_split/rules.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 0dc549130..0efa78550 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -76,10 +76,12 @@ CUSTOM_MATRIX = yes avrdude: build ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro then hit any key to continue..."; \ - read -n 1 -s; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex .PHONY: avrdude -- cgit v1.2.3-24-g4f1b From 19d63ad72c012ee3dfb9375724067b278593df8a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:35:10 -0500 Subject: try building only keyboards needed --- .travis.yml | 6 ++---- util/travis_build.sh | 18 ++++++++++++++++++ util/travis_compiled_push.sh | 6 +++--- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 util/travis_build.sh diff --git a/.travis.yml b/.travis.yml index 792f2cd05..093f13be6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,6 @@ branches: env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= - 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: @@ -20,7 +17,8 @@ install: before_script: - avr-gcc --version script: -- 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi' +- make test AUTOGET=false +- bash util/travis_build.sh addons: apt: packages: diff --git a/util/travis_build.sh b/util/travis_build.sh new file mode 100644 index 000000000..df2e06960 --- /dev/null +++ b/util/travis_build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" +TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" + +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) + if [[ $NEFM -gt 0 ]] ; then + echo "Making all keymaps for all keyboards" + make all-keyboards AUTOGEN=true + else + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) + for KB in $MKB ; do + echo "Making all keymaps for $KB" + make "$KB" AUTOGEN=true + done + fi +fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 3751da1e5..6ec558cac 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -38,9 +38,9 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git cd qmk.fm git submodule update --init --recursive - rm -rf keyboard - rm -rf keyboards - cp -r ../qmk_firmware/keyboards . + #rm -rf keyboard + #rm -rf keyboards + yes | cp -rf ../qmk_firmware/keyboards . mkdir keyboards/ergodox_ez/ cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html cp ../qmk_firmware/readme.md qmk_readme.md -- cgit v1.2.3-24-g4f1b From f79f38d72637956132112014bd2eb000122cb06a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:53:46 -0500 Subject: add comma --- keyboards/planck/keymaps/yale/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index a0910860a..f2280778a 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUM] = { {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, - {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} }, -- cgit v1.2.3-24-g4f1b From c8d5376f11642aaaae9a247287db30d5b226c3b9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:54:58 -0500 Subject: fix typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 093f13be6..ebd4cc182 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: before_script: - avr-gcc --version script: -- make test AUTOGET=false +- make test AUTOGEN=false - bash util/travis_build.sh addons: apt: -- cgit v1.2.3-24-g4f1b From 6a92cc28977ff4d51fa0bafcb757867b27ebdb45 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 02:00:07 -0500 Subject: correctly assign bash variable --- .travis.yml | 2 +- util/travis_build.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebd4cc182..28f01ecb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: before_script: - avr-gcc --version script: -- make test AUTOGEN=false +- make test AUTOGEN="false" - bash util/travis_build.sh addons: apt: diff --git a/util/travis_build.sh b/util/travis_build.sh index df2e06960..38c1ffc65 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -7,12 +7,12 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Making all keymaps for all keyboards" - make all-keyboards AUTOGEN=true + make all-keyboards AUTOGEN="true" else MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" - make "$KB" AUTOGEN=true + make "$KB" AUTOGEN="true" done fi fi -- cgit v1.2.3-24-g4f1b From 616b8604b0b0f7e281ecfeff385d96a6a14955da Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 11:53:43 -0500 Subject: variable scope fix for travis --- .travis.yml | 6 ++---- util/travis_build.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28f01ecb0..18ecde7e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: before_script: - avr-gcc --version script: -- make test AUTOGEN="false" +- make test AUTOGEN=false - bash util/travis_build.sh addons: apt: @@ -29,6 +29,4 @@ addons: - libnewlib-arm-none-eabi - diffutils after_success: - if [ "$AUTOGEN" == "true" ]; then - bash util/travis_compiled_push.sh; - fi + bash util/travis_compiled_push.sh diff --git a/util/travis_build.sh b/util/travis_build.sh index 38c1ffc65..fab9178de 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -12,7 +12,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" - make "$KB" AUTOGEN="true" + make "$KB" AUTOGEN=true done fi fi -- cgit v1.2.3-24-g4f1b From de659486f52db6492be6ca03ce5450690f5d891d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 12:36:25 -0500 Subject: pass through travis errors --- keyboards/handwired/onekey/keymaps/default/keymap.c | 2 +- util/travis_build.sh | 4 ++++ util/travis_compiled_push.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c index 756c4f51e..10c486718 100644 --- a/keyboards/handwired/onekey/keymaps/default/keymap.c +++ b/keyboards/handwired/onekey/keymaps/default/keymap.c @@ -1,5 +1,5 @@ #include "onekey.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - { KC_A } + {{ KC_A }} }; diff --git a/util/travis_build.sh b/util/travis_build.sh index fab9178de..794b0d3a1 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -4,15 +4,19 @@ TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + exit_code=0 NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Making all keymaps for all keyboards" make all-keyboards AUTOGEN="true" + : $((exit_code = $exit_code + $?)) else MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" make "$KB" AUTOGEN=true + : $((exit_code = $exit_code + $?)) done fi + exit $exit_code fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 6ec558cac..de2481ce5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -41,7 +41,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then #rm -rf keyboard #rm -rf keyboards yes | cp -rf ../qmk_firmware/keyboards . - mkdir keyboards/ergodox_ez/ + #mkdir keyboards/ergodox_ez/ cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html cp ../qmk_firmware/readme.md qmk_readme.md ./generate.sh -- cgit v1.2.3-24-g4f1b From b4e30d392969b000eb9a87065fc1caaf33d670e1 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 15:23:56 -0500 Subject: added functionality for just a port --- quantum/quantum.c | 94 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index d3905decf..45ea8cb73 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -594,34 +594,45 @@ static const uint8_t backlight_pin = BACKLIGHT_PIN; # define COM1x1 COM1A1 # define OCR1x OCR1A #else -# error "Backlight pin not supported - use B5, B6, or B7" +# define NO_BACKLIGHT_CLOCK +#endif + +#ifndef BACKLIGHT_ON_STATE +#define BACKLIGHT_ON_STATE 0 #endif __attribute__ ((weak)) void backlight_init_ports(void) { - // Setup backlight pin as output and output low. + // Setup backlight pin as output and output to on state. // DDRx |= n _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF); - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #if BACKLIGHT_ON_STATE == 0 + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #else + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #endif - // Use full 16-bit resolution. - ICR1 = 0xFFFF; + #ifndef NO_BACKLIGHT_CLOCK + // Use full 16-bit resolution. + ICR1 = 0xFFFF; - // I could write a wall of text here to explain... but TL;DW - // Go read the ATmega32u4 datasheet. - // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on + // I could write a wall of text here to explain... but TL;DW + // Go read the ATmega32u4 datasheet. + // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on - // Pin PB7 = OCR1C (Timer 1, Channel C) - // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 - // (i.e. start high, go low when counter matches.) - // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 - // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 + // Pin PB7 = OCR1C (Timer 1, Channel C) + // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 + // (i.e. start high, go low when counter matches.) + // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 + // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 - TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010; - TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; + TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010; + TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; + #endif backlight_init(); #ifdef BACKLIGHT_BREATHING @@ -633,24 +644,43 @@ __attribute__ ((weak)) void backlight_set(uint8_t level) { // Prevent backlight blink on lowest level - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #if BACKLIGHT_ON_STATE == 0 + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #else + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #endif if ( level == 0 ) { - // Turn off PWM control on backlight pin, revert to output low. - TCCR1A &= ~(_BV(COM1x1)); - OCR1x = 0x0; - } else if ( level == BACKLIGHT_LEVELS ) { - // Turn on PWM control of backlight pin - TCCR1A |= _BV(COM1x1); - // Set the brightness - OCR1x = 0xFFFF; - } else { - // Turn on PWM control of backlight pin - TCCR1A |= _BV(COM1x1); - // Set the brightness - OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); - } + #ifndef NO_BACKLIGHT_CLOCK + // Turn off PWM control on backlight pin, revert to output low. + TCCR1A &= ~(_BV(COM1x1)); + OCR1x = 0x0; + #else + #if BACKLIGHT_ON_STATE == 0 + // PORTx |= n + _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); + #else + // PORTx &= ~n + _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); + #endif + #endif + } + #ifndef NO_BACKLIGHT_CLOCK + else if ( level == BACKLIGHT_LEVELS ) { + // Turn on PWM control of backlight pin + TCCR1A |= _BV(COM1x1); + // Set the brightness + OCR1x = 0xFFFF; + } + else { + // Turn on PWM control of backlight pin + TCCR1A |= _BV(COM1x1); + // Set the brightness + OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); + } + #endif #ifdef BACKLIGHT_BREATHING breathing_intensity_default(); -- cgit v1.2.3-24-g4f1b From 9c02e2ab49f020218f39f386fcbe2edfcea3d810 Mon Sep 17 00:00:00 2001 From: Jimmy Chan Date: Mon, 6 Feb 2017 08:42:38 -0800 Subject: correctly put eeprom EE_HANDS at addr 0x0a (decimal 10). default to rev2 project. do not default EE_HANDS for the serial keymap if you compare split_util.h with the original project by ahtn, the address we look for isLeftHand config went from addr 7 to addr 10 (decimal). The EEP files were not updated. EE_HANDS should not be enabled by default since it's more confusing for most users --- keyboards/lets_split/Makefile | 4 +++- keyboards/lets_split/eeprom-lefthand.eep | 2 +- keyboards/lets_split/eeprom-righthand.eep | 2 +- keyboards/lets_split/keymaps/serial/config.h | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile index 4e2a6f00f..f5c87d4d6 100644 --- a/keyboards/lets_split/Makefile +++ b/keyboards/lets_split/Makefile @@ -1,3 +1,5 @@ +SUBPROJECT_DEFAULT = rev2 + ifndef MAKEFILE_INCLUDED include ../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/lets_split/eeprom-lefthand.eep b/keyboards/lets_split/eeprom-lefthand.eep index a92200b12..b9666a74c 100644 --- a/keyboards/lets_split/eeprom-lefthand.eep +++ b/keyboards/lets_split/eeprom-lefthand.eep @@ -1,2 +1,2 @@ -:080000000000000000000001F7 +:0B0000000000000000000000000001F4 :00000001FF diff --git a/keyboards/lets_split/eeprom-righthand.eep b/keyboards/lets_split/eeprom-righthand.eep index 91a683170..94cc5be7f 100644 --- a/keyboards/lets_split/eeprom-righthand.eep +++ b/keyboards/lets_split/eeprom-righthand.eep @@ -1,2 +1,2 @@ -:080000000000000000000000F8 +:0B0000000000000000000000000000F5 :00000001FF diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index 0e59b191b..753f422dd 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . #define USE_SERIAL -#define EE_HANDS +// #define EE_HANDS #ifdef SUBPROJECT_rev1 @@ -29,4 +29,4 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2fliphalf #include "../../rev2fliphalf/config.h" -#endif \ No newline at end of file +#endif -- cgit v1.2.3-24-g4f1b From 048ef311dc5a92d736c8b0778334bfa82f8f42a8 Mon Sep 17 00:00:00 2001 From: Jimmy Chan Date: Mon, 6 Feb 2017 09:53:38 -0800 Subject: udpate readme to reflect QMK and not having the Makefile from ahtn's repo --- keyboards/lets_split/readme.md | 86 +++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 14 deletions(-) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index a63ce5907..0e903065e 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -6,9 +6,45 @@ This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 based boards. + +## First Time Setup + +Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using: + +``` +$ make rev2 +``` + +You will see a lot of output and if everything worked correctly you will see the built hex files: + +``` +lets_split_rev2_serial.hex +lets_split_rev2_i2c.hex +``` + +If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: + + +``` +$ make rev2-YOUR_KEYMAP_NAME +``` + +If everything worked correctly you will see a file: + +``` +lets_split_rev2_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. + +### Let's split 1.0 +If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead. + Features -------- +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + Some features supported by the firmware: * Either half can connect to the computer via USB, or both halves can be used @@ -62,7 +98,7 @@ unnecessary in simple use cases. Notes on Software Configuration ------------------------------- -Configuring the firmware is similar to any other TMK project. One thing +Configuring the firmware is similar to any other QMK project. One thing to note is that `MATIX_ROWS` in `config.h` is the total number of rows between the two halves, i.e. if your split keyboard has 4 rows in each half, then `MATRIX_ROWS=8`. @@ -70,37 +106,59 @@ the two halves, i.e. if your split keyboard has 4 rows in each half, then Also the current implementation assumes a maximum of 8 columns, but it would not be very difficult to adapt it to support more if required. - Flashing +------- +From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +Example: `make rev2-serial-avrdude` + + +Choosing which board to plug the USB cable into (choosing Master) -------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. -Example: `make rev2-serial-avrdude` +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define I2C_MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master If you define `EE_HANDS` in your `config.h`, you will need to set the -EEPROM for the left and right halves. The EEPROM is used to store whether the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the half is left handed or right handed. This makes it so that the same firmware file will run on both hands instead of having to flash left and right handed versions of the firmware to each half. To flash the EEPROM file for the left half run: ``` -make eeprom-left +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + ``` and similarly for right half ``` -make eeprom-right +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer ``` -After you have flashed the EEPROM for the first time, you then need to program -the flash memory: -``` -make program -``` +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + Note that you need to program both halves, but you have the option of using different keymaps for each half. You could program the left half with a QWERTY -layout and the right half with a Colemak layout. Then if you connect the left -half to a computer by USB the keyboard will use QWERTY and Colemak when the +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the right half is connected. -- cgit v1.2.3-24-g4f1b From 56d2198b3d85f112317b4b0d09d5cf6a5c915db8 Mon Sep 17 00:00:00 2001 From: Jimmy Chan Date: Mon, 6 Feb 2017 10:03:48 -0800 Subject: rename I2C_MASTER_RIGHT to MASTER_RIGHT since this works for serial as well --- keyboards/lets_split/keymaps/i2c/config.h | 7 ++++--- keyboards/lets_split/keymaps/serial/config.h | 2 ++ keyboards/lets_split/readme.md | 4 ++-- keyboards/lets_split/split_util.c | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index 332c990fc..013542731 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -16,8 +16,9 @@ along with this program. If not, see . */ #define USE_I2C -#define I2C_MASTER_LEFT -// #define I2C_MASTER_RIGHT +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" @@ -27,4 +28,4 @@ along with this program. If not, see . #endif #ifdef SUBPROJECT_rev2fliphalf #include "../../rev2fliphalf/config.h" -#endif \ No newline at end of file +#endif diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index 753f422dd..ba271d1ac 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -18,6 +18,8 @@ along with this program. If not, see . #define USE_SERIAL +#define MASTER_LEFT +// #define _MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 0e903065e..ecce3f415 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -123,12 +123,12 @@ The EEPROM approach requires additional setup (flashing the eeeprom) but allows The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. ### Setting the left hand as master -If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` if for some reason it was set. +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. ### Setting the right hand as master If you always plug the usb cable into the right board, add an extra flag to your `config.h` ``` - #define I2C_MASTER_RIGHT + #define MASTER_RIGHT ``` ### Setting EE_hands to use either hands as master diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 461921798..226dc1881 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -21,7 +21,8 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - #ifdef I2C_MASTER_RIGHT + // 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(); -- cgit v1.2.3-24-g4f1b From 304d84cd0835faaa3b95d1c3be48399a423f9944 Mon Sep 17 00:00:00 2001 From: dungdung Date: Tue, 7 Feb 2017 16:55:40 -0800 Subject: Moved KC60 capslock LED code to standard led_set_kb so it can be overridden by users --- keyboards/kc60/kc60.c | 15 +++++++++++++++ keyboards/kc60/led.c | 31 ------------------------------- keyboards/kc60/rules.mk | 3 --- 3 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 keyboards/kc60/led.c diff --git a/keyboards/kc60/kc60.c b/keyboards/kc60/kc60.c index 746ac634a..09b924b28 100644 --- a/keyboards/kc60/kc60.c +++ b/keyboards/kc60/kc60.c @@ -1 +1,16 @@ #include "kc60.h" + +void led_set_kb(uint8_t usb_led) +{ + if (usb_led & (1< -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1< Date: Tue, 7 Feb 2017 20:51:50 -0500 Subject: accept numbers in travis build --- util/travis_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/travis_build.sh b/util/travis_build.sh index 794b0d3a1..2d43f3e5e 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -11,7 +11,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make all-keyboards AUTOGEN="true" : $((exit_code = $exit_code + $?)) else - MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)' | sort -u) for KB in $MKB ; do echo "Making all keymaps for $KB" make "$KB" AUTOGEN=true -- cgit v1.2.3-24-g4f1b From 9a64eb8533a9001638e2c5c62d084a3fd7dd07a1 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 10:01:39 +0100 Subject: updated bone2planck keymap & readme --- keyboards/planck/keymaps/bone2planck/Makefile | 14 ++--- keyboards/planck/keymaps/bone2planck/config.h | 5 +- keyboards/planck/keymaps/bone2planck/keymap.c | 23 ++++---- keyboards/planck/keymaps/bone2planck/readme.md | 82 ++++++++++++++++++++++++-- 4 files changed, 98 insertions(+), 26 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/Makefile b/keyboards/planck/keymaps/bone2planck/Makefile index cf2c31f0f..39635192e 100644 --- a/keyboards/planck/keymaps/bone2planck/Makefile +++ b/keyboards/planck/keymaps/bone2planck/Makefile @@ -1,20 +1,16 @@ -# Please remove if no longer applicable -$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD) -$(warning Please disable some options in the Makefile to resolve) - # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# 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) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. diff --git a/keyboards/planck/keymaps/bone2planck/config.h b/keyboards/planck/keymaps/bone2planck/config.h index 60aff6db0..3e9e692d3 100644 --- a/keyboards/planck/keymaps/bone2planck/config.h +++ b/keyboards/planck/keymaps/bone2planck/config.h @@ -1,7 +1,8 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#endif #include "../../config.h" -#define PREVENT_STUCK_MODIFIERS \ No newline at end of file +#define PREVENT_STUCK_MODIFIERS + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 69d164b8c..63fd2f1fc 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -7,10 +7,10 @@ // for intellisense, has to be commented for building /* #include "..\..\..\..\quantum\keymap_extras\keymap_german.h" -#include "..\..\..\..\quantum\keymap_common.h" #include "..\..\..\..\tmk_core\common\keycode.h" */ + #define _______ KC_TRNS /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. @@ -23,7 +23,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Bone2 +/* Bone2 (adapted) * ,-----------------------------------------------------------------------------------. * | Q | J | D | U | A | X | P | H | L | M | W | ẞ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* M1 Special Characters -very ergonomic placement for coding +* very ergonomic placement for coding * ,-----------------------------------------------------------------------------------. * | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -56,12 +56,12 @@ very ergonomic placement for coding [1] = { { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, - { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, + { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } }, -/* Navigation & Number Blocks -very easy to get used to & intuituve placement +/* M2 Navigation & Number Blocks +* very easy to get used to & intuituve placement * ,-----------------------------------------------------------------------------------. * | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -79,8 +79,8 @@ very easy to get used to & intuituve placement { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } }, -/* Flipped Navigation & Number Blocks for one handed use -accessed by sliding from M2 to M3 with thumb +/* M3 Switched Navigation & Number Blocks for one handed use +* accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. * | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -100,8 +100,7 @@ accessed by sliding from M2 to M3 with thumb }, -/* Function & Media Keys -slide from m4 to m5 to access flipped version +/* M4 Function & Media Keys * ,-----------------------------------------------------------------------------------. * | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -120,7 +119,8 @@ slide from m4 to m5 to access flipped version }, -/* flipped Function & Media Keys +/* M5 Switched Function & Media Keys| +* accessed by sliding from M4 to M5 with thumb * ,-----------------------------------------------------------------------------------. * | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -139,6 +139,7 @@ slide from m4 to m5 to access flipped version } }; + const uint16_t PROGMEM fn_actions[] = { }; diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 3c425efdd..4d19c3c11 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -1,8 +1,82 @@ -check keymap.c to the layers +Bone2Planck This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. -My favourite features are the placement of the special characters often used for programming right on the home row -and the number & navigation block combo, so you never have to move your hands from their home position. +The special character layer and the navigation & number block layer are inspired by the Neo2 layers, +designed to keep the fingers near the home row. -Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone \ No newline at end of file +Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone + +* Bone2 (adapted) Base Layer +* ,-----------------------------------------------------------------------------------. +* | Q | J | D | U | A | X | P | H | L | M | W | ẞ | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M1 Special Characters +* very ergonomic placement for coding +* ,-----------------------------------------------------------------------------------. +* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M2 Navigation & Number Blocks +* very easy to get used to & intuituve placement +* ,-----------------------------------------------------------------------------------. +* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M4 Function & Media Keys +* ,-----------------------------------------------------------------------------------. +* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + + + +Switched layers for one handed access: + +* M3 Switched Navigation & Number Blocks for one handed use +* accessed by sliding from M2 to M3 with thumb +* ,-----------------------------------------------------------------------------------. +* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' + +* M5 Switched Function & Media Keys| +* accessed by sliding from M4 to M5 with thumb +* ,-----------------------------------------------------------------------------------. +* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | +* `-----------------------------------------------------------------------------------' \ No newline at end of file -- cgit v1.2.3-24-g4f1b From cb590bb37bf5d460db872680c0324f90c0aedea5 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 11:21:52 +0100 Subject: updated readme --- keyboards/planck/keymaps/bone2planck/readme.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 4d19c3c11..1469ce988 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -1,4 +1,5 @@ Bone2Planck +===================================== This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. @@ -7,7 +8,9 @@ designed to keep the fingers near the home row. Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone -* Bone2 (adapted) Base Layer +To build, run "make" from within the \bone2planck folder. + +## Bone2 (adapted) Base Layer * ,-----------------------------------------------------------------------------------. * | Q | J | D | U | A | X | P | H | L | M | W | ẞ | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -18,7 +21,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M1 Special Characters +## M1 Special Characters * very ergonomic placement for coding * ,-----------------------------------------------------------------------------------. * | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | @@ -30,7 +33,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M2 Navigation & Number Blocks +## M2 Navigation & Number Blocks * very easy to get used to & intuituve placement * ,-----------------------------------------------------------------------------------. * | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | @@ -42,7 +45,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone * | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M4 Function & Media Keys +## M4 Function & Media Keys * ,-----------------------------------------------------------------------------------. * | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -55,9 +58,9 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone -Switched layers for one handed access: +##Switched layers for one handed access: -* M3 Switched Navigation & Number Blocks for one handed use +### M3 Switched Navigation & Number Blocks for one handed use * accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. * | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | @@ -69,7 +72,7 @@ Switched layers for one handed access: * | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' -* M5 Switched Function & Media Keys| +### M5 Switched Function & Media Keys| * accessed by sliding from M4 to M5 with thumb * ,-----------------------------------------------------------------------------------. * | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | -- cgit v1.2.3-24-g4f1b From 1becbcb013bbad5ec9a30f017a3565e99211ea08 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 11:25:50 +0100 Subject: readme formatting changes --- keyboards/planck/keymaps/bone2planck/readme.md | 122 ++++++++++++------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 1469ce988..2a5db61f2 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -1,7 +1,7 @@ Bone2Planck ===================================== -This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. +This layout tries to emulate the Bone2 variant of Neo2, and is intended to be used with a German QWERTZ softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. The special character layer and the navigation & number block layer are inspired by the Neo2 layers, designed to keep the fingers near the home row. @@ -11,75 +11,75 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone To build, run "make" from within the \bone2planck folder. ## Bone2 (adapted) Base Layer -* ,-----------------------------------------------------------------------------------. -* | Q | J | D | U | A | X | P | H | L | M | W | ẞ | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + ,-----------------------------------------------------------------------------------. + | Q | J | D | U | A | X | P | H | L | M | W | ẞ | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Tab/Enter + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ## M1 Special Characters -* very ergonomic placement for coding -* ,-----------------------------------------------------------------------------------. -* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + very ergonomic placement for coding + ,-----------------------------------------------------------------------------------. + | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Tab/Enter + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ## M2 Navigation & Number Blocks -* very easy to get used to & intuituve placement -* ,-----------------------------------------------------------------------------------. -* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + very easy to get used to & intuituve placement + ,-----------------------------------------------------------------------------------. + | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ## M4 Function & Media Keys -* ,-----------------------------------------------------------------------------------. -* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' + ,-----------------------------------------------------------------------------------. + | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' ##Switched layers for one handed access: -### M3 Switched Navigation & Number Blocks for one handed use -* accessed by sliding from M2 to M3 with thumb -* ,-----------------------------------------------------------------------------------. -* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' +### M3 Switched Navigation & Number Blocks + accessed by sliding from M2 to M3 with thumb + ,-----------------------------------------------------------------------------------. + | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' -### M5 Switched Function & Media Keys| -* accessed by sliding from M4 to M5 with thumb -* ,-----------------------------------------------------------------------------------. -* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | -* |------+------+------+------+------+-------------+------+------+------+------+------| -* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | -* |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | -* |------+------+------+------+------+------+------+------+------+------+------+------| -* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | -* `-----------------------------------------------------------------------------------' \ No newline at end of file +### M5 Switched Function & Media Keys + accessed by sliding from M4 to M5 with thumb + ,-----------------------------------------------------------------------------------. + | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | + `-----------------------------------------------------------------------------------' \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 986b065654460653aa94e8ec1ebf8dba877df2e8 Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 12:17:13 +0100 Subject: more formatting --- keyboards/planck/keymaps/bone2planck/readme.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 2a5db61f2..9a27a86b9 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -11,6 +11,7 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone To build, run "make" from within the \bone2planck folder. ## Bone2 (adapted) Base Layer +``` ,-----------------------------------------------------------------------------------. | Q | J | D | U | A | X | P | H | L | M | W | ẞ | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -20,9 +21,11 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ## M1 Special Characters very ergonomic placement for coding +``` ,-----------------------------------------------------------------------------------. | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -32,9 +35,11 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ## M2 Navigation & Number Blocks very easy to get used to & intuituve placement +``` ,-----------------------------------------------------------------------------------. | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -44,8 +49,10 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ## M4 Function & Media Keys +``` ,-----------------------------------------------------------------------------------. | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -55,13 +62,14 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' - +``` ##Switched layers for one handed access: ### M3 Switched Navigation & Number Blocks accessed by sliding from M2 to M3 with thumb +``` ,-----------------------------------------------------------------------------------. | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -71,9 +79,11 @@ To build, run "make" from within the \bone2planck folder. |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' +``` ### M5 Switched Function & Media Keys accessed by sliding from M4 to M5 with thumb +``` ,-----------------------------------------------------------------------------------. | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | |------+------+------+------+------+-------------+------+------+------+------+------| @@ -82,4 +92,5 @@ To build, run "make" from within the \bone2planck folder. | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | - `-----------------------------------------------------------------------------------' \ No newline at end of file + `-----------------------------------------------------------------------------------' +``` \ No newline at end of file -- cgit v1.2.3-24-g4f1b From c330872f47560d89b00fa48dfae39750406a0eaa Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Thu, 9 Feb 2017 13:07:59 +0100 Subject: updated layout & readme --- keyboards/planck/keymaps/bone2planck/keymap.c | 58 +++++++++++++------------- keyboards/planck/keymaps/bone2planck/readme.md | 18 ++++---- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 63fd2f1fc..5f77acf91 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -12,6 +12,7 @@ #define _______ KC_TRNS +#define XXXXXXX KC_NO /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. @@ -25,9 +26,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Bone2 (adapted) * ,-----------------------------------------------------------------------------------. -* | Q | J | D | U | A | X | P | H | L | M | W | ẞ | +* | ß | J | D | U | A | X | P | H | L | M | W | Q | * |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter +* | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Enter * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -35,8 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [0] = { - { DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS }, - { LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, + { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q }, + //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, + { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, { KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } }, @@ -46,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | * |------+------+------+------+------+-------------+------+------+------+------+------| -* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter +* | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Enter * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | +* | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' @@ -56,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = { { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, - { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, + { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } }, @@ -65,38 +67,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| +* | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | +* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [2] = { - { KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_INS }, - { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_ENT }, - { _______, KC_NO, KC_TAB, KC_NO, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ }, + { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS }, + { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT }, + { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ }, { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } }, /* M3 Switched Navigation & Number Blocks for one handed use * accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. -* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | +* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| +* | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | +* | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [3] = { - { KC_INS, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, - { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, - { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, - { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } + { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX }, + { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, + { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ }, + { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ } }, @@ -104,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | +* | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -112,9 +114,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [4] = { - { KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO }, - { KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO }, - { _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, + { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX }, + { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT }, + { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } }, @@ -124,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | +* | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -132,10 +134,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [5] = { - { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, - { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, - { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, - { _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ } + { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX }, + { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ }, + { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ }, + { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ } } }; diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 9a27a86b9..0d053bb17 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -13,9 +13,9 @@ To build, run "make" from within the \bone2planck folder. ## Bone2 (adapted) Base Layer ``` ,-----------------------------------------------------------------------------------. - | Q | J | D | U | A | X | P | H | L | M | W | ẞ | + | ß | J | D | U | A | X | P | H | L | M | W | Q | |------+------+------+------+------+-------------+------+------+------+------+------| - |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Tab/Enter + | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Enter |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -27,11 +27,11 @@ To build, run "make" from within the \bone2planck folder. very ergonomic placement for coding ``` ,-----------------------------------------------------------------------------------. - | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | + | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | |------+------+------+------+------+-------------+------+------+------+------+------| - |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Tab/Enter + | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Enter |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | + | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' @@ -43,9 +43,9 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| + | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | + | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' @@ -73,9 +73,9 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| + | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | + | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | `-----------------------------------------------------------------------------------' -- cgit v1.2.3-24-g4f1b From 2b95f41b912c9bf6c4582b45cabd3fe41bd20711 Mon Sep 17 00:00:00 2001 From: Rob Rogers Date: Thu, 9 Feb 2017 09:08:50 -0600 Subject: [Typo] correct link to default keymap in readme. --- keyboards/ergodox/keymaps/ab/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md index 62e08e162..4ad80efe6 100644 --- a/keyboards/ergodox/keymaps/ab/readme.md +++ b/keyboards/ergodox/keymaps/ab/readme.md @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get * Easy on beginners. It has everything you need for your day to day usage. #### Cons -* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) +* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox/keymaps/default/readme.md) * While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. #### Notes -- cgit v1.2.3-24-g4f1b From c0cfacda98eba8d291c376d91d586c1f4f9fd3ef Mon Sep 17 00:00:00 2001 From: VoodaGod Date: Fri, 10 Feb 2017 09:51:08 +0100 Subject: fixed readme (i swear) --- keyboards/planck/keymaps/bone2planck/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md index 0d053bb17..be22eabdb 100644 --- a/keyboards/planck/keymaps/bone2planck/readme.md +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -15,7 +15,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | ß | J | D | U | A | X | P | H | L | M | W | Q | |------+------+------+------+------+-------------+------+------+------+------+------| - | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold for M1, tap for Enter + | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold: M1, tap: Enter |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -29,7 +29,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | |------+------+------+------+------+-------------+------+------+------+------+------| - | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold for M1, tap for Enter + | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold: M1, tap: Enter |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -56,7 +56,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | |------+------+------+------+------+-------------+------+------+------+------+------| - | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | + | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -87,7 +87,7 @@ To build, run "make" from within the \bone2planck folder. ,-----------------------------------------------------------------------------------. | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | |------+------+------+------+------+-------------+------+------+------+------+------| - | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | + | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter| |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | |------+------+------+------+------+------+------+------+------+------+------+------| -- cgit v1.2.3-24-g4f1b