From 3a453a03ed5f029bb9cf23955e87789245d39a22 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:00:34 +0100 Subject: Atreus62 first semi-final draft --- keyboards/atreus62/keymaps/mneme/Makefile | 6 + keyboards/atreus62/keymaps/mneme/README.md | 2 + keyboards/atreus62/keymaps/mneme/config.h | 7 + keyboards/atreus62/keymaps/mneme/keymap.c | 316 +++++++++++++++++++++++++++++ keyboards/atreus62/keymaps/mneme/unicode | 114 +++++++++++ 5 files changed, 445 insertions(+) create mode 100644 keyboards/atreus62/keymaps/mneme/Makefile create mode 100644 keyboards/atreus62/keymaps/mneme/README.md create mode 100644 keyboards/atreus62/keymaps/mneme/config.h create mode 100644 keyboards/atreus62/keymaps/mneme/keymap.c create mode 100644 keyboards/atreus62/keymaps/mneme/unicode (limited to 'keyboards/atreus62/keymaps') diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile new file mode 100644 index 0000000000..f20750dbc6 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/Makefile @@ -0,0 +1,6 @@ +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = no +UNICODE_ENABLE = yes +NKRO_ENABLE = true diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md new file mode 100644 index 0000000000..54f5e21ab0 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -0,0 +1,2 @@ +Keymap that owes just about everything to Algernon. +Check out his keymap for the Ergodox. It's pretty damned amazing. diff --git a/keyboards/atreus62/keymaps/mneme/config.h b/keyboards/atreus62/keymaps/mneme/config.h new file mode 100644 index 0000000000..2c2a08c05e --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/config.h @@ -0,0 +1,7 @@ +#define ONESHOT_TIMEOUT 3000 +#define TAPPING_TERM 200 +#define PREVENT_STUCK_MODIFIERS + +#define LEADER_TIMEOUT 1000 + +#include "../../config.h" diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c new file mode 100644 index 0000000000..8c3f8aa435 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -0,0 +1,316 @@ +#include +#include "atreus62.h" +#include "led.h" +#include "action_layer.h" +#include "action_util.h" + +//avrdude -p atmega32u4 -P /dev/tty.usbmodem1411 -c avr109 -U flash:w:atreus63_default.hex +/* + *WINDOWS SWEDISH + */ +#define KN_HALF KC_GRV // 1/2 +#define KN_PLUS KC_MINS // + +#define KN_ACUT KC_EQL // ´ +#define KN_AO KC_LBRC // Å +#define KN_UMLA KC_RBRC // ¨ +#define KN_OE KC_SCLN // Ö +#define KN_AE KC_QUOT // Ä +#define KN_QUOT KC_NUHS // ' +#define KN_LABK KC_NUBS // < +#define KN_MINS KC_SLSH // - +#define KN_EXLM LSFT(KC_1) // ! +#define KN_DQT LSFT(KC_2) // " +#define KN_AT RALT(KC_2) // @ +#define KN_HASH LSFT(KC_3) // # +#define KN_DLR RALT(KC_4) // $ +#define KN_PERC LSFT(KC_5) // % +#define KN_AMPR LSFT(KC_6) // & +#define KN_SLSH LSFT(KC_7) // / +#define KN_LPRN LSFT(KC_8) // ( +#define KN_RPRN LSFT(KC_9) // ) +#define KN_EQL LSFT(KC_0) // = +#define KN_UNDS LSFT(KN_MINS) // _ +#define KN_QUES LSFT(KN_PLUS) // ? +#define KN_GRAV LSFT(KN_ACUT) // ` +#define KN_LCBR RALT(KC_7) // { +#define KN_RCBR RALT(KC_0) // } +#define KN_LBRC RALT(KC_8) // [ +#define KN_RBRC RALT(KC_9) // ] +#define KN_RABK LSFT(KN_LABK) // < +#define KN_COLN LSFT(KC_DOT) // : +#define KN_SCLN LSFT(KC_COMM) // : +#define KN_PIPE RALT(KN_LABK) // | +#define KN_QUES LSFT(KN_PLUS) // ? +#define KN_CIRC LSFT(KN_UMLA) // ^ +#define KN_ASTR LSFT(KN_QUOT) // * +#define KN_TILD RALT(KN_UMLA) // ~ +#define KN_BSLS RALT(KN_PLUS) // + +#define OSM_LCTL OSM(MOD_LCTL) +#define OSM_LALT OSM(MOD_LALT) +#define OSM_LSFT OSM(MOD_LSFT) + +#define KC_HYP LSFT(LALT(LCTL(KC_LGUI))) + +#define KC_COPY LCTL(KC_C) +#define KC_PASTE LCTL(KC_V) +#define KC_UNDO LCTL(KC_Z) +#define KC_REDO LCTL(LSFT(KC_Z)) + +// Layers +enum { + BASE = 0, + NAV, + SYM +}; + +//Macros +enum { + KF_1 = 0, // 1, F1 + KF_2, // ... + KF_3, + KF_4, + KF_5, + KF_6, + KF_7, + KF_8, + KF_9, + KF_10, + KF_11, + KF_12 +}; + +// Tapdance +enum { + TD_FUN = 0, + TD_EQ +}; + +//Custom keycodes +enum { + PLACEHOLDER = SAFE_RANGE +}; + +//State and timers +uint16_t kf_timers[12]; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = { + + { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, + { KC_HYP ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, + { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, + { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, + { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_TAB ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC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_ASTR ,KC_TRNS ,KN_HASH ,KC_COMM ,KC_DOT ,KN_QUES ,KN_BSLS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS } + + } +}; + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + +static void m_tapn (uint8_t code, ...) { + uint8_t kc = code; + va_list ap; + + va_start(ap, code); + do { + register_code(kc); + unregister_code(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); +} + +static void m_handle_kf (keyrecord_t *record, uint8_t id) { + uint8_t code = id - KF_1; + + if (record->event.pressed) { + kf_timers[code] = timer_read (); + } else { + uint8_t kc_base; + uint8_t long_press = (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM); + + kf_timers[code] = 0; + + switch(id){ + case KF_1 ... KF_10: + if (long_press) { + // Long press + kc_base = KC_F1; + } else { + kc_base = KC_1; + } + code += kc_base; + break; + case KF_11: + code = long_press ? KC_F11 : KC_ESC; + break; + case KF_12: + code = long_press ? KC_F12 : KC_PLUS; + break; + } + register_code (code); + unregister_code (code); + } +} + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) { + case KF_1 ... KF_12: + m_handle_kf(record, id); + break; + } + return MACRO_NONE; +}; + +// Custom keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool queue = true; + + //Cancle one-shot mods. + switch (keycode) { + case KC_ESC: + if (record->event.pressed && get_oneshot_mods() && !has_oneshot_mods_timed_out()) { + clear_oneshot_mods(); + queue = false; + } + break; + } + return queue; +} + +// TAP DANCE SETTINGS +void dance_eq (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: // === + register_code(KC_LSHIFT); + m_tapn(KC_0, KC_0, KC_0, 0); + unregister_code(KC_LSHIFT); + break; + case 2: + register_code(KC_LSHIFT); + m_tapn(KC_1, KC_0, KC_0, 0); + unregister_code(KC_LSHIFT); + break; + default: + reset_tap_dance(state); + } +} + +void dance_fun (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: // => + register_code(KC_LSHIFT); + m_tapn(KC_0, KN_LABK, 0); + unregister_code(KC_LSHIFT); + break; + case 2: // () => {} + register_code(KC_LSHIFT); + m_tapn(KC_8, KC_9, KC_SPC, KC_0, KN_LABK, KC_SPC, 0); + unregister_code(KC_LSHIFT); + register_code(KC_RALT); + m_tapn(KC_7, 0); + unregister_code(KC_RALT); + TAP_ONCE(KC_ENT); + break; + default: + reset_tap_dance(state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun) + ,[TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + set_unicode_input_mode(UC_WINC); +}; + +LEADER_EXTERNS(); +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + SEQ_ONE_KEY(KC_L){ + register_code(KC_RGUI); + TAP_ONCE(KC_L); + unregister_code(KC_RGUI); + }; // Todo + + SEQ_TWO_KEYS(KC_F, KC_S){ + register_code(KC_LCTRL); + TAP_ONCE(KC_S); + unregister_code(KC_LCTRL); + }; // Todo + + SEQ_TWO_KEYS(KC_B, KC_D){ + register_code(KC_LCTRL); + TAP_ONCE(KC_W); + unregister_code(KC_LCTRL); + }; // Todo + + SEQ_ONE_KEY(KC_SLSH){ + register_code(KC_LCTRL); + TAP_ONCE(KC_F); + unregister_code(KC_LCTRL); + } + + SEQ_TWO_KEYS (KC_S, KC_S) { + // ¯\_(ツ)_/¯ + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + } + + SEQ_TWO_KEYS (KC_S, KC_F) { + // 凸(ツ)凸 + unicode_input_start(); register_hex(0x51F8); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x51F8); unicode_input_finish(); + } + + SEQ_TWO_KEYS (KC_S, KC_L) { + // λ + unicode_input_start(); + register_hex(0x03bb); + unicode_input_finish(); + } + }; +}; diff --git a/keyboards/atreus62/keymaps/mneme/unicode b/keyboards/atreus62/keymaps/mneme/unicode new file mode 100644 index 0000000000..b3f62b6d31 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/unicode @@ -0,0 +1,114 @@ +Todo +☐ 2610 Todo +☑ 2611 Done +☒ 2612 Failed + +Operator +× 00D7 Multiplication +÷ 00F7 Division +≤ 2264 LessEqual +≥ 2265 MoreEqual +± 00B1 Plusminus + +Math +∏ 220F Product +∑ 2211 Sum +≈ 2248 Almost +≡ 2261 Equivalent +∞ 221E Infinity +‰ 2030 Mille + +Set +⊂ 2282 Subset +⊃ 2283 sUperset +∩ 2229 Intersextion +∪ 222A Union +∈ 2208 Element +∉ 2209 Notelement +∍ 220D Contains +∌ 220C doesNotcontain + +Logic +¬ 00AC Not +∧ 2227 And +∨ 2228 Or +∃ 2203 Exists +∄ 2204 Notexists + +Greek +µ 00B5 Micro +λ 03BB Lamda +Ω 2126 Omega +α 03B1 Alpha +β 03B2 Beta +γ 03B3 Gamma +π 03C0 Pi +δ 03B4 Delta + +Other +☁ 2601 Cloud +☼ 263C Sun +☂ 2602 Rain +☠ 2620 Skull +♺ 267A Recycle +👍1F44D thumbsUp +👎1F44E thumbsDown +💩 1F4A9 Poo + + +//Todo +SEQ_THREE_KEYS(KC_U, KC_G, KC_T){m_unicode(0x2610);}; // Todo +SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x2611);}; // Done +SEQ_THREE_KEYS(KC_U, KC_G, KC_F){m_unicode(0x2612);}; // Failed + +//Operator +SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x00D7);}; // Multiplication +SEQ_THREE_KEYS(KC_U, KC_O, KC_D){m_unicode(0x00F7);}; // Division +SEQ_THREE_KEYS(KC_U, KC_O, KC_L){m_unicode(0x2264);}; // LessEqual +SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x2265);}; // MoreEqual +SEQ_THREE_KEYS(KC_U, KC_O, KC_P){m_unicode(0x00B1);}; // Plusminus + +//Math +SEQ_THREE_KEYS(KC_U, KC_M, KC_P){m_unicode(0x220F);}; // Product +SEQ_THREE_KEYS(KC_U, KC_M, KC_S){m_unicode(0x2211);}; // Sum +SEQ_THREE_KEYS(KC_U, KC_M, KC_A){m_unicode(0x2248);}; // Almost +SEQ_THREE_KEYS(KC_U, KC_M, KC_E){m_unicode(0x2261);}; // Equivalent +SEQ_THREE_KEYS(KC_U, KC_M, KC_I){m_unicode(0x221E);}; // Infinity +SEQ_THREE_KEYS(KC_U, KC_M, KC_M){m_unicode(0x2030);}; // Mille + +//Set +SEQ_THREE_KEYS(KC_U, KC_S, KC_S){m_unicode(0x2282);}; Subset +SEQ_THREE_KEYS(KC_U, KC_S, KC_P){m_unicode(0x2283);}; suPerset +SEQ_THREE_KEYS(KC_U, KC_S, KC_I){m_unicode(0x2229);}; Intersection +SEQ_THREE_KEYS(KC_U, KC_S, KC_U){m_unicode(0x222A);}; Union +SEQ_THREE_KEYS(KC_U, KC_S, KC_E){m_unicode(0x2208);}; Element +SEQ_THREE_KEYS(KC_U, KC_S, KC_N){m_unicode(0x2209);}; Notelement +SEQ_THREE_KEYS(KC_U, KC_S, KC_C){m_unicode(0x220D);}; Contains +SEQ_THREE_KEYS(KC_U, KC_S, KC_D){m_unicode(0x220C);}; doesNotcontain + +//Logic +SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x00AC);}; // Not +SEQ_THREE_KEYS(KC_U, KC_L, KC_A){m_unicode(0x2227);}; // And +SEQ_THREE_KEYS(KC_U, KC_L, KC_O){m_unicode(0x2228);}; // Or +SEQ_THREE_KEYS(KC_U, KC_L, KC_E){m_unicode(0x2203);}; // Exists +SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x2204);}; // Notexists + +//Greek +SEQ_THREE_KEYS(KC_U, KC_G, KC_M){m_unicode(0x00B5);}; // Micro +SEQ_THREE_KEYS(KC_U, KC_G, KC_L){m_unicode(0x03BB);}; // Lamda +SEQ_THREE_KEYS(KC_U, KC_G, KC_O){m_unicode(0x2126);}; // Omega +SEQ_THREE_KEYS(KC_U, KC_G, KC_A){m_unicode(0x03B1);}; // Alpha +SEQ_THREE_KEYS(KC_U, KC_G, KC_B){m_unicode(0x03B2);}; // Beta +SEQ_THREE_KEYS(KC_U, KC_G, KC_G){m_unicode(0x03B3);}; // Gamma +SEQ_THREE_KEYS(KC_U, KC_G, KC_P){m_unicode(0x03C0);}; // Pi +SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x03B4);}; // Delta + +//Zother +SEQ_THREE_KEYS(KC_U, KC_Z, KC_C){m_unicode(0x2601);}; // Cloud +SEQ_THREE_KEYS(KC_U, KC_Z, KC_S){m_unicode(0x263C);}; // Sun +SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x2602);}; // Rain +SEQ_THREE_KEYS(KC_U, KC_Z, KC_K){m_unicode(0x2620);}; // sKull +SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x267A);}; // rEcycle +SEQ_THREE_KEYS(KC_U, KC_Z, KC_U){m_unicode(0x1F44D);}; // thumbsUp +SEQ_THREE_KEYS(KC_U, KC_Z, KC_D){m_unicode(0x1F44E);}; // thumbsDown +SEQ_THREE_KEYS(KC_U, KC_Z, KC_P){m_unicode(0x1F4A9);}; // Poo -- cgit v1.2.3 From e491f5a4d0465c1499e14183358730cf73d0ceaf Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:41:07 +0100 Subject: Readme + minor change to make it match reality. --- keyboards/atreus62/keymaps/mneme/README.md | 56 +++++++++++++++++++++++++- keyboards/atreus62/keymaps/mneme/img/base.png | Bin 0 -> 458762 bytes keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 0 -> 268634 bytes keyboards/atreus62/keymaps/mneme/img/sym.png | Bin 0 -> 433342 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 18 +++------ 5 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 keyboards/atreus62/keymaps/mneme/img/base.png create mode 100644 keyboards/atreus62/keymaps/mneme/img/fun.png create mode 100644 keyboards/atreus62/keymaps/mneme/img/sym.png (limited to 'keyboards/atreus62/keymaps') diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 54f5e21ab0..b4dc89625b 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -1,2 +1,54 @@ -Keymap that owes just about everything to Algernon. -Check out his keymap for the Ergodox. It's pretty damned amazing. + + +Mnemes Swedish Bonaza +======================= + +My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout + + [algernon]: https://github.com/algernon/ergodox-layout + +It's for Windows (current work forces me to) and Swedish (matter of birth) so ymmw. + +## Table of Contents + +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Fun layer](#fun-layer) + - [Nav layer](#nav-layer) + - [LED states](#led-states) + +# Layouts + +## Base layer + +![Base layer](img/base.png) + + +* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx +* The `Shift`, `Alt`, and `Control` modifiers are one-shot. +* `Backspace` and `Enter` doubles as switches to the `sym` layer when held +* The `ESC` key also doubles as a one-shot cancel key. +* The **Lead** key is followed by a sequence of keys. + - `LEAD l` : `lgui+l`. + - `LEAD s l` : `λ`. + - `LEAD s s` : `¯\_(ツ)_/¯` + - `LEAD s f` : `凸(ツ)凸` + - `LEAD f s` : `ctrl+s` + - `LEAD b d` : `ctrl+w` + + +## Nav layer + +![Fun layer](img/fun.png) + +Basic navigation on the right hand and modifiers close +by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. + +## Sym layer + +![Sym layer](img/sym.png) + +Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. + +# License + GPL-3+ diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png new file mode 100644 index 0000000000..86907d5442 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/base.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png new file mode 100644 index 0000000000..a58933d966 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png new file mode 100644 index 0000000000..11b5bd4b0f Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/sym.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 8c3f8aa435..56d6371204 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -44,7 +44,7 @@ #define KN_CIRC LSFT(KN_UMLA) // ^ #define KN_ASTR LSFT(KN_QUOT) // * #define KN_TILD RALT(KN_UMLA) // ~ -#define KN_BSLS RALT(KN_PLUS) // +#define KN_BSLS RALT(KN_PLUS) // #define OSM_LCTL OSM(MOD_LCTL) #define OSM_LALT OSM(MOD_LALT) @@ -110,8 +110,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NAV] = { { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_HOME ,KC_UP ,KC_END ,KC_PGUP ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_PGDN ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F11 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } @@ -281,19 +281,13 @@ void matrix_scan_user(void) { unregister_code(KC_LCTRL); }; // Todo - SEQ_ONE_KEY(KC_SLSH){ - register_code(KC_LCTRL); - TAP_ONCE(KC_F); - unregister_code(KC_LCTRL); - } - SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); + register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0xaf); unicode_input_finish(); } @@ -302,7 +296,7 @@ void matrix_scan_user(void) { unicode_input_start(); register_hex(0x51F8); unicode_input_finish(); register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x51F8); unicode_input_finish(); } -- cgit v1.2.3 From 1bef7bf45a2b05e755b17267aa08a66d1588134f Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:43:13 +0100 Subject: Link fix in readme. --- keyboards/atreus62/keymaps/mneme/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/atreus62/keymaps') diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index b4dc89625b..1461f6c524 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -13,8 +13,8 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym * [Layouts](#layouts) - [Base layer](#base-layer) - - [Fun layer](#fun-layer) - [Nav layer](#nav-layer) + - [Sym layer](#sym-layer) - [LED states](#led-states) # Layouts @@ -39,7 +39,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym ## Nav layer -![Fun layer](img/fun.png) +![Nav layer](img/fun.png) Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. -- cgit v1.2.3 From ed975f2454692fec28539a7014116beeb21b4c9e Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 00:14:42 +0100 Subject: Remove comments and change to correct KN_PLUS instead of KC_PLUS. --- keyboards/atreus62/keymaps/mneme/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/atreus62/keymaps') diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 56d6371204..eca452b775 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -170,7 +170,7 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { code = long_press ? KC_F11 : KC_ESC; break; case KF_12: - code = long_press ? KC_F12 : KC_PLUS; + code = long_press ? KC_F12 : KN_PLUS; break; } register_code (code); @@ -267,19 +267,19 @@ void matrix_scan_user(void) { register_code(KC_RGUI); TAP_ONCE(KC_L); unregister_code(KC_RGUI); - }; // Todo + }; SEQ_TWO_KEYS(KC_F, KC_S){ register_code(KC_LCTRL); TAP_ONCE(KC_S); unregister_code(KC_LCTRL); - }; // Todo + }; SEQ_TWO_KEYS(KC_B, KC_D){ register_code(KC_LCTRL); TAP_ONCE(KC_W); unregister_code(KC_LCTRL); - }; // Todo + }; SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ -- cgit v1.2.3 From b2419b31d3d4198192a1b5fb78b1c2e8ade0ce87 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 15:36:14 +0100 Subject: - Change docs to match keymap. - Switched around modifiers on the function layer to match muscle memory. - Added support for application switching. --- keyboards/atreus62/keymaps/mneme/README.md | 8 ++-- keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 268634 -> 430634 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 63 +++++++++++++++++++-------- 3 files changed, 50 insertions(+), 21 deletions(-) (limited to 'keyboards/atreus62/keymaps') diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 1461f6c524..5bac545fc2 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -33,8 +33,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym - `LEAD s l` : `λ`. - `LEAD s s` : `¯\_(ツ)_/¯` - `LEAD s f` : `凸(ツ)凸` - - `LEAD f s` : `ctrl+s` - - `LEAD b d` : `ctrl+w` + - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer. ## Nav layer @@ -48,7 +47,10 @@ by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. ![Sym layer](img/sym.png) -Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. +* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. + +- `eq` : Tapdance, produces `===` and `!==` +- `fun`: Tapdance, produces `=>` and `() => {\n` # License GPL-3+ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png index a58933d966..ec5a478c64 100644 Binary files a/keyboards/atreus62/keymaps/mneme/img/fun.png and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index eca452b775..7c18799826 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -4,7 +4,6 @@ #include "action_layer.h" #include "action_util.h" -//avrdude -p atmega32u4 -P /dev/tty.usbmodem1411 -c avr109 -U flash:w:atreus63_default.hex /* *WINDOWS SWEDISH */ @@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TRNS }, - { KC_TRNS ,KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F11 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } + { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } }, [SYM] = { @@ -179,7 +178,6 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { } const uint16_t PROGMEM fn_actions[] = { - }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -269,22 +267,51 @@ void matrix_scan_user(void) { unregister_code(KC_RGUI); }; - SEQ_TWO_KEYS(KC_F, KC_S){ - register_code(KC_LCTRL); - TAP_ONCE(KC_S); - unregister_code(KC_LCTRL); - }; - SEQ_TWO_KEYS(KC_B, KC_D){ - register_code(KC_LCTRL); - TAP_ONCE(KC_W); - unregister_code(KC_LCTRL); - }; + SEQ_TWO_KEYS (KC_A, KC_W) { + //Web - chrome + register_code (KC_LGUI); TAP_ONCE (KC_1); unregister_code (KC_LGUI); + } + SEQ_TWO_KEYS (KC_A, KC_P) { + //sPotify + register_code (KC_LGUI); TAP_ONCE (KC_2); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_T) { + //Total Commander + register_code (KC_LGUI); TAP_ONCE (KC_3); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_A) { + //Atom + register_code (KC_LGUI); TAP_ONCE (KC_4); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_E) { + //Emacs + register_code (KC_LGUI); TAP_ONCE (KC_5); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_C) { + //Cmdr + register_code (KC_LGUI); TAP_ONCE (KC_6); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_S) { + //Slack + register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI); + } + SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_LALT); + register_code (KC_LCTL); + TAP_ONCE (KN_PLUS); + unregister_code (KC_LCTL); + unregister_code (KC_LALT); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); -- cgit v1.2.3 From 236a0b0b6012d311a3ec048498dacdb1851327a0 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 16:00:09 +0100 Subject: Update makefile. Readme. --- keyboards/atreus62/keymaps/mneme/Makefile | 7 +++---- keyboards/atreus62/keymaps/mneme/README.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'keyboards/atreus62/keymaps') diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile index f20750dbc6..046aec2733 100644 --- a/keyboards/atreus62/keymaps/mneme/Makefile +++ b/keyboards/atreus62/keymaps/mneme/Makefile @@ -1,6 +1,5 @@ TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = no -SLEEP_LED_ENABLE = no -UNICODE_ENABLE = yes NKRO_ENABLE = true +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 5bac545fc2..04ab070be6 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -42,7 +42,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. - + ## Sym layer ![Sym layer](img/sym.png) -- cgit v1.2.3