From fb46eb2de1b16f4700b486c9ef7fb34d35025209 Mon Sep 17 00:00:00 2001 From: Josh Colbeck Date: Tue, 12 Jul 2016 23:52:02 -0500 Subject: Added open resource macro tap to type, hold for resource --- keyboards/ergodox_ez/keymaps/josh/keymap.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/josh/keymap.c b/keyboards/ergodox_ez/keymaps/josh/keymap.c index de5664a25a..9ceb874236 100644 --- a/keyboards/ergodox_ez/keymaps/josh/keymap.c +++ b/keyboards/ergodox_ez/keymaps/josh/keymap.c @@ -7,15 +7,16 @@ #define MDIA 2 // media keys //macros -#define CTL_SFT_T 100 -#define CTL_SFT_G 101 -#define CTL_ALT_H 102 +#define CTL_SFT_T 100 // open type +#define CTL_SFT_G 101 // find references +#define CTL_ALT_H 102 // open call hierarchy +#define CTL_SFT_R 103 // open resource const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ESC | | M 100| 6 | 7 | 8 | 9 | 0 | - | + * | = | 1 | 2 | 3 | 4 | 5 | ESC | |M100/3| 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |TAB /Alt| Q | W | E | R | T | Meh | | Meh | Y | U | I | O | P |\ / ALT | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -46,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - M(CTL_SFT_T),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(M(CTL_SFT_T), M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, MEH_T(KC_NO),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, @@ -171,6 +172,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO(U(LCTL), U(LALT), END); break; + case CTL_SFT_R: + if (record->event.pressed) { + return MACRO(D(LCTL), D(LSFT), T(R), END); + } + return MACRO(U(LCTL), U(LSFT), END); + break; } return MACRO_NONE; }; -- cgit v1.2.3 From aaa180f46309efebd3150ab4f3f9edd619a8f6f6 Mon Sep 17 00:00:00 2001 From: Josh Colbeck Date: Wed, 20 Jul 2016 23:15:15 -0500 Subject: Added reset keys --- keyboards/ergodox_ez/keymaps/josh/keymap.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/josh/keymap.c b/keyboards/ergodox_ez/keymaps/josh/keymap.c index 9ceb874236..35becaff8d 100644 --- a/keyboards/ergodox_ez/keymaps/josh/keymap.c +++ b/keyboards/ergodox_ez/keymaps/josh/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + LT(MDIA, KC_EQL),KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, ALT_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, ALL_T(KC_NO), KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(SYMB), @@ -47,11 +47,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand - LT(M(CTL_SFT_T), M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - MEH_T(KC_NO),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), - MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - LALT(KC_LSFT),KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, + LT(M(CTL_SFT_T), + M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, LT(MDIA, KC_MINS), + MEH_T(KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), CTL_T(KC_QUOT), + MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + LALT(KC_LSFT),KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_LALT, KC_CAPS, KC_PGUP, KC_PGDN,KC_DEL, KC_ENT @@ -101,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | | | | | |RESET | |RESET | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -121,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MDIA] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -130,7 +131,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, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From 89d3ff8f184cd2ed48f2174a113f4270c4a933a8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:00:01 +0700 Subject: Some space optimization and housekeeping --- .../handwired/promethium/keymaps/priyadi/keymap.c | 74 +++++++++------------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1ad34612e3..e35e42488b 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -41,6 +41,7 @@ enum glow_modes { }; uint8_t glow_mode = GLOW_MIN; +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { @@ -49,6 +50,7 @@ enum layers { _COLEMAK, _WORKMAN, _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, _PUNC, _NUM, @@ -444,7 +446,7 @@ void led_set_layer_indicator(void) { oldlayer = layer; - if (layer <= _NORMAN) { + if (layer <= _DEFAULT_LAYER_MAX) { rgbsps_send(); return; } @@ -461,7 +463,7 @@ void led_set_layer_indicator(void) { break; default: rgbsps_set(LED_IND_FUNC, 3, 3, 3); - rgbsps_set(LED_IND_NUM, 3, 3, 3); + // rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } @@ -753,6 +755,30 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); @@ -786,51 +812,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef DOUBLESPACE_LAYER_ENABLE // double-space enter space layer case LSPACE: - if (record->event.pressed) { - lspace_active = true; - if (rspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - lspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!rspace_active) { - space_layer_entered = false; - } - } else { - if (!lspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - lspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); return false; break; case RSPACE: - if (record->event.pressed) { - rspace_active = true; - if (lspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - rspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!lspace_active) { - space_layer_entered = false; - } - } else { - if (!rspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - rspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; #endif -- cgit v1.2.3 From 2c1ef84b226c21d11e54d93cf76d8aa356cb725a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:02:36 +0700 Subject: Workaround to remove warning --- keyboards/handwired/promethium/keymaps/priyadi/config.h | 2 ++ keyboards/handwired/promethium/promethium.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 53059ca7d4..6c9d2195e1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,6 +14,8 @@ #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 +#define UNICODE_TYPE_DELAY 0 + #define LAYOUT_DVORAK #define LAYOUT_COLEMAK #define LAYOUT_NORMAN diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index da37e5c560..d6fea76ce1 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -4,7 +4,6 @@ #include "quantum.h" #define PS2_INIT_DELAY 2000 -#define UNICODE_TYPE_DELAY 0 #define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 -- cgit v1.2.3 From ce6b68f85b1e09a3912fb395ed4d6b35bb0f065d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:07:33 +0700 Subject: Remove assignment warning --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index e35e42488b..52b186c409 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1058,7 +1058,7 @@ void battery_poll(uint8_t level) { void led_set_user(uint8_t usb_led) { bool new_capslock = usb_led & (1< Date: Sun, 12 Feb 2017 00:20:47 +0700 Subject: Forgot to add ifdef to optional feature --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 52b186c409..a24a79aa1c 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -755,6 +755,7 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { if (pressed) { *isactive = true; @@ -778,6 +779,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } } } +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); -- cgit v1.2.3 From bc1308c112ebdd2089b36d7d3289308301bd6832 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 05:04:14 +0700 Subject: Update my Planck layout --- keyboards/planck/keymaps/priyadi/keymap.c | 516 +++++++++++++++++++++--------- 1 file changed, 365 insertions(+), 151 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2e979221a9..80e867621a 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -10,29 +10,76 @@ #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" - // #define TOLELOT_ENABLE +#define DOUBLESPACE_LAYER_ENABLE + +// so i can copy & paste stuff from my other planck-like keyboards +#define KEYMAP( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c}, \ + {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c}, \ + {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ +} +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define G(x) LGUI(x) +#define KC_WWWB KC_WWW_BACK +#define KC_WWWF KC_WWW_FORWARD + +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) + +bool capslock = false; +#ifdef DOUBLESPACE_LAYER_ENABLE +bool lspace_active = false; +bool rspace_active = false; +bool lspace_emitted = false; +bool rspace_emitted = false; +bool space_layer_entered = false; +#endif + +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { _QWERTY, + _DVORAK, _COLEMAK, _WORKMAN, + _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, + _PUNC, _NUM, _FUNC, - _EMOJI, + _GREEKU, _GREEKL, + + _EMOJI, _GUI, + _SYS, }; +// double-space layer +#define _SPACE _GUI + enum planck_keycodes { // layouts QWERTY = SAFE_RANGE, + DVORAK, COLEMAK, WORKMAN, + NORMAN, // layer switchers PUNC, @@ -46,12 +93,16 @@ enum planck_keycodes { LINUX, WIN, OSX, -}; -// Fillers to make layering clearer + // others + LSPACE, + RSPACE, + GLOW, + AUDIO, -#define _______ KC_TRNS -#define XXXXXXX KC_NO + // stubs + OUT_BLE +}; // unicode map @@ -259,18 +310,6 @@ const uint32_t PROGMEM unicode_map[] = { [FSIGM] = 0x03C2, }; - -// hybrid shift - = -// #undef KC_LSFT -// #define KC_LSFT MT(MOD_LSFT, KC_MINS) -// #undef KC_RSFT -// #define KC_RSFT MT(MOD_LSFT, KC_EQL) - - -// hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) - // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -279,127 +318,138 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_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_QUOT, KC_ENT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL} -}, - -/* Colemak +[_QWERTY] = KEYMAP( + 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_QUOT, KC_ENT , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL +), + +/* Dvorak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______}, - {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +#ifdef LAYOUT_DVORAK +[_DVORAK] = KEYMAP( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, + _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif -/* Workman +/* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______}, - {_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______}, - {_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Uppercase Greek +#ifdef LAYOUT_COLEMAK +[_COLEMAK] = KEYMAP( + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Norman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = { - {_______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______}, - {_______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______}, - {_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Lowercase Greek +#ifdef LAYOUT_NORMAN +[_NORMAN] = KEYMAP( + _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, + _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Workman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = { - {_______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______}, - {_______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______}, - {_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, + +#ifdef LAYOUT_WORKMAN +[_WORKMAN] = KEYMAP( + _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, + _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, + _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | < | > | ( | ) | ' | | | + * | | * | \ | - | = | / | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | { | } | [ | ] | " | | | + * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV }, - {XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_PUNC] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Num * ,-----------------------------------------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | + * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | x | | | 0 | , | . | + | - | + * | | | | | | | x | 0 | , | . | | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT}, - {KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR}, - {_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS} -}, +[_NUM] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ +), /* Func * ,-----------------------------------------------------------------------------------. @@ -412,12 +462,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { - {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL}, - {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_FUNC] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = KEYMAP( + _______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, + _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = KEYMAP( + _______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, + _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Emoji * ,-----------------------------------------------------------------------------------. @@ -430,30 +516,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = { - {X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW)}, - {X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS)}, - {X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH)}, - { X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} -}, +[_EMOJI] = KEYMAP( + X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), + X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), + X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), + X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) +), /* GUI * ,-----------------------------------------------------------------------------------. * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| + * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Win | | Prev | Play | Next | | | | | | |Colmak| + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | OSX | | | | | BL- | BL+ | | | | |Workmn| + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = { - {_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______}, - { LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY}, - { WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK}, - { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN} -}, +[_GUI] = KEYMAP( + XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Sys + * ,-----------------------------------------------------------------------------------. + * | |Qwerty| Win | |Reset | | | USB | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Colmak| | BLE |Norman|MacOS | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYS] = KEYMAP( + XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +), }; @@ -476,6 +580,32 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); @@ -493,27 +623,49 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #endif - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space: send space immediately if any other key depressed before space is released + if ((lspace_active ^ rspace_active) + && keycode != LSPACE + && keycode != RSPACE + && record->event.pressed) + { + if (lspace_active) { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = true; + } + if (rspace_active) { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = true; + } + } +#endif switch (keycode) { - // Greek layer handling - case GREEK: - if (record->event.pressed) { - if (lshifted || rshifted) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - } + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space enter space layer + case LSPACE: + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); + return false; + break; + case RSPACE: + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; +#endif + // handle greek layer shift + // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -523,11 +675,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKU); layer_off(_GREEKL); } else { - if (lshifted ^ rshifted) { // if only one shift is pressed + if (lshift ^ rshift) { // if only one shift was pressed layer_on(_GREEKL); layer_off(_GREEKU); } } + } else { + if (record->event.pressed) { + if (lshift ^ rshift) { // if only one shift was pressed + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } + } + } + return true; + break; + + // press both ctrls to activate SYS layer + case KC_LCTL: + case KC_RCTL: + ; + bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); + bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); + if (record->event.pressed) { + if (lctrl ^ rctrl) { // if only one ctrl was pressed + layer_on(_SYS); + } + } else { + layer_off(_SYS); } return true; break; @@ -535,13 +710,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - if (lshifted || rshifted) { - if (lshifted) unregister_code(KC_LSFT); - if (rshifted) unregister_code(KC_RSFT); + if (lshift || rshift) { + if (lshift) unregister_code(KC_LSFT); + if (rshift) unregister_code(KC_RSFT); register_code(KC_SCLN); unregister_code(KC_SCLN); - if (lshifted) register_code(KC_LSFT); - if (rshifted) register_code(KC_RSFT); + if (lshift) register_code(KC_LSFT); + if (rshift) register_code(KC_RSFT); } else { register_code(KC_COMM); unregister_code(KC_COMM); @@ -565,53 +740,73 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // layout switcher 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; +#ifdef LAYOUT_DVORAK + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; +#endif +#ifdef LAYOUT_COLEMAK 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; +#endif +#ifdef LAYOUT_WORKMAN case WORKMAN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); - #endif persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; +#endif +#ifdef LAYOUT_NORMAN + case NORMAN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NORMAN); + } + return false; + break; +#endif // layer switchers case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; - case EMOJI: + + case GREEK: if (record->event.pressed) { - layer_on(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + if (lshift || rshift) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + } } else { - layer_off(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + layer_off(_GREEKU); + layer_off(_GREEKL); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; + case NUM: if (record->event.pressed) { layer_on(_NUM); @@ -651,6 +846,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif return false; break; + + // faux clicky toggle, TBD + case AUDIO: + return false; + break; + } return true; } @@ -677,4 +878,17 @@ void shutdown_user() stop_all_notes(); } -#endif \ No newline at end of file +#endif + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { +} + +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} -- cgit v1.2.3 From c68e596f32c5d450a714627871408407e9988ef7 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 08:03:07 +0700 Subject: Implement faux-clicky feature --- build_keyboard.mk | 5 ++ keyboards/planck/keymaps/priyadi/Makefile | 3 +- keyboards/planck/keymaps/priyadi/keymap.c | 4 +- quantum/fauxclicky.c | 68 ++++++++++++++++++++++++ quantum/fauxclicky.h | 87 +++++++++++++++++++++++++++++++ quantum/template/rules.mk | 1 + tmk_core/common/action.c | 13 +++++ tmk_core/common/keyboard.c | 6 +++ 8 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 quantum/fauxclicky.c create mode 100644 quantum/fauxclicky.h diff --git a/build_keyboard.mk b/build_keyboard.mk index 2c64e93a28..c8e82cf0e5 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -161,6 +161,11 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/audio/luts.c endif +ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) + OPT_DEFS += -DFAUXCLICKY_ENABLE + SRC += $(QUANTUM_DIR)/fauxclicky.c +endif + ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE UNICODE_ENABLE = yes diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile index 336608b8cc..27c2638e2f 100644 --- a/keyboards/planck/keymaps/priyadi/Makefile +++ b/keyboards/planck/keymaps/priyadi/Makefile @@ -10,12 +10,13 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map 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 = no +FAUXCLICKY_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2e979221a9..13668fd106 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -268,8 +268,8 @@ const uint32_t PROGMEM unicode_map[] = { // hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) // keymaps diff --git a/quantum/fauxclicky.c b/quantum/fauxclicky.c new file mode 100644 index 0000000000..13273e7058 --- /dev/null +++ b/quantum/fauxclicky.c @@ -0,0 +1,68 @@ +/* +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 +#include +#include +#include +#include +#include + +__attribute__ ((weak)) +float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, 2); +__attribute__ ((weak)) +float fauxclicky_released_note[2] = MUSICAL_NOTE(_A3, 2); +__attribute__ ((weak)) +float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, 2); + +bool fauxclicky_enabled = true; +uint16_t note_start = 0; +bool note_playing = false; +uint16_t note_period = 0; + +void fauxclicky_init() +{ + // Set port PC6 (OC3A and /OC4A) as output + DDRC |= _BV(PORTC6); + + // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers + TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); + TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); +} + +void fauxclicky_stop() +{ + FAUXCLICKY_DISABLE_OUTPUT; + note_playing = false; +} + +void fauxclicky_play(float note[2]) { + if (!fauxclicky_enabled) return; + if (note_playing) fauxclicky_stop(); + FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)); + FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)) / 2); + note_playing = true; + note_period = (note[1] / 16) * (60 / (float)FAUXCLICKY_TEMPO) * 100; // check this + note_start = timer_read(); + FAUXCLICKY_ENABLE_OUTPUT; +} + +void fauxclicky_check() { + if (!note_playing) return; + + if (timer_elapsed(note_start) > note_period) { + fauxclicky_stop(); + } +} diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h new file mode 100644 index 0000000000..6cfc291c05 --- /dev/null +++ b/quantum/fauxclicky.h @@ -0,0 +1,87 @@ +/* +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 . +*/ + +#ifdef AUDIO_ENABLE +#error "AUDIO_ENABLE and FAUXCLICKY_ENABLE cannot be both enabled" +#endif + +#include "musical_notes.h" + +__attribute__ ((weak)) +float fauxclicky_pressed_note[2]; +__attribute__ ((weak)) +float fauxclicky_released_note[2]; +__attribute__ ((weak)) +float fauxclicky_beep_note[2]; + +// +// tempo in BPM +// + +#ifndef FAUXCLICKY_TEMPO +#define FAUXCLICKY_TEMPO TEMPO_DEFAULT +#endif + +// beep on press +#define FAUXCLICKY_ACTION_PRESS fauxclicky_play(fauxclicky_pressed_note) + +// beep on release +#define FAUXCLICKY_ACTION_RELEASE fauxclicky_play(fauxclicky_released_note) + +// general purpose beep +#define FAUXCLICKY_BEEP fauxclicky_play(fauxclicky_beep_note) + +// enable +#define FAUXCLICKY_ON fauxclicky_enabled = true + +// disable +#define FAUXCLICKY_OFF do { \ + fauxclicky_enabled = false; \ + fauxclicky_stop(); \ +} while (0) + +// +// pin configuration +// + +#ifndef FAUXCLICKY_CPU_PRESCALER +#define FAUXCLICKY_CPU_PRESCALER 8 +#endif + +#ifndef FAUXCLICKY_ENABLE_OUTPUT +#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1); +#endif + +#ifndef FAUXCLICKY_DISABLE_OUTPUT +#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0)); +#endif + +#ifndef FAUXCLICKY_TIMER_PERIOD +#define FAUXCLICKY_TIMER_PERIOD ICR3 +#endif + +#ifndef FAUXCLICKY_DUTY_CYCLE +#define FAUXCLICKY_DUTY_CYCLE OCR3A +#endif + +// +// definitions +// + +void fauxclicky_init(void); +void fauxclicky_stop(void); +void fauxclicky_play(float note[2]); +void fauxclicky_check(void); + diff --git a/quantum/template/rules.mk b/quantum/template/rules.mk index 55898147dd..bad3387bf4 100644 --- a/quantum/template/rules.mk +++ b/quantum/template/rules.mk @@ -65,3 +65,4 @@ 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 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index f03670a7f7..94de36918d 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -33,6 +33,9 @@ along with this program. If not, see . #include "nodebug.h" #endif +#ifdef FAUXCLICKY_ENABLE +#include +#endif void action_exec(keyevent_t event) { @@ -41,6 +44,16 @@ void action_exec(keyevent_t event) dprint("EVENT: "); debug_event(event); dprintln(); } +#ifdef FAUXCLICKY_ENABLE + if (IS_PRESSED(event)) { + FAUXCLICKY_ACTION_PRESS; + } + if (IS_RELEASED(event)) { + FAUXCLICKY_ACTION_RELEASE; + } + fauxclicky_check(); +#endif + #ifdef ONEHAND_ENABLE if (!IS_NOEVENT(event)) { process_hand_swap(&event); diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 3aa82231b0..eac1f1dd81 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -51,6 +51,9 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE # include "rgblight.h" #endif +#ifdef FAUXCLICKY_ENABLE +# include "fauxclicky.h" +#endif #ifdef SERIAL_LINK_ENABLE # include "serial_link/system/serial_link.h" #endif @@ -108,6 +111,9 @@ void keyboard_init(void) { #ifdef RGBLIGHT_ENABLE rgblight_init(); #endif +#ifdef FAUXCLICKY_ENABLE + fauxclicky_init(); +#endif #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) keymap_config.nkro = 1; #endif -- cgit v1.2.3 From 8c93c5d9ab8a0a69d84f707db71f417b66402693 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 14:55:35 +0700 Subject: Add keycodes to turn on, turn off and toggle faux clicky --- quantum/fauxclicky.h | 12 ++++++++++++ quantum/quantum.c | 24 ++++++++++++++++++++++++ quantum/quantum_keycodes.h | 7 +++++++ 3 files changed, 43 insertions(+) diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h index 6cfc291c05..109bd0d83e 100644 --- a/quantum/fauxclicky.h +++ b/quantum/fauxclicky.h @@ -18,6 +18,7 @@ along with this program. If not, see . #endif #include "musical_notes.h" +#include "stdbool.h" __attribute__ ((weak)) float fauxclicky_pressed_note[2]; @@ -26,6 +27,8 @@ float fauxclicky_released_note[2]; __attribute__ ((weak)) float fauxclicky_beep_note[2]; +bool fauxclicky_enabled; + // // tempo in BPM // @@ -52,6 +55,15 @@ float fauxclicky_beep_note[2]; fauxclicky_stop(); \ } while (0) +// toggle +#define FAUXCLICKY_TOGGLE do { \ + if (fauxclicky_enabled) { \ + FAUXCLICKY_OFF; \ + } else { \ + FAUXCLICKY_ON; \ + } \ +} while (0) + // // pin configuration // diff --git a/quantum/quantum.c b/quantum/quantum.c index 45ea8cb73c..2088c10c95 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -7,6 +7,10 @@ #define TAPPING_TERM 200 #endif +#ifdef FAUXCLICKY_ENABLE +#include "fauxclicky.h" +#endif + static void do_code16 (uint16_t code, void (*f) (uint8_t)) { switch (code) { case QK_MODS ... QK_MODS_MAX: @@ -196,6 +200,26 @@ bool process_record_quantum(keyrecord_t *record) { } return false; break; + #ifdef FAUXCLICKY_ENABLE + case FC_TOG: + if (record->event.pressed) { + FAUXCLICKY_TOGGLE; + } + return false; + break; + case FC_ON: + if (record->event.pressed) { + FAUXCLICKY_ON; + } + return false; + break; + case FC_OFF: + if (record->event.pressed) { + FAUXCLICKY_OFF; + } + return false; + break; + #endif #ifdef RGBLIGHT_ENABLE case RGB_TOG: if (record->event.pressed) { diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index ab2e790269..cc7a5013f6 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -86,6 +86,13 @@ enum quantum_keycodes { AU_OFF, AU_TOG, +#ifdef FAUXCLICKY_ENABLE + // Faux clicky + FC_ON, + FC_OFF, + FC_TOG, +#endif + // Music mode on/off/toggle MU_ON, MU_OFF, -- cgit v1.2.3 From b28fb29898efc638000c0388eb30b5fb9200ce4a Mon Sep 17 00:00:00 2001 From: Marvin Ramin Date: Mon, 13 Feb 2017 09:00:25 +0100 Subject: adds documentation for reset button and adds one to the default keymap --- keyboards/gonnerd/keymaps/default/keymap.c | 19 +++++++++--- keyboards/gonnerd/keymaps/mauin/keymap.c | 50 ++++++++++++++++++++++++------ keyboards/gonnerd/readme.md | 4 +++ 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c index a370059398..353648ecfa 100644 --- a/keyboards/gonnerd/keymaps/default/keymap.c +++ b/keyboards/gonnerd/keymaps/default/keymap.c @@ -4,11 +4,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP_60( /* Base */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC,\ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS,\ - KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT, \ - KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL), + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \ + KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT, \ + KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL \ + ), + + [1] = KEYMAP_60( /* System layer to have access to RESET button */ + RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/gonnerd/keymaps/mauin/keymap.c b/keyboards/gonnerd/keymaps/mauin/keymap.c index 1a1d515a9d..5979a7ca44 100644 --- a/keyboards/gonnerd/keymaps/mauin/keymap.c +++ b/keyboards/gonnerd/keymaps/mauin/keymap.c @@ -23,11 +23,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [BASE_LAYER] = KEYMAP_60( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \ - KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \ + KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(2), KC_RCTL \ ), /* Layer 1: Function Layer @@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [FUNCTION_LAYER] = KEYMAP_60( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \ - KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \ - KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \ + __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \ + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \ + KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \ ), /* Layer 2: System Layer @@ -69,10 +69,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ - __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ + __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ ), }; -const uint16_t PROGMEM fn_actions[] = { +enum function_id { + ESC_GRV, // Makes Esc behave like `~ when pressed with the left GUI modifier. This is the "switch between windows of the same application" key combination in macOS +}; +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(ESC_GRV), }; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t esc_grv_mask; + switch (id) { + case ESC_GRV: + esc_grv_mask = get_mods() & MOD_BIT(KC_LGUI); + if (record->event.pressed) { + if (esc_grv_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (esc_grv_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md index 1224ff6b0a..807df308a5 100644 --- a/keyboards/gonnerd/readme.md +++ b/keyboards/gonnerd/readme.md @@ -11,6 +11,10 @@ It is possible to change the bootloader of the GON NerD with an ISP programmer. _After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will not work anymore. You will lose your warranty and official support from GON!_ +## Reset button + +To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins. + ## Building Download or clone the whole firmware and navigate to the keyboards/gonnerd 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. -- cgit v1.2.3 From 5d5f2ff50daaef0e76e8e267a29a7ac2286f65d8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:00:01 +0700 Subject: Some space optimization and housekeeping --- .../handwired/promethium/keymaps/priyadi/keymap.c | 74 +++++++++------------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1ad34612e3..e35e42488b 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -41,6 +41,7 @@ enum glow_modes { }; uint8_t glow_mode = GLOW_MIN; +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { @@ -49,6 +50,7 @@ enum layers { _COLEMAK, _WORKMAN, _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, _PUNC, _NUM, @@ -444,7 +446,7 @@ void led_set_layer_indicator(void) { oldlayer = layer; - if (layer <= _NORMAN) { + if (layer <= _DEFAULT_LAYER_MAX) { rgbsps_send(); return; } @@ -461,7 +463,7 @@ void led_set_layer_indicator(void) { break; default: rgbsps_set(LED_IND_FUNC, 3, 3, 3); - rgbsps_set(LED_IND_NUM, 3, 3, 3); + // rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } @@ -753,6 +755,30 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); @@ -786,51 +812,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef DOUBLESPACE_LAYER_ENABLE // double-space enter space layer case LSPACE: - if (record->event.pressed) { - lspace_active = true; - if (rspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - lspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!rspace_active) { - space_layer_entered = false; - } - } else { - if (!lspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - lspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); return false; break; case RSPACE: - if (record->event.pressed) { - rspace_active = true; - if (lspace_active) { - layer_on(_SPACE); - space_layer_entered = true; - } - } else { - rspace_active = false; - if (space_layer_entered) { - layer_off(_SPACE); - if (!lspace_active) { - space_layer_entered = false; - } - } else { - if (!rspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - rspace_emitted = false; - } - } + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; #endif -- cgit v1.2.3 From 455568d1978bdf4312ab684d7b6da43bdc19895c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:02:36 +0700 Subject: Workaround to remove warning --- keyboards/handwired/promethium/keymaps/priyadi/config.h | 2 ++ keyboards/handwired/promethium/promethium.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 53059ca7d4..6c9d2195e1 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,6 +14,8 @@ #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 +#define UNICODE_TYPE_DELAY 0 + #define LAYOUT_DVORAK #define LAYOUT_COLEMAK #define LAYOUT_NORMAN diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index da37e5c560..d6fea76ce1 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -4,7 +4,6 @@ #include "quantum.h" #define PS2_INIT_DELAY 2000 -#define UNICODE_TYPE_DELAY 0 #define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 -- cgit v1.2.3 From 68e5c859990b31240b57ddf70a6d4e2e3762d195 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 00:07:33 +0700 Subject: Remove assignment warning --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index e35e42488b..52b186c409 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1058,7 +1058,7 @@ void battery_poll(uint8_t level) { void led_set_user(uint8_t usb_led) { bool new_capslock = usb_led & (1< Date: Sun, 12 Feb 2017 00:20:47 +0700 Subject: Forgot to add ifdef to optional feature --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 52b186c409..a24a79aa1c 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -755,6 +755,7 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { if (pressed) { *isactive = true; @@ -778,6 +779,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } } } +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); -- cgit v1.2.3 From 40ced7760649b7d16830ebfd884d5ee2ab980827 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 12 Feb 2017 05:04:14 +0700 Subject: Update my Planck layout --- keyboards/planck/keymaps/priyadi/keymap.c | 516 +++++++++++++++++++++--------- 1 file changed, 365 insertions(+), 151 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2e979221a9..80e867621a 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -10,29 +10,76 @@ #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" - // #define TOLELOT_ENABLE +#define DOUBLESPACE_LAYER_ENABLE + +// so i can copy & paste stuff from my other planck-like keyboards +#define KEYMAP( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c}, \ + {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c}, \ + {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ +} +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define G(x) LGUI(x) +#define KC_WWWB KC_WWW_BACK +#define KC_WWWF KC_WWW_FORWARD + +// hybrid right-alt & scroll lock (mapped to Compose in OS) +#undef KC_RALT +#define KC_RALT MT(MOD_RALT, KC_SLCK) + +bool capslock = false; +#ifdef DOUBLESPACE_LAYER_ENABLE +bool lspace_active = false; +bool rspace_active = false; +bool lspace_emitted = false; +bool rspace_emitted = false; +bool space_layer_entered = false; +#endif + +void turn_off_capslock(void); extern keymap_config_t keymap_config; enum layers { _QWERTY, + _DVORAK, _COLEMAK, _WORKMAN, + _NORMAN, + _DEFAULT_LAYER_MAX = _NORMAN, + _PUNC, _NUM, _FUNC, - _EMOJI, + _GREEKU, _GREEKL, + + _EMOJI, _GUI, + _SYS, }; +// double-space layer +#define _SPACE _GUI + enum planck_keycodes { // layouts QWERTY = SAFE_RANGE, + DVORAK, COLEMAK, WORKMAN, + NORMAN, // layer switchers PUNC, @@ -46,12 +93,16 @@ enum planck_keycodes { LINUX, WIN, OSX, -}; -// Fillers to make layering clearer + // others + LSPACE, + RSPACE, + GLOW, + AUDIO, -#define _______ KC_TRNS -#define XXXXXXX KC_NO + // stubs + OUT_BLE +}; // unicode map @@ -259,18 +310,6 @@ const uint32_t PROGMEM unicode_map[] = { [FSIGM] = 0x03C2, }; - -// hybrid shift - = -// #undef KC_LSFT -// #define KC_LSFT MT(MOD_LSFT, KC_MINS) -// #undef KC_RSFT -// #define KC_RSFT MT(MOD_LSFT, KC_EQL) - - -// hybrid right-gui & scroll lock (mapped to Compose in OS) -#undef KC_RCTL -#define KC_RCTL MT(MOD_LCTL, KC_SLCK) - // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -279,127 +318,138 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_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_QUOT, KC_ENT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL} -}, - -/* Colemak +[_QWERTY] = KEYMAP( + 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_QUOT, KC_ENT , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL +), + +/* Dvorak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______}, - {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +#ifdef LAYOUT_DVORAK +[_DVORAK] = KEYMAP( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, + _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif -/* Workman +/* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______}, - {_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______}, - {_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Uppercase Greek +#ifdef LAYOUT_COLEMAK +[_COLEMAK] = KEYMAP( + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Norman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = { - {_______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______}, - {_______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______}, - {_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, -/* Lowercase Greek +#ifdef LAYOUT_NORMAN +[_NORMAN] = KEYMAP( + _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, + _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif + +/* Workman * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = { - {_______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______}, - {_______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______}, - {_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, + +#ifdef LAYOUT_WORKMAN +[_WORKMAN] = KEYMAP( + _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, + _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, + _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +#endif /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | \ | - | = | < | > | ( | ) | ' | | | + * | | * | \ | - | = | / | | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | _ | + | { | } | [ | ] | " | | | + * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV }, - {XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_PUNC] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Num * ,-----------------------------------------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | + * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | x | | | 0 | , | . | + | - | + * | | | | | | | x | 0 | , | . | | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = { - {KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT}, - {KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR}, - {_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS} -}, +[_NUM] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, + XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ +), /* Func * ,-----------------------------------------------------------------------------------. @@ -412,12 +462,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { - {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL}, - {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_FUNC] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = KEYMAP( + _______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, + _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = KEYMAP( + _______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, + _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Emoji * ,-----------------------------------------------------------------------------------. @@ -430,30 +516,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = { - {X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW)}, - {X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS)}, - {X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH)}, - { X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} -}, +[_EMOJI] = KEYMAP( + X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), + X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), + X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), + X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) +), /* GUI * ,-----------------------------------------------------------------------------------. * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| + * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Win | | Prev | Play | Next | | | | | | |Colmak| + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | OSX | | | | | BL- | BL+ | | | | |Workmn| + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = { - {_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______}, - { LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY}, - { WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK}, - { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN} -}, +[_GUI] = KEYMAP( + XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Sys + * ,-----------------------------------------------------------------------------------. + * | |Qwerty| Win | |Reset | | | USB | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Colmak| | BLE |Norman|MacOS | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYS] = KEYMAP( + XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +), }; @@ -476,6 +580,32 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +#ifdef DOUBLESPACE_LAYER_ENABLE +void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { + if (pressed) { + *isactive = true; + if (*otheractive) { + layer_on(_SPACE); + space_layer_entered = true; + } + } else { + *isactive = false; + if (space_layer_entered) { + layer_off(_SPACE); + if (!*otheractive) { + space_layer_entered = false; + } + } else { + if (!*isemitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + *isemitted = false; + } + } +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); @@ -493,27 +623,49 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #endif - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space: send space immediately if any other key depressed before space is released + if ((lspace_active ^ rspace_active) + && keycode != LSPACE + && keycode != RSPACE + && record->event.pressed) + { + if (lspace_active) { + if (!lspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + lspace_emitted = true; + } + if (rspace_active) { + if (!rspace_emitted) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + rspace_emitted = true; + } + } +#endif switch (keycode) { - // Greek layer handling - case GREEK: - if (record->event.pressed) { - if (lshifted || rshifted) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - } + +#ifdef DOUBLESPACE_LAYER_ENABLE + // double-space enter space layer + case LSPACE: + process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); + return false; + break; + case RSPACE: + process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); return false; break; +#endif + // handle greek layer shift + // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -523,11 +675,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_GREEKU); layer_off(_GREEKL); } else { - if (lshifted ^ rshifted) { // if only one shift is pressed + if (lshift ^ rshift) { // if only one shift was pressed layer_on(_GREEKL); layer_off(_GREEKU); } } + } else { + if (record->event.pressed) { + if (lshift ^ rshift) { // if only one shift was pressed + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } + } + } + return true; + break; + + // press both ctrls to activate SYS layer + case KC_LCTL: + case KC_RCTL: + ; + bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); + bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); + if (record->event.pressed) { + if (lctrl ^ rctrl) { // if only one ctrl was pressed + layer_on(_SYS); + } + } else { + layer_off(_SYS); } return true; break; @@ -535,13 +710,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - if (lshifted || rshifted) { - if (lshifted) unregister_code(KC_LSFT); - if (rshifted) unregister_code(KC_RSFT); + if (lshift || rshift) { + if (lshift) unregister_code(KC_LSFT); + if (rshift) unregister_code(KC_RSFT); register_code(KC_SCLN); unregister_code(KC_SCLN); - if (lshifted) register_code(KC_LSFT); - if (rshifted) register_code(KC_RSFT); + if (lshift) register_code(KC_LSFT); + if (rshift) register_code(KC_RSFT); } else { register_code(KC_COMM); unregister_code(KC_COMM); @@ -565,53 +740,73 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // layout switcher 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; +#ifdef LAYOUT_DVORAK + case DVORAK: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; +#endif +#ifdef LAYOUT_COLEMAK 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; +#endif +#ifdef LAYOUT_WORKMAN case WORKMAN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); - #endif persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; +#endif +#ifdef LAYOUT_NORMAN + case NORMAN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NORMAN); + } + return false; + break; +#endif // layer switchers case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _GUI); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; - case EMOJI: + + case GREEK: if (record->event.pressed) { - layer_on(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + if (lshift || rshift) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); + } } else { - layer_off(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _GUI); + layer_off(_GREEKU); + layer_off(_GREEKL); + update_tri_layer(_PUNC, _GREEKL, _EMOJI); } return false; break; + case NUM: if (record->event.pressed) { layer_on(_NUM); @@ -651,6 +846,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif return false; break; + + // faux clicky toggle, TBD + case AUDIO: + return false; + break; + } return true; } @@ -677,4 +878,17 @@ void shutdown_user() stop_all_notes(); } -#endif \ No newline at end of file +#endif + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { +} + +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} -- cgit v1.2.3 From 24a40d63c9deaf4c7a1349a4dc2383621147ac41 Mon Sep 17 00:00:00 2001 From: Marvin Ramin Date: Mon, 13 Feb 2017 13:44:53 +0100 Subject: define missing KC_NO macro --- keyboards/gonnerd/keymaps/default/keymap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c index 353648ecfa..d74f949dcd 100644 --- a/keyboards/gonnerd/keymaps/default/keymap.c +++ b/keyboards/gonnerd/keymaps/default/keymap.c @@ -1,14 +1,15 @@ #include "gonnerd.h" -// Keymap layers +#define __x__ KC_NO +// Keymap layers const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP_60( /* Base */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \ - KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT, \ - KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \ + KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \ ), [1] = KEYMAP_60( /* System layer to have access to RESET button */ -- cgit v1.2.3 From 903e4d31939626606e3c4856698732bef621e5e8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 20:13:33 +0700 Subject: Fix faux clicky toggle key --- keyboards/planck/keymaps/priyadi/keymap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 2c215702b5..a74481b8b8 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -12,6 +12,10 @@ #include "quantum.h" // #define TOLELOT_ENABLE #define DOUBLESPACE_LAYER_ENABLE +#define LAYOUT_DVORAK +#define LAYOUT_COLEMAK +#define LAYOUT_WORKMAN +#define LAYOUT_NORMAN // so i can copy & paste stuff from my other planck-like keyboards #define KEYMAP( \ @@ -558,7 +562,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYS] = KEYMAP( XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), @@ -852,8 +856,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; // faux clicky toggle, TBD - case AUDIO: - return false; + case FC_TOG: + return true; break; } -- cgit v1.2.3 From 15e2dbb2a991945d354f7ffdb34a9eac2815bd12 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 13 Feb 2017 22:18:36 +0700 Subject: move GRV to ESC position --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++---- keyboards/planck/keymaps/priyadi/keymap.c | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index a24a79aa1c..68f79f5f76 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -616,8 +616,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -634,8 +634,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ ), diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index a74481b8b8..8f721b77a4 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -43,6 +43,7 @@ #define KC_RALT MT(MOD_RALT, KC_SLCK) bool capslock = false; + #ifdef DOUBLESPACE_LAYER_ENABLE bool lspace_active = false; bool rspace_active = false; @@ -435,8 +436,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -453,8 +454,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV, - XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ ), -- cgit v1.2.3 From c2531ff43b9929382e97c5cbce6f4abc4559bd3a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 00:44:02 +0700 Subject: Func + Num = Punc --- .../handwired/promethium/keymaps/priyadi/keymap.c | 18 +++++++++--------- keyboards/planck/keymaps/priyadi/keymap.c | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 68f79f5f76..4e33d61f39 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -52,13 +52,13 @@ enum layers { _NORMAN, _DEFAULT_LAYER_MAX = _NORMAN, - _PUNC, - _NUM, - _FUNC, - _GREEKU, _GREEKL, + _NUM, + _FUNC, + _PUNC, + _EMOJI, _GUI, _SYS, @@ -637,7 +637,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ + _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ ), /* Func @@ -652,10 +652,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ ), /* Uppercase Greek diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 8f721b77a4..d88eb3dbf4 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -63,13 +63,13 @@ enum layers { _NORMAN, _DEFAULT_LAYER_MAX = _NORMAN, - _PUNC, - _NUM, - _FUNC, - _GREEKU, _GREEKL, + _NUM, + _FUNC, + _PUNC, + _EMOJI, _GUI, _SYS, @@ -457,7 +457,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______ + _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ ), /* Func @@ -472,10 +472,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ ), /* Uppercase Greek -- cgit v1.2.3 From 02662e386923ba3d47d75d85e22672ef9fb46827 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 00:46:06 +0700 Subject: Add explicit punctuation key for greek layers --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 12 ++++++------ keyboards/planck/keymaps/priyadi/keymap.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4e33d61f39..96d0d940ec 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -670,9 +670,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKU] = KEYMAP( - _______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, - _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, + _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -688,9 +688,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKL] = KEYMAP( - _______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, - _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, + _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index d88eb3dbf4..c8d3f1eae4 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -490,9 +490,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKU] = KEYMAP( - _______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, - _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______, + _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, + _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, + _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -508,9 +508,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GREEKL] = KEYMAP( - _______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, - _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______, + _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, + _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, + _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -- cgit v1.2.3 From 7ae677dcb7f54960a6f58c85f3e3430bfc2797fc Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 03:18:34 +0700 Subject: remove stand alone punc layer switcher for now --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 4 +++- keyboards/planck/keymaps/priyadi/keymap.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 96d0d940ec..907da21cb2 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -92,6 +92,8 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, + + // stub AUDIO }; @@ -518,7 +520,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index c8d3f1eae4..7a6305112a 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -103,7 +103,6 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, - AUDIO, // stubs OUT_BLE @@ -338,7 +337,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak -- cgit v1.2.3 From 6c692fca7df7178c2abe673b6d5b1db686e22190 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 03:58:12 +0700 Subject: Alt-tab handling in GUI layer --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 +++++++++++++--- keyboards/planck/keymaps/priyadi/keymap.c | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 907da21cb2..5829d2e43c 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -720,14 +720,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | | | | | | | | + * | | | Prev | Play | Next | BTab | Tab | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, - XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + KC_ESC, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU,S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -763,11 +763,13 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * *isactive = true; if (*otheractive) { layer_on(_SPACE); + register_code(KC_LALT); // sends alt and enter layer space_layer_entered = true; } } else { *isactive = false; if (space_layer_entered) { + unregister_code(KC_LALT); // release alt and exit layer layer_off(_SPACE); if (!*otheractive) { space_layer_entered = false; @@ -786,6 +788,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + uint8_t layer = biton32(layer_state); #ifdef DOUBLESPACE_LAYER_ENABLE // double-space: send space immediately if any other key depressed before space is released @@ -809,6 +812,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rspace_emitted = true; } } + + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (record->event.pressed) { + unregister_code(KC_LALT); + } else { + register_code(KC_LALT); + } + } #endif switch (keycode) { @@ -830,7 +841,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_LSFT: case KC_RSFT: ; - uint8_t layer = biton32(layer_state); if (layer == _GREEKU || layer == _GREEKL) { if (record->event.pressed) { layer_on(_GREEKU); diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 7a6305112a..c279bfcd0b 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -537,14 +537,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | | | | | | | | + * | | | Prev | Play | Next | BTab | Tab | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, - XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -594,11 +594,13 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * *isactive = true; if (*otheractive) { layer_on(_SPACE); + register_code(KC_LALT); // sends alt and enter layer space_layer_entered = true; } } else { *isactive = false; if (space_layer_entered) { + unregister_code(KC_LALT); // release alt and exit layer layer_off(_SPACE); if (!*otheractive) { space_layer_entered = false; @@ -656,6 +658,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rspace_emitted = true; } } + + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (record->event.pressed) { + unregister_code(KC_LALT); + } else { + register_code(KC_LALT); + } + } #endif switch (keycode) { -- cgit v1.2.3 From 3758cfd95fe25d6928cf6650b8be3301335dada9 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 14 Feb 2017 04:17:09 +0700 Subject: GUI layer fixes --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 4 ++-- keyboards/planck/keymaps/priyadi/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 5829d2e43c..08a425823d 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -729,7 +729,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, KC_ESC, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU,S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Sys @@ -813,7 +813,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } - if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { if (record->event.pressed) { unregister_code(KC_LALT); } else { diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index c279bfcd0b..20bfa3958b 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -546,7 +546,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* Sys @@ -659,7 +659,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } - if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC) { + if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { if (record->event.pressed) { unregister_code(KC_LALT); } else { -- cgit v1.2.3 From 3272821d32e79cafbf4d96dae811c5d57954a4b1 Mon Sep 17 00:00:00 2001 From: Stanley Lai Date: Mon, 13 Feb 2017 18:09:02 -0800 Subject: Added support for XD60v2 with RGB underglow and LED backlight support --- keyboards/xd60/config.h | 22 +++++++++++--- keyboards/xd60/keymaps/default/keymap.c | 40 +++++++------------------ keyboards/xd60/keymaps/stanleylai/keymap.c | 47 +++++++++++++----------------- keyboards/xd60/rules.mk | 2 +- keyboards/xd60/xd60.h | 18 ++++-------- 5 files changed, 57 insertions(+), 72 deletions(-) diff --git a/keyboards/xd60/config.h b/keyboards/xd60/config.h index 13ae29063e..d3052b4038 100644 --- a/keyboards/xd60/config.h +++ b/keyboards/xd60/config.h @@ -25,8 +25,8 @@ along with this program. If not, see . #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER XIUDI -#define PRODUCT XD60 -#define DESCRIPTION XD60 Keyboard by XIUDI +#define PRODUCT XD60v2 +#define DESCRIPTION XD60 v2 Keyboard PCB by XIUDI /* key matrix size */ #define MATRIX_ROWS 5 @@ -46,14 +46,28 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } #define UNUSED_PINS +/* Backlight Setup + * Only 1 level, since XD60's backlight implementation doesn't seem compatible with QMK for variable brightness + * Use BL_STEP to toggle LEDs instead, as BL_TOGG can be inconsistent (depending on current level) + */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 1 + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +/* RGB Underglow + * F6 PIN for XD60v2 that has pre-soldered WS2812 LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index ea85c02a39..11be9afca2 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -9,56 +9,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer KEYMAP( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_NO, KC_APP, BL_TOGG,BL_DEC, BL_INC, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), }; +// Custom Actions const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay }; +// Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function + // MACRODOWN only works in this function switch(id) { case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; } return MACRO_NONE; }; +// Loop void matrix_scan_user(void) { - - // Layer LED indicators - uint32_t layer = layer_state; - - if (layer & (1<<1)) { - xd60_esc_led_on(); - } else { - xd60_esc_led_off(); - } - - /* - if (layer & (1<<2)) { - xd60_poker_leds_on(); - xd60_esc_led_on(); - } else { - xd60_poker_leds_off(); - xd60_esc_led_off(); - } - */ + // Empty }; diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index a84ee0f898..4d3032a106 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -8,53 +8,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), KC_UP, KC_DEL, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer KEYMAP( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ - KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_STEP, BL_TOGG, KC_DEL, \ + KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ F(0), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_PGUP, KC_INS, \ + KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_INS, \ KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END), + // 2: RGB Layer + KEYMAP( + 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, \ + BL_STEP, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(1), KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + }; +// Custom Actions const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay + [0] = ACTION_LAYER_MOMENTARY(1), // to Function Layer + [1] = ACTION_LAYER_MOMENTARY(2), // to RGB Layer }; +// Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function + // MACRODOWN only works in this function switch(id) { case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; } return MACRO_NONE; }; +// Loop void matrix_scan_user(void) { - - // Layer LED indicators - uint32_t layer = layer_state; - - if (layer & (1<<1)) { - xd60_wasd_leds_on(); - xd60_fn_led_on(); - xd60_esc_led_on(); - xd60_poker_leds_on(); - } else { - xd60_wasd_leds_off(); - xd60_fn_led_off(); - xd60_esc_led_off(); - xd60_poker_leds_off(); - } + // Empty }; diff --git a/keyboards/xd60/rules.mk b/keyboards/xd60/rules.mk index e0b92121d2..174c3ec848 100644 --- a/keyboards/xd60/rules.mk +++ b/keyboards/xd60/rules.mk @@ -61,5 +61,5 @@ 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. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 36442cb527..dd5f63c0ca 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -6,24 +6,18 @@ /* XD60 LEDs * GPIO pads - * 0 F7 WASD LEDs - * 1 F6 ESC LED - * 2 F5 FN LED - * 3 F4 POKER Arrow LEDs + * 0 F7 not connected + * 1 F6 RGB PWM Underglow + * 2 F5 Backlight LED + * 3 F4 not connected * B2 Capslock LED * B0 not connected */ inline void xd60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void xd60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } -inline void xd60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } -inline void xd60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); } -inline void xd60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); } +inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } inline void xd60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } -inline void xd60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); } -inline void xd60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } -inline void xd60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); } -inline void xd60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } +inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } /* XD60 Keymap Definition Macro */ #define KEYMAP( \ -- cgit v1.2.3 From df311c7b40cb6e611a522331dca9836f6eef9dce Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:01:03 +0700 Subject: num, func, punc 3state layer done right --- .../handwired/promethium/keymaps/priyadi/keymap.c | 99 ++++++++++------------ keyboards/handwired/promethium/promethium.h | 4 +- 2 files changed, 46 insertions(+), 57 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 08a425823d..9f07a7d080 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -56,7 +56,7 @@ enum layers { _GREEKL, _NUM, - _FUNC, + _FUN, _PUNC, _EMOJI, @@ -76,9 +76,9 @@ enum planck_keycodes { NORMAN, // layer switchers - PUNC, - NUM, - FUNC, + // PUNC, + // NUM, + // FUN, EMOJI, GUI, GREEK, @@ -92,11 +92,16 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, + FOR0, // stub AUDIO }; +#define NUM MO(_NUM) +#define FUN MO(_FUN) +#define FUN0 LT(_FUN, KC_0) + // unicode map enum unicode_name { @@ -369,14 +374,14 @@ const uint8_t PROGMEM LED_MODS[] = { const uint8_t PROGMEM LED_FN[] = { LED_PUNC, LED_NUM, - LED_FUNC, + LED_FUN, LED_EMOJI }; const uint8_t PROGMEM LED_INDICATORS[] = { LED_IND_EMOJI, LED_IND_NUM, - LED_IND_FUNC, + LED_IND_FUN, LED_IND_BATTERY, LED_IND_USB, LED_IND_BLUETOOTH, @@ -435,7 +440,7 @@ void led_reset(void) { void led_set_layer_indicator(void) { static uint8_t oldlayer = 255; - rgbsps_set(LED_IND_FUNC, 0, 0, 0); + rgbsps_set(LED_IND_FUN, 0, 0, 0); // rgbsps_set(LED_IND_NUM, 0, 0, 0); rgbsps_set(LED_IND_EMOJI, 0, 0, 0); @@ -454,8 +459,8 @@ void led_set_layer_indicator(void) { } switch(layer) { - case _FUNC: - rgbsps_set(LED_IND_FUNC, 15, 0, 0); + case _FUN: + rgbsps_set(LED_IND_FUN, 15, 0, 0); break; // case _NUM: // rgbsps_set(LED_IND_NUM, 0, 0, 15); @@ -464,7 +469,7 @@ void led_set_layer_indicator(void) { rgbsps_set(LED_IND_EMOJI, 15, 15, 0); break; default: - rgbsps_set(LED_IND_FUNC, 3, 3, 3); + rgbsps_set(LED_IND_FUN, 3, 3, 3); // rgbsps_set(LED_IND_NUM, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } @@ -520,7 +525,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak @@ -636,10 +641,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, + _______, _______, _______, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_X, _______ ), /* Func @@ -653,11 +658,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ +[_FUN] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Uppercase Greek @@ -785,10 +790,25 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } #endif +uint32_t layer_state_set_kb(uint32_t state) +{ + // turn on punc layer if both fun & num are on + if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) { + state |= (1UL<<_PUNC); + } else { + state &= ~(1UL<<_PUNC); + } + return state; +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); - uint8_t layer = biton32(layer_state); + static bool lshift = false; + static bool rshift = false; + static uint8_t layer = 0; + + lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); + layer = biton32(layer_state); #ifdef DOUBLESPACE_LAYER_ENABLE // double-space: send space immediately if any other key depressed before space is released @@ -949,17 +969,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // layer switcher - case PUNC: - if (record->event.pressed) { - layer_on(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } else { - layer_off(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - + // case GREEK: if (record->event.pressed) { if (lshift || rshift) { @@ -968,31 +978,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { layer_on(_GREEKL); layer_off(_GREEKU); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); } } else { layer_off(_GREEKU); layer_off(_GREEKL); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - - case NUM: - if (record->event.pressed) { - turn_off_capslock(); - layer_on(_NUM); - } else { - layer_off(_NUM); - } - return false; - break; - - case FUNC: - if (record->event.pressed) { - layer_on(_FUNC); - } else { - layer_off(_FUNC); } return false; break; diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index d6fea76ce1..caad5258e4 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -33,7 +33,7 @@ enum led_sequence { LED_IND_USB, LED_IND_BATTERY, - LED_IND_FUNC, + LED_IND_FUN, LED_IND_NUM, LED_IND_EMOJI, @@ -60,7 +60,7 @@ enum led_sequence { LED_U, LED_J, LED_M, - LED_FUNC, + LED_FUN, LED_RSPC, LED_N, -- cgit v1.2.3 From d369bfb83a74d94ed0fbb13f8ee3a8a1146da770 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:02:15 +0700 Subject: Add layer_state_set_kb hook --- tmk_core/common/action_layer.c | 6 ++++++ tmk_core/common/action_layer.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index a3c7579642..3363a2e532 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -57,8 +57,14 @@ void default_layer_xor(uint32_t state) */ uint32_t layer_state = 0; +__attribute__((weak)) +uint32_t layer_state_set_kb(uint32_t state) { + return state; +} + static void layer_state_set(uint32_t state) { + state = layer_state_set_kb(state); dprint("layer_state: "); layer_debug(); dprint(" to "); layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 025cf5420f..fc714700da 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -69,6 +69,8 @@ void layer_xor(uint32_t state); #define layer_xor(state) #define layer_debug() +__attribute__((weak)) +void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); #endif /* pressed actions cache */ -- cgit v1.2.3 From 3c8c3ebe3ffad774f0c3019654a5e185d37b8ebc Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:19:31 +0700 Subject: Bug fix & added default_layer_state_set_kb --- tmk_core/common/action_layer.c | 6 ++++++ tmk_core/common/action_layer.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 3363a2e532..58d919a04d 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -16,8 +16,14 @@ */ uint32_t default_layer_state = 0; +__attribute__((weak)) +uint32_t default_layer_state_set_kb(uint32_t state) { + return state; +} + static void default_layer_state_set(uint32_t state) { + state = default_layer_state_set_kb(state); debug("default_layer_state: "); default_layer_debug(); debug(" to "); default_layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index fc714700da..785bb5be44 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -27,7 +27,10 @@ along with this program. If not, see . */ extern uint32_t default_layer_state; void default_layer_debug(void); -void default_layer_set(uint32_t state); +uint32_t default_layer_set(uint32_t state); + +__attribute__((weak)) +void default_layer_state_set_kb(uint32_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ @@ -70,7 +73,7 @@ void layer_xor(uint32_t state); #define layer_debug() __attribute__((weak)) -void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); +uint32_t layer_state_set_kb(uint32_t state); #endif /* pressed actions cache */ -- cgit v1.2.3 From d96175937bfa9f700d9ee54c20e5d963c12d02df Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:19:31 +0700 Subject: Bug fix & added default_layer_state_set_kb --- tmk_core/common/action_layer.c | 6 ++++++ tmk_core/common/action_layer.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 3363a2e532..58d919a04d 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -16,8 +16,14 @@ */ uint32_t default_layer_state = 0; +__attribute__((weak)) +uint32_t default_layer_state_set_kb(uint32_t state) { + return state; +} + static void default_layer_state_set(uint32_t state) { + state = default_layer_state_set_kb(state); debug("default_layer_state: "); default_layer_debug(); debug(" to "); default_layer_state = state; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index fc714700da..785bb5be44 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -27,7 +27,10 @@ along with this program. If not, see . */ extern uint32_t default_layer_state; void default_layer_debug(void); -void default_layer_set(uint32_t state); +uint32_t default_layer_set(uint32_t state); + +__attribute__((weak)) +void default_layer_state_set_kb(uint32_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ @@ -70,7 +73,7 @@ void layer_xor(uint32_t state); #define layer_debug() __attribute__((weak)) -void layer_state_set_kb(uint32_t oldstate, uint32_t newstate); +uint32_t layer_state_set_kb(uint32_t state); #endif /* pressed actions cache */ -- cgit v1.2.3 From bd8d717f1ff2eef42dfef490374a8cee61be5d87 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:25:08 +0700 Subject: Fix bug fix attempt --- tmk_core/common/action_layer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 785bb5be44..d89ed6e5ce 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -27,10 +27,10 @@ along with this program. If not, see . */ extern uint32_t default_layer_state; void default_layer_debug(void); -uint32_t default_layer_set(uint32_t state); +void default_layer_set(uint32_t state); __attribute__((weak)) -void default_layer_state_set_kb(uint32_t state); +uint32_t default_layer_state_set_kb(uint32_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ -- cgit v1.2.3 From 168c91202731ab5df5a8b1e9f985ab52ab7291e8 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 05:38:40 +0700 Subject: Move Alt-Tab position --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 9f07a7d080..3d25c766c2 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -723,17 +723,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | + * | Esc | | Btab | Esc | Tab | | | Prev | | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | BTab | Tab | | | | | | + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GUI] = KEYMAP( XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, - KC_ESC, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU,S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), -- cgit v1.2.3 From c05509895208c078401b610eddf85cbc0c5e5a25 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:30:07 -0600 Subject: The Ordinary Layout now has more symbols on the Symbols layer! So useful! --- .../ergodox/keymaps/ordinary/ordinary-symbol.png | Bin 101255 -> 89582 bytes .../ergodox/keymaps/ordinary/ordinary-symbol.txt | 22 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png index dd90863295..8cd92cee14 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt index 001bf370d8..f64503ecbd 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt @@ -10,18 +10,18 @@ [{y:-0.875,x:2.5,c:"#bbddbb"},"$",{x:1},")",{x:8.5,c:"#89b087"},"4",{x:1},"6"], [{y:-0.875,x:5.5,c:"#bbddbb"},"`",{x:6.5},"/"], [{y:-0.875,c:"#000000",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"#",{x:14.5,c:"#89b087"},"*",{c:"#000000",t:"#007d00",w:1.5},"\n\nSymbols\n\n\n\n\nShift"], -[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",fa:[0,0,0,1],h:1.5},"Tab >\n\n\nTab",{x:4.5,h:1.5},"< Tab\n\n\nShift Tab"], -[{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"], +[{y:-0.625,x:6.5,c:"#bbddbb",t:"#000000",a:6,h:1.5},"'",{x:4.5,h:1.5},"\""], +[{y:-0.75,x:3.5,a:4},"[",{x:10.5,c:"#89b087"},"2"], [{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"], [{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"], [{y:-0.875,c:"#c6c600",t:"#9e0000",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"%",{x:14.5,c:"#89b087"},"-",{c:"#c6c600",t:"#9e0000",w:1.5},"\n\nCapitals\n\n\n\n\nShift"], -[{y:-0.375,x:3.5,c:"#dddd77",t:"#000000"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},"."], -[{y:-0.875,x:2.5,c:"#dddd77"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0",{x:1},"="], -[{y:-0.75,x:0.5,c:"#dddd77"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+","Enter"], -[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ff8500"},"Left","Right"], -[{h:2},"Space",{h:2},"Enter","Up"], -[{x:2},"Down"], -[{r:-30,rx:13,y:-1,x:-3},"Home","End"], -[{x:-3},"Page\n\n\n\n\n\nUp",{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete"], -[{x:-3},"Page\n\n\n\n\n\nDown"] +[{y:-0.375,x:3.5,c:"#bbddbb",t:"#000000"},"<",{x:10.5,c:"#89b087"},"."], +[{y:-0.875,x:2.5,c:"#bbddbb"},"*",{x:1,a:5},">",{x:8.5,c:"#89b087",a:4},"0",{x:1},"="], +[{y:-0.75,x:0.5,c:"#bbddbb"},";","&",{x:14.5,c:"#89b087"},"+","Enter"], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#737373",a:7},"",""], +[{c:"#bbddbb",h:2},"+",{h:2},"=",{c:"#737373"},""], +[{x:2,c:"#bbddbb"},"!="], +[{r:-30,rx:13,y:-1,x:-3,c:"#737373"},"",""], +[{x:-3},"",{c:"#bbddbb",h:2},"_",{h:2},"-"], +[{x:-3},"->"] -- cgit v1.2.3 From 1e096981468d75cb38ae97866b0a12b884caa77e Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:31:54 -0600 Subject: All my friends us The Ordinary Layout because it doesn't force you to change you typing habits --- .../ergodox/keymaps/ordinary/ordinary-media.png | Bin 123435 -> 123523 bytes .../ergodox/keymaps/ordinary/ordinary-media.txt | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-media.png b/keyboards/ergodox/keymaps/ordinary/ordinary-media.png index 5ff3f53385..491f698d80 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-media.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-media.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt index e1467b22e1..67b7840b52 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt @@ -15,10 +15,10 @@ [{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#1e8fff"},"End",{x:1},"Page\n\n\n\n\n\nDown"], [{y:-0.875,x:5.5,c:"#9977ee"},"Mute",{x:6.5,c:"#737373",a:7},""], [{y:-0.875,c:"#c6c600",t:"#9e0000",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",t:"#000000",a:7},"",{x:14.5},"",{c:"#c6c600",t:"#9e0000",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"], -[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#1e8fff",fa:[0,0,0,1]},"Delete\n\n\nOption"], -[{y:-0.875,x:2.5,c:"#0066cc"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#1e8fff"},"Insert\n\n\nCmd",{x:1,c:"#dddd77"},"Hyper"], -[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"], -[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#6633ee"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"], +[{y:-0.375,x:3.5,c:"#0066cc",t:"#000000"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#1e8fff"},"Delete"], +[{y:-0.875,x:2.5,c:"#0066cc"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#1e8fff"},"Insert",{x:1,c:"#737373",a:7},""], +[{y:-0.75,x:0.5},"","",{x:14.5},"",""], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#6633ee",a:4,fa:[0,0,0,1]},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"], [{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"], [{x:2},"Home\n\n\nBrowser"], [{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"], -- cgit v1.2.3 From e006b4a600379e30918235c4cdf58f7678ccd1d4 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:32:31 -0600 Subject: The Ordinary Layout has a feature for one-handed chorded typing --- .../ergodox/keymaps/ordinary/ordinary-base.png | Bin 98200 -> 120512 bytes .../ergodox/keymaps/ordinary/ordinary-base.txt | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-base.png b/keyboards/ergodox/keymaps/ordinary/ordinary-base.png index 831db4f5d3..18c6c4ab2f 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-base.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-base.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt index 7763c3d37e..4fc11faf94 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt @@ -7,10 +7,10 @@ [{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"], [{y:-0.875,c:"#c6c600",t:"#002299",w:1.5},"Media\n\nTab\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"Q",{x:14.5},"P",{c:"#c6c600",t:"#002299",w:1.5},"|\n\\\nMedia\n\n\n\n\nShift"], [{y:-0.375,x:3.5,c:"#cccccc",t:"#000000"},"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:2.5},"S",{x:1,fa:[0,0,0,1]},"F\n\n\nreverse",{x:8.5},"J\n\n\nreverse",{x:1},"L"], [{y:-0.875,x:5.5},"G",{x:6.5},"H"], -[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"A",{x:14.5},":\n;",{c:"#c6c600",t:"#007d00",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"], -[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",fa:[0,0,0,1],h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"], +[{y:-0.875,c:"#c6c600",t:"#007d00",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc",t:"#000000"},"A\n\n\nreverse",{x:14.5},":\n;\n\nreverse",{c:"#c6c600",t:"#007d00",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"], +[{y:-0.625,x:6.5,c:"#ff8500",t:"#000000",h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"], [{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"], [{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."], [{y:-0.875,x:5.5},"B",{x:6.5},"N"], -- cgit v1.2.3 From 54785c1976590dc3081f06ca49747dfcb6ecd3b3 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Tue, 14 Feb 2017 22:47:11 -0600 Subject: The Ordinary Layout is boring, normal, typical, expected. --- keyboards/ergodox/keymaps/ordinary/keymap.c | 146 +++++++++++++++++++-------- keyboards/ergodox/keymaps/ordinary/readme.md | 33 ++++-- 2 files changed, 125 insertions(+), 54 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 5c01d96784..b79f0f0645 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -9,6 +9,7 @@ #define SYMB 1 // symbols layer #define MDIA 2 // media layer #define SPEC 3 // special layer +#define RBASE 4 // reverse default layer #define LSymb 10 // left symbol-shift key #define LMdia 11 // left media-shift key @@ -17,15 +18,21 @@ #define RMdia 14 // right media-shift key #define RSpec 15 // right special-shift key +#define NotEq 16 // != macro +#define Point 17 // -> macro + #define MUL 20 // mouse up left #define MUR 21 // mouse up right #define MDL 22 // mouse down left #define MDR 23 // mouse down right + + /* - * The Ordinary Layout for the Ergodox EZ keyboard, v4.20 + * The Ordinary Layout for the Ergodox EZ keyboard, v5 * - * Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com + * Modifications from the default Ergodox EZ layout + * by Nicholas Keene ergodoxez@nicholaskeene.com * * No rights reserved. This software is in the public domain. * Credit me if you are friendly but if you're a jerk don't bother. @@ -44,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------| * | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media | * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------| - * | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol | + * | Symbol | ^A | S | D | ^F | G |------| |------| H | ^J | K | L | ^; | '" Symbol | * |------------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+------------| * | Capitals | Z | X | C | V | B | -Tab | | | N | M | , | . | / | Capitals | * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------' @@ -60,24 +67,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = KEYMAP( // left hand - F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC -,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC -,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) -,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT,KC_LGUI + F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC +,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC +,M(LSymb) ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G +,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) +,KC_SCLN ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN // right hand - ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) - ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb) - ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT - ,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL + ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) + ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) + ,KC_H ,LT(RBASE, KC_J),KC_K ,KC_L ,LT(RBASE,KC_SCLN),F(RSymb) + ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT + ,KC_RGUI ,KC_RALT,KC_HYPR,KC_MEH ,KC_RCTL ,KC_LEFT ,KC_RGHT ,KC_UP ,KC_DOWN ,KC_ENT ,KC_SPC - ), +), /******* Symbols Layer ************************************************************************************************* * @@ -90,35 +97,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------| * | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | LCtrl | Meh |Hyper | LAlt | LGui | | 0 | . | = | + | Ent | + * | ; | & | * | < | > | | 0 | . | = | + | Enter | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. - * | Left | Right| | Home | End | + * ||||||||||||||| ||||||||||||||| * ,------|------|------| |------+------+------. - * | | | Up | | PgUp | | | - * |Space |Enter |------| |------|BackSp| Del | - * | | | Down | | PgDn | | | + * | Plus | Equal|||||||| |||||||| Under| Dash | + * | | |------| |------| Score| | + * | + | = | != | | -> | _ | - | * `--------------------' `--------------------' */ [SYMB] = KEYMAP( // left hand - KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC -,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) -,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_TAB -,KC_LCTL ,KC_MEH ,KC_HYPR ,KC_LALT ,KC_LGUI - ,KC_LEFT ,KC_RGHT - ,KC_UP - ,KC_SPC ,KC_ENT ,KC_DOWN + KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC +,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) +,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_TAB +,KC_LCTL ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) + ,KC_NO ,KC_NO + ,KC_NO + ,KC_PLUS ,KC_EQL ,M(NotEq) // right hand - ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS - ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS - ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS - ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS - ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT - ,KC_HOME ,KC_END - ,KC_PGUP - ,KC_PGDN ,KC_BSPC ,KC_DEL + ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS + ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS + ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS + ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS + ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT + ,KC_NO ,KC_NO + ,KC_NO + ,M(Point) ,LSFT(KC_MINS),KC_MINS ), /******* Media Layer ******************************************************************************************************* @@ -132,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------| * | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | | * `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------' - * |LCtrl| Meh | MClick | LClick | R Click| |Cmd/Insrt|Optn/Del | Hyper | Meh |RCtrl| + * | | | MClick | LClick | R Click| | Insert | Del | | | | * `---------------------------------------------' `---------------------------------------------' * ,-------------. ,-------------. * | Stop |Refrsh| | Prev | Next | @@ -148,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U ,KC_TRNS ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD ,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D -,KC_LCTL ,KC_MEH ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 +,KC_NO ,KC_NO ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 ,KC_WSTP ,KC_WREF ,KC_WSCH ,KC_WBAK ,KC_NO ,KC_WHOM @@ -157,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_WH_U ,KC_PSCR ,KC_HOME ,KC_UP ,KC_PGUP ,KC_MAIL ,KC_TRNS ,KC_NLCK ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_MYCM ,KC_TRNS ,KC_WH_D ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_TRNS - ,GUI_T(KC_INS),ALT_T(KC_DEL),KC_HYPR ,KC_MEH ,KC_RCTL + ,KC_INS ,KC_DEL ,KC_NO ,KC_NO ,KC_NO ,KC_MPRV ,KC_MNXT ,KC_VOLU ,KC_VOLD ,KC_MSTP ,KC_MPLY @@ -203,7 +210,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ) +), + +/******* Reverse Base Layer ********************************************************************************************* + * + * ,------------------------------------------------------. ,------------------------------------------------------. + * | =+ | 0 | 9 | 8 | 7 | 6 | - | | Esc | 5 | 4 | 3 | 2 | 1 | `~ | + * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------| + * | \| | P | O | I | U | Y | ] | | [ | T | R | E | W | Q | Tab | + * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------| + * | | ; | L | K | J | H |------| |------| G | F | D | S | A | '" | + * |------------+------+------+------+------+------| Tab | |Shift |------+------+------+------+------+------------| + * | Capitals | / | . | , | M | N | | | -Tab | B | V | C | X | Z | Capitals | + * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------' + * | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | Left | Right| | Home | End | + * ,------|------|------| |------+------+------. + * | | | Up | | PgUp | | | + * |Space |Enter |------| |------|BackSp| Del | + * | | | Down | | PgDn | | | + * `--------------------' `--------------------' + */ +[RBASE] = KEYMAP( +// left hand + KC_EQL ,KC_0 ,KC_9 ,KC_8 ,KC_7 ,KC_6 ,KC_MINS +,KC_BSLS ,KC_P ,KC_O ,KC_I ,KC_U ,KC_Y ,KC_RBRC +,KC_NO ,LT(RBASE, KC_SCLN) ,KC_L ,KC_K ,LT(RBASE, KC_J) ,KC_H +,KC_RSFT ,KC_SLSH ,KC_DOT ,KC_COMM,KC_M ,KC_N ,KC_TAB +,KC_RCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_RALT,KC_RGUI + ,KC_LEFT ,KC_RGHT + ,KC_UP + ,KC_SPC ,KC_ENT ,KC_DOWN + // right hand + ,KC_ESC ,KC_5 ,KC_4 ,KC_3 ,KC_2 ,KC_1 ,KC_GRV + ,KC_LBRC ,KC_T ,KC_R ,KC_E ,KC_W ,KC_Q ,KC_TAB + ,KC_G ,LT(RBASE, KC_F),KC_D ,KC_S ,LT(RBASE, KC_A) ,F(LSymb) + ,LSFT(KC_TAB),KC_B ,KC_V ,KC_C ,KC_X ,KC_Z ,KC_LSFT + ,KC_LGUI,KC_LALT,KC_HYPR ,KC_MEH,KC_LCTL + ,KC_HOME ,KC_END + ,KC_PGUP + ,KC_PGDN ,KC_BSPC ,KC_DEL +) }; const uint16_t PROGMEM fn_actions[] = { @@ -227,14 +276,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { // There are two shift keys for each layer so we increment a layer_shift var when one - // is pressed and decrement when one is released. If both are pressed at the same time - // then the layer is locked (or unlocked). The shift counts are bound between 0 and 2 + // is pressed and decrement when one is released. The shift counts are bound between 0 and 2 // only because sometimes rapid pressing led to irregular events; this way the states // are self healing during use. case LSymb: // if (record->event.pressed) { // when the LSymb button is pressed - if(++symb_shift > 2) mdia_shift = 2; // increment the symb shift count, max two + if(++symb_shift > 2) symb_shift = 2; // increment the symb shift count, max two if(spec_shift) symb_lock = !symb_lock; // if the Special layer is on, toggle the shift lock layer_on(SYMB); // in any case, turn on the Symbols layer } else { // when the LSymb button is released @@ -264,7 +312,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case LSpec: if (record->event.pressed) { // when the LSpec button is pressed - if(symb_shift) symb_lock == !symb_lock; // if another layer button is engaged, then + if(symb_shift) symb_lock = !symb_lock; // if another layer button is engaged, then else if(mdia_shift) mdia_lock = !mdia_lock; // lock that layer, be it caps or symb or mdia else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) { register_code(KC_GRV); // otherwise, if it's an uninterrupted tap, emit a char @@ -340,6 +388,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + case NotEq: + if (record->event.pressed) { + return MACRO( I(30), T(EXLM), T(EQL), END ); // + } + break; + + case Point: + if (record->event.pressed) { + return MACRO( I(30), T(MINS), T(DOT), END ); // + } + break; + // mouse diagonals case MUL: // mouse up left diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/keyboards/ergodox/keymaps/ordinary/readme.md index 820b80b454..313b726bad 100644 --- a/keyboards/ergodox/keymaps/ordinary/readme.md +++ b/keyboards/ergodox/keymaps/ordinary/readme.md @@ -11,10 +11,11 @@ no rights reserved, use for any purposes, credit me if you are a nice person ## The Base Layout ## * *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets). -* *Modifier Keys* are light yellow and in the traditional location: Control, Option, Command, plus Hyper and Meh. +* *Modifier Keys* are light yellow and in the traditional locationn at the bottom of the keyboard: Control, Option, Command, plus Hyper and Meh. * *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional shift) is found in the usual place and above that is found Symbol Shift, Media Shift, and Special Shift (Shift Lock). * Several of the shift keys double for entry of characters which would typically be in those locations. * *Thumb Keys* shown in orange are for text navigation and manipulation. +* The keys under pinky fingers and index fingers will *reverse* the keyboard layout. * *Escape* is red and it is always found in that location no matter what. ![Ordinary base layout](ordinary-base.png) @@ -23,16 +24,20 @@ The four big orange keys are arranged differently than in the default Ergodox EZ The Forward Tab and Backward Tab keys are in their locations mostly because I ended up with two extra buttons and needed something to do with them. My muscle memory from using the Truly Ergonomic Keyboard makes me look for the Tab key with my right index finger, so it is handy to have this redundant Tab, and the idea with the Backward Tab key is that it becomes easy to navigate text fields in forms, or to indent/unindent code. +#### Reversing The Base Layout #### + +The Ordinary Layout can be used to perform one-handed chorded text input. If you hold down the key under either index finger or either pinky finger (A, F, J and Semicolon), the whole base layout reverses order. Most keys are _mirrored_ but the delete keys are merely *translated* to preserve directionality. Pro-tip: This feature is particularly handly for bringing the Enter key to the left hand when the right hand is using the mouse. + ## The Symbols Layer ## * *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column. -* *F-Keys* are bright green and overlay the row of numerals. +* *F-Keys* are bright green and overlay the row of numerals. This layer has F1-F10, higher *F-Keys* are on the Symbols layer. * *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed. -* *Thumb keys* on this layer are the *reverse* of the orange keys on the base layer, with the keys either mirrored or shifted. This is powerful! Often I find myself using the mouse with my right hand, and the left hand needs to press Enter. Instead of reaching the left hand over to the right side of the keyboard, now I simply tap Symbols to reverse the turquoise keys, and Enter is right where it should be. ![Ordinary symbol layout](ordinary-symbol.png) The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout. I slightly rearranged the symbols, added some symbols, expanded the number pad, and straightened out the F-Keys. It's very handy to have the symbols directly underneath the normal typing keys. +* The dark gray keys do nothing in case you bump them by accident. ## The Media Layer ## @@ -42,7 +47,7 @@ The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout * Higher-order *F-Keys* are shown in bright green overylaying the numerals. * *Application Keys* to control web browsers and audio players are dark purple but don't get too excited because these have weak support on operating systems I've looked at. Good luck. * The light purple keys are various operating system keys such as NumLock and Mute and a button to navigate to My Computer (usually your home dir). -* The dark gray keys do nothing in case you bump them by accident +* The dark gray keys do nothing in case you bump them by accident. ![Ordinary media layout](ordinary-media.png) @@ -64,27 +69,33 @@ Multiple layers can be turned on at once. The Capitals layer will affect charact The Special Shift layer is mostly used to lock the shift keys but in order to make this layout more _ordinary_ there are a few special sequences which put some keys near their most common traditional locations. -### Escape ### +#### Escape #### -The One True Location for the Escape key is segregated way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one is home to the tilde (er, grave) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, which is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape. +The One True Location for an Escape key is separated from the rest of the keys, way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location, however, and the nearest one is home to the tilde (er, *grave*) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, which is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape. -The Ordinary layout offers as a consolation prize a Special sequence for Escape: Special Shift + 1. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers. +The Ordinary layout offers as a consolation prize, a Special sequence for Escape: **Special Shift + 1**. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers. -### Backspace ### +#### Backspace #### -At the top right corner of the Ergodox EZ you can a gesture similar to the special Escape sequence using the 0 key to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times. +At the top right corner of the Ergodox EZ you can do **Special Shift + 0** to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times. -### Other Characters ### +#### Other Characters #### The Escape and Backspace special sequences are so useful why not have a few more? You can find dash under 9, left bracket under o, and right bracket under p. That's pretty much all the characters from the top right corner of the keyboard which moved to make room for the columnar layout. +## Errata ## + +Some of the symbols on the Symbols layer are produced by the keyboard by "capitalizing" another symbol (such as *!* from *1*) so when you type that key you will notice the Capitals Shift red LED turn on. + **** -The Ordinary Layout for the Ergodox EZ keyboard, v4.20 +The Ordinary Layout for the Ergodox EZ keyboard, v5 Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com No rights reserved. This software is in the public domain. Credit me if you are friendly but if you're a jerk don't bother. +Keyboard layout images were created with http://www.keyboard-layout-editor.com/ by Ian Prest my thanks to that free service + Details: readme.md https://github.com/nrrkeene/qmk_firmware/tree/master/keyboards/ergodox/keymaps/ordinary -- cgit v1.2.3 From c2f0207d598189415b355e46031f37835408b6ea Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 16:36:31 +0700 Subject: Merge my Planck-like keyboards --- .../handwired/promethium/keymaps/priyadi/config.h | 4 + .../handwired/promethium/keymaps/priyadi/keymap.c | 164 ++-- keyboards/planck/keymaps/priyadi/config.h | 39 + keyboards/planck/keymaps/priyadi/keymap.c | 913 +-------------------- 4 files changed, 144 insertions(+), 976 deletions(-) create mode 100644 keyboards/planck/keymaps/priyadi/config.h diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 6c9d2195e1..00f9fed313 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -3,6 +3,8 @@ #include "../../config.h" +#define PRIYADI_PROMETHIUM + /* bootmagic salt key */ #define BOOTMAGIC_KEY_SALT KC_ESC @@ -11,6 +13,7 @@ #define PREVENT_STUCK_MODIFIERS +#define RGBSPS_ENABLE #define RGB_DI_PIN B5 #define RGBSPS_NUM 57 @@ -22,5 +25,6 @@ #define LAYOUT_WORKMAN #define DOUBLESPACE_LAYER_ENABLE +// #define TOLELOT_ENABLE #endif diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 3d25c766c2..0dc0a03396 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1,14 +1,32 @@ // 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 "promethium.h" +#if defined(PRIYADI_PROMETHIUM) + #include "promethium.h" +#elif defined(PRIYADI_PLANCK) + #include "planck.h" +#else + #error "no keyboard defined" +#endif + #include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" + #include "musical_notes.h" +#endif #include "eeconfig.h" #include "process_unicode.h" #include "quantum.h" +#ifdef RGBSPS_ENABLE #include "rgbsps.h" +#endif +#ifdef PS2_MOUSE_ENABLE #include "ps2_mouse.h" #include "ps2.h" +#endif +#ifdef FAUXCLICKY_ENABLE +#include "fauxclicky.h" +#endif #include "outputselect.h" #include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) @@ -76,9 +94,6 @@ enum planck_keycodes { NORMAN, // layer switchers - // PUNC, - // NUM, - // FUN, EMOJI, GUI, GREEK, @@ -92,10 +107,15 @@ enum planck_keycodes { LSPACE, RSPACE, GLOW, - FOR0, // stub - AUDIO +#ifndef FAUXCLICKY_ENABLE + FC_TOG, +#endif +#ifndef ADAFRUIT_BLE_ENABLE + OUT_BLE, +#endif + KEYCODE_END }; #define NUM MO(_NUM) @@ -310,6 +330,7 @@ const uint32_t PROGMEM unicode_map[] = { // RGBSPS +#ifdef RGBSPS_ENABLE const uint8_t PROGMEM LED_ALNUM[] = { LED_Z, LED_A, @@ -504,7 +525,7 @@ void led_init(void) { rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); } - +#endif // RGBSPS_ENABLE // keymaps @@ -750,7 +771,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYS] = KEYMAP( XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, + XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), @@ -1001,6 +1022,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; // glow mode changer +#ifdef RGBSPS_ENABLE case GLOW: if (record->event.pressed) { glow_mode++; @@ -1012,16 +1034,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; +#endif - // faux clicky toggle, TBD - case AUDIO: - return false; + // faux clicky indicator +#ifdef FAUXCLICKY_ENABLE + case FC_TOG: + return true; break; +#endif } return true; } void set_output_user(uint8_t output) { +#ifdef ADAFRUIT_BLE_ENABLE switch(output) { case OUTPUT_USB: led_set_output_usb(); @@ -1032,82 +1058,92 @@ void set_output_user(uint8_t output) { default: led_set_output_none(); } +#endif } -void matrix_init_user(void) { +void matrix_init_user() { _delay_ms(500); // give time for usb to initialize set_unicode_input_mode(UC_LNX); + +#ifdef RGBSPS_ENABLE led_init(); +#endif // auto detect output on init +#ifdef ADAFRUIT_BLE_ENABLE uint8_t output = auto_detect_output(); if (output == OUTPUT_USB) { set_output(OUTPUT_USB); } else { set_output(OUTPUT_ADAFRUIT_BLE); } +#endif } -void matrix_scan_user(void) { - led_set_layer_indicator(); +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } } -void battery_poll(uint8_t level) { - rgbsps_sethsv(LED_IND_BATTERY, level * 120/255, 255, 15); - rgbsps_send(); -} +#ifdef RGBSPS_ENABLE + void matrix_scan_user(void) { + led_set_layer_indicator(); + } -void led_set_user(uint8_t usb_led) { - bool new_capslock = usb_led & (1< | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Num - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | x | 0 | , | . | | | - * `-----------------------------------------------------------------------------------' - */ -[_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, LT(_PUNC, KC_0), KC_COMM, KC_DOT, KC_X, _______ -), - -/* Func - * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | | | Home | End | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_FUNC] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, PUNC, _______, _______, _______, _______, _______, _______, _______ -), - -/* Uppercase Greek - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GREEKU] = KEYMAP( - _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, - _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, - _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Lowercase Greek - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GREEKL] = KEYMAP( - _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, - _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, - _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Emoji - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_EMOJI] = KEYMAP( - X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), - X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), - X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), - X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) -), - -/* GUI - * ,-----------------------------------------------------------------------------------. - * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Prev | Play | Next | BTab | Tab | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GUI] = KEYMAP( - XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, - XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, S(KC_TAB),KC_TAB, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -), - -/* Sys - * ,-----------------------------------------------------------------------------------. - * | |Qwerty| Win | |Reset | | | USB | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | |Colmak| | BLE |Norman|MacOS | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_SYS] = KEYMAP( - XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ -), - -}; - -#ifdef AUDIO_ENABLE -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_workman[][2] = SONG(DVORAK_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); -float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); -float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); -float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); -float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); -float tone_tolelot[][2] = SONG(Q__NOTE(_E5), Q__NOTE(_C5), Q__NOTE(_D5)); -#endif - -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -#ifdef DOUBLESPACE_LAYER_ENABLE -void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool *isemitted) { - if (pressed) { - *isactive = true; - if (*otheractive) { - layer_on(_SPACE); - register_code(KC_LALT); // sends alt and enter layer - space_layer_entered = true; - } - } else { - *isactive = false; - if (space_layer_entered) { - unregister_code(KC_LALT); // release alt and exit layer - layer_off(_SPACE); - if (!*otheractive) { - space_layer_entered = false; - } - } else { - if (!*isemitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - *isemitted = false; - } - } -} -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // faux clicky - // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); - #ifdef AUDIO_ENABLE - #ifdef TOLELOT_ENABLE - if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_tolelot, false, 0); - } - #else - if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_click, false, 0); - } else { - PLAY_NOTE_ARRAY(tone_release, false, 0); - } - #endif - #endif - - bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); - -#ifdef DOUBLESPACE_LAYER_ENABLE - // double-space: send space immediately if any other key depressed before space is released - if ((lspace_active ^ rspace_active) - && keycode != LSPACE - && keycode != RSPACE - && record->event.pressed) - { - if (lspace_active) { - if (!lspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - lspace_emitted = true; - } - if (rspace_active) { - if (!rspace_emitted) { - register_code(KC_SPC); - unregister_code(KC_SPC); - } - rspace_emitted = true; - } - } - - if (layer == _SPACE && keycode != S(KC_TAB) && keycode != KC_TAB && keycode != KC_ESC && keycode != XXXXXXX) { - if (record->event.pressed) { - unregister_code(KC_LALT); - } else { - register_code(KC_LALT); - } - } -#endif - - switch (keycode) { - -#ifdef DOUBLESPACE_LAYER_ENABLE - // double-space enter space layer - case LSPACE: - process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted); - return false; - break; - case RSPACE: - process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted); - return false; - break; -#endif - - // handle greek layer shift - // handle both shift = capslock - case KC_LSFT: - case KC_RSFT: - ; - uint8_t layer = biton32(layer_state); - if (layer == _GREEKU || layer == _GREEKL) { - if (record->event.pressed) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - if (lshift ^ rshift) { // if only one shift was pressed - layer_on(_GREEKL); - layer_off(_GREEKU); - } - } - } else { - if (record->event.pressed) { - if (lshift ^ rshift) { // if only one shift was pressed - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } - } - } - return true; - break; - - // press both ctrls to activate SYS layer - case KC_LCTL: - case KC_RCTL: - ; - bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL); - bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL); - if (record->event.pressed) { - if (lctrl ^ rctrl) { // if only one ctrl was pressed - layer_on(_SYS); - } - } else { - layer_off(_SYS); - } - return true; - break; - - // QWERTZ style comma and dot: semicolon and colon when shifted - case KC_COMM: - if (record->event.pressed) { - if (lshift || rshift) { - if (lshift) unregister_code(KC_LSFT); - if (rshift) unregister_code(KC_RSFT); - register_code(KC_SCLN); - unregister_code(KC_SCLN); - if (lshift) register_code(KC_LSFT); - if (rshift) register_code(KC_RSFT); - } else { - register_code(KC_COMM); - unregister_code(KC_COMM); - } - } - return false; - break; - case KC_DOT: - if (record->event.pressed) { - if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) { - register_code(KC_SCLN); - unregister_code(KC_SCLN); - } else { - register_code(KC_DOT); - unregister_code(KC_DOT); - } - } - return false; - break; - - // layout switcher - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; -#ifdef LAYOUT_DVORAK - case DVORAK: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DVORAK); - } - return false; - break; -#endif -#ifdef LAYOUT_COLEMAK - case COLEMAK: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; -#endif -#ifdef LAYOUT_WORKMAN - case WORKMAN: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_WORKMAN); - } - return false; - break; -#endif -#ifdef LAYOUT_NORMAN - case NORMAN: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_NORMAN); - } - return false; - break; -#endif - - // layer switchers - case PUNC: - if (record->event.pressed) { - layer_on(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } else { - layer_off(_PUNC); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - - case GREEK: - if (record->event.pressed) { - if (lshift || rshift) { - layer_on(_GREEKU); - layer_off(_GREEKL); - } else { - layer_on(_GREEKL); - layer_off(_GREEKU); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - } else { - layer_off(_GREEKU); - layer_off(_GREEKL); - update_tri_layer(_PUNC, _GREEKL, _EMOJI); - } - return false; - break; - - case NUM: - if (record->event.pressed) { - layer_on(_NUM); - } else { - layer_off(_NUM); - } - return false; - break; - case FUNC: - if (record->event.pressed) { - layer_on(_FUNC); - } else { - layer_off(_FUNC); - } - return false; - break; - - // OS switchers - case LINUX: - set_unicode_input_mode(UC_LNX); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_linux, false, 0); - #endif - return false; - break; - case WIN: - set_unicode_input_mode(UC_WINC); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_windows, false, 0); - #endif - return false; - break; - case OSX: - set_unicode_input_mode(UC_OSX); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_osx, false, 0); - #endif - return false; - break; - - // faux clicky toggle, TBD - case FC_TOG: - return true; - break; - - } - return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif - set_unicode_input_mode(UC_LNX); -} - -#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(); -} - -#endif - -void matrix_scan_user(void) { -} - -void led_set_user(uint8_t usb_led) { -} - -void turn_off_capslock() { - if (capslock) { - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } -} +#include "../../../handwired/promethium/keymaps/priyadi/keymap.c" \ No newline at end of file -- cgit v1.2.3 From 1eac297a2fa4da7c5799bff80a112cd9bff6cf2a Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 16:39:19 +0700 Subject: Added copyright notice --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 0dc0a03396..cdec187ee5 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1,5 +1,17 @@ -// 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. +/* +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 . +*/ #if defined(PRIYADI_PROMETHIUM) #include "promethium.h" -- cgit v1.2.3 From 3882f97d2e779899c202111e46cf2cf2926b9212 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 19:22:58 +0700 Subject: Move keyboard specific stuff to keyboard specific files, and vice versa --- keyboards/handwired/promethium/config.h | 104 ++++++++++++++++++++ .../handwired/promethium/keymaps/priyadi/config.h | 2 - .../handwired/promethium/keymaps/priyadi/keymap.c | 69 +++++++++++--- keyboards/handwired/promethium/promethium.c | 4 + keyboards/handwired/promethium/promethium.h | 105 +-------------------- 5 files changed, 168 insertions(+), 116 deletions(-) diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index fd45c2bfe3..24f02993fb 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -152,6 +152,110 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +#define PS2_INIT_DELAY 2000 +#define BATTERY_PIN 9 +#define BATTERY_POLL 30000 +#define MAX_VOLTAGE 4.2 +#define MIN_VOLTAGE 3.2 + +#define KEYMAP( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {k11, k12, k13, k14, k15, k16}, \ + {k21, k22, k23, k24, k25, k26}, \ + {k31, k32, k33, k34, k35, k36}, \ + {k41, k42, k43, k44, k45, k46}, \ + {k17, k18, k19, k1a, k1b, k1c}, \ + {k27, k28, k29, k2a, k2b, k2c}, \ + {k37, k38, k39, k3a, k3b, k3c}, \ + {k47, k48, k49, k4a, k4b, k4c} \ +} + +#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file +enum led_sequence { + LED_IND_BLUETOOTH, + LED_IND_USB, + LED_IND_BATTERY, + + LED_IND_FUN, + LED_IND_NUM, + LED_IND_EMOJI, + + LED_BKSP, + LED_ENT, + LED_RSFT, + LED_RCTL, + + LED_RGUI, + LED_SLSH, + LED_SCLN, + LED_P, + + LED_O, + LED_L, + LED_DOT, + LED_RALT, + + LED_EMOJI, + LED_COMM, + LED_K, + LED_I, + + LED_U, + LED_J, + LED_M, + LED_FUN, + + LED_RSPC, + LED_N, + LED_HH, + LED_Y, + + LED_TRACKPOINT3, + LED_TRACKPOINT2, + LED_TRACKPOINT1, + + LED_LSPC, + LED_B, + LED_G, + LED_T, + + LED_R, + LED_F, + LED_V, + LED_NUM, + + LED_PUNC, + LED_C, + LED_D, + LED_E, + + LED_W, + LED_S, + LED_X, + LED_LALT, + + LED_LGUI, + LED_Z, + LED_A, + LED_Q, + + LED_TAB, + LED_ESC, + LED_LSFT, + LED_LCTL, + + LED_TOTAL +}; + +#define RGB_DI_PIN B5 +#define RGBSPS_NUM LED_TOTAL +#endif + /* PS/2 mouse */ #ifdef PS2_USE_BUSYWAIT # define PS2_CLOCK_PORT PORTD diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 00f9fed313..3f5dd5817d 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,8 +14,6 @@ #define PREVENT_STUCK_MODIFIERS #define RGBSPS_ENABLE -#define RGB_DI_PIN B5 -#define RGBSPS_NUM 57 #define UNICODE_TYPE_DELAY 0 diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index cdec187ee5..2c43f98847 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -74,6 +74,7 @@ uint8_t glow_mode = GLOW_MIN; void turn_off_capslock(void); extern keymap_config_t keymap_config; +// layers, ordering is important! enum layers { _QWERTY, _DVORAK, @@ -89,9 +90,10 @@ enum layers { _FUN, _PUNC, + _EMPTY, _EMOJI, _GUI, - _SYS, + _SYS }; // double-space layer @@ -130,6 +132,7 @@ enum planck_keycodes { KEYCODE_END }; +#define EMPTY MO(_EMPTY) #define NUM MO(_NUM) #define FUN MO(_FUN) #define FUN0 LT(_FUN, KC_0) @@ -237,6 +240,11 @@ enum unicode_name { LOMEG, FSIGM, + + LTEQ, + GTEQ, + NOTEQ, + PLMIN, }; const uint32_t PROGMEM unicode_map[] = { @@ -338,6 +346,12 @@ const uint32_t PROGMEM unicode_map[] = { [LPSI] = 0x03C8, [LOMEG] = 0x03C9, [FSIGM] = 0x03C2, + + // other + [LTEQ] = 0x2264, // less than or equal + [GTEQ] = 0x2265, // greater than or equal + [NOTEQ] = 0x2260, // not equal + [PLMIN] = 0xB1, // plus minus }; // RGBSPS @@ -551,14 +565,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl | + * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( 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_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL ), /* Dvorak @@ -646,31 +660,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Punc * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ≤ | ≥ | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | / | | ( | ) | < | > | | + * | | * | \ | - | = | / | ≠ | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : | + * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | : | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, + KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Num * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` | + * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | | + * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | x | 0 | , | . | | | + * | | | | | | | | 0 | , | . | x | | * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( @@ -734,6 +748,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* Empty + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_EMPTY] = KEYMAP( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + /* Emoji * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -749,7 +781,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), - X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK) + X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK) ), /* GUI @@ -788,6 +820,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ), + }; void persistant_default_layer_set(uint16_t default_layer) { @@ -831,6 +864,16 @@ uint32_t layer_state_set_kb(uint32_t state) } else { state &= ~(1UL<<_PUNC); } + + // turn on emoji layer if empty and greek layer are on + if ( + (state & ((1UL<<_EMPTY) | (1UL<<_GREEKU))) == ((1UL<<_EMPTY) | (1UL<<_GREEKU)) + || (state & ((1UL<<_EMPTY) | (1UL<<_GREEKL))) == ((1UL<<_EMPTY) | (1UL<<_GREEKL)) + ) { + state |= (1UL<<_EMOJI); + } else { + state &= ~(1UL<<_EMOJI); + } return state; } diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index 62e2281fac..4943f8c9fc 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -36,3 +36,7 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { +} + diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index caad5258e4..260f140c55 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -1,107 +1,10 @@ #ifndef PROMETHIUM_H #define PROMETHIUM_H -#include "quantum.h" +#include "stdint.h" -#define PS2_INIT_DELAY 2000 -#define BATTERY_PIN 9 -#define BATTERY_POLL 30000 -#define MAX_VOLTAGE 4.2 -#define MIN_VOLTAGE 3.2 - -#define KEYMAP( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ -) \ -{ \ - {k11, k12, k13, k14, k15, k16}, \ - {k21, k22, k23, k24, k25, k26}, \ - {k31, k32, k33, k34, k35, k36}, \ - {k41, k42, k43, k44, k45, k46}, \ - {k17, k18, k19, k1a, k1b, k1c}, \ - {k27, k28, k29, k2a, k2b, k2c}, \ - {k37, k38, k39, k3a, k3b, k3c}, \ - {k47, k48, k49, k4a, k4b, k4c} \ -} - - - -enum led_sequence { - LED_IND_BLUETOOTH, - LED_IND_USB, - LED_IND_BATTERY, - - LED_IND_FUN, - LED_IND_NUM, - LED_IND_EMOJI, - - LED_BKSP, - LED_ENT, - LED_RSFT, - LED_RCTL, - - LED_RGUI, - LED_SLSH, - LED_SCLN, - LED_P, - - LED_O, - LED_L, - LED_DOT, - LED_RALT, - - LED_EMOJI, - LED_COMM, - LED_K, - LED_I, - - LED_U, - LED_J, - LED_M, - LED_FUN, - - LED_RSPC, - LED_N, - LED_HH, - LED_Y, - - LED_TRACKPOINT3, - LED_TRACKPOINT2, - LED_TRACKPOINT1, - - LED_LSPC, - LED_B, - LED_G, - LED_T, - - LED_R, - LED_F, - LED_V, - LED_NUM, - - LED_PUNC, - LED_C, - LED_D, - LED_E, - - LED_W, - LED_S, - LED_X, - LED_LALT, - - LED_LGUI, - LED_Z, - LED_A, - LED_Q, - - LED_TAB, - LED_ESC, - LED_LSFT, - LED_LCTL, -}; +void battery_poll(uint8_t level); +void led_set_kb(uint8_t usb_led); +void led_set_user(uint8_t usb_led); #endif - -void battery_poll(uint8_t level); \ No newline at end of file -- cgit v1.2.3 From ac04fe03015c875f2d796f573ed42aeb9eebb267 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 15 Feb 2017 19:40:33 +0700 Subject: Added README for my keymap --- .../handwired/promethium/keymaps/priyadi/README.md | 44 ++++++++++++++++++++++ .../handwired/promethium/keymaps/priyadi/readme.md | 0 2 files changed, 44 insertions(+) create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/README.md delete mode 100644 keyboards/handwired/promethium/keymaps/priyadi/readme.md diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md new file mode 100644 index 0000000000..37c2be6f99 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md @@ -0,0 +1,44 @@ +Priyadi Keymap for Planck-like Keyboards +======================================== + +Main layer modifications from default Planck layout: + +* Enter moved to quotes position +* Quotes moved to semicolon position. +* QWERTZ style colon & semicolon. shift-. = : shift-, = ; This is done in hardware, no layout switching needed in software. +* < & > occupied precious real estate, and so they are moved down to punctuation layer. +* Right-shift on Enter position. +* Removed arrow keys, they are on another layer now. +* Put Ctrl-Alt-Super and Super-AltGr-Ctrl in left & right corners. +* Lower & Raise is now called Num and Fun. +* OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet) + +On Promethium, Trackpoint is enabled on PD2 and PD2. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). + +AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr. + +Supported layouts: QWERTY, DVORAK, Colemak, Workman, Norman. Switchable from SYS layer. In DVORAK, semicolon is replaced by /? key. + +Num activates NUM layer: hexkeypad on the right side and most punctuation on the left side. Hexkeypad is optimized for C-style hex, IPv6, HTML RGB triplets, etc. + +Fun activates FUN layer: arrow cluster on right home row, F-numbers on left side. + +Pressing Num+Fun activates PUNC layer: same punctuations as NUM layer on the left side, parens on the right side. + +Greek activates either GREEKU or GREEKL layer, depending whether shift is pressed or not. Shift state changes are also taken into account when the layer is active. + +Greek+Empty activates EMOJI layer. The whole keyboard now outputs emojis! + +Pressing both spacebars (spacekeys, actually) activates GUI layer. QWERTYUIOP switches to a virtual desktop. J & L switches virtual desktop to the left or right. S & F behaves like Alt-Tab and Alt-Shift-Tab. This works by sending Alt press when entering the layer, and Alt release when other than S or F keys are pressed. + +Pressing both Ctrls activates SYS layer for configuring the keyboard. + +On Promethium, USB or Bluetooth output is detected on startup. If USB is connected, then USB is used initially. SYS-U and SYS-B switch output to USB or Bluetooth at runtime. Current active output is indicated with LEDs. + +SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively. + +On Planck, SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. + +On Promethium there are 6 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 57 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. + +On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file diff --git a/keyboards/handwired/promethium/keymaps/priyadi/readme.md b/keyboards/handwired/promethium/keymaps/priyadi/readme.md deleted file mode 100644 index e69de29bb2..0000000000 -- cgit v1.2.3 From 69ea10f9a9407415d8cbb5575a08bd73d5ddd7f9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 11:25:33 -0500 Subject: adds layer tap toggle --- quantum/keymap_common.c | 3 +++ quantum/quantum_keycodes.h | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 54b872d49e..002eabd85e 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -119,6 +119,9 @@ action_t action_for_key(uint8_t layer, keypos_t key) mod = keycode & 0xFF; action.code = ACTION_MODS_ONESHOT(mod); break; + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); + break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF); break; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index cc7a5013f6..f36c8044e9 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -41,16 +41,18 @@ enum quantum_keycodes { #endif QK_TAP_DANCE = 0x5700, QK_TAP_DANCE_MAX = 0x57FF, -#ifdef UNICODEMAP_ENABLE - QK_UNICODE_MAP = 0x5800, - QK_UNICODE_MAP_MAX = 0x5BFF, -#endif + QK_LAYER_TAP_TOGGLE = 0x5800, + QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, #ifdef UNICODE_ENABLE QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, #endif +#ifdef UNICODEMAP_ENABLE + QK_UNICODE_MAP = 0x8000, + QK_UNICODE_MAP_MAX = 0x83FF, +#endif // Loose keycodes - to be used directly @@ -304,6 +306,9 @@ enum quantum_keycodes { // One-shot mod #define OSM(mod) (mod | QK_ONE_SHOT_MOD) +// Layer tap-toggle +#define TT(layer) (layer | QK_LAYER_TAP_TOGGLE) + // M-od, T-ap - 256 keycode max #define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0x1F) << 8)) -- cgit v1.2.3 From 6788cbd76291e1f3103a350598f7bf5d523a7310 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 12:39:58 -0500 Subject: give error if both unicode/map are enabled --- quantum/quantum_keycodes.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index f36c8044e9..63b626926d 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -45,6 +45,9 @@ enum quantum_keycodes { QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, +#if defined(UNICODEMAP_ENABLE) && defined(UNICODE_ENABLE) + #error "Cannot enable both UNICODEMAP && UNICODE" +#endif #ifdef UNICODE_ENABLE QK_UNICODE = 0x8000, QK_UNICODE_MAX = 0xFFFF, -- cgit v1.2.3 From cbabb4d417ef58f5d484dc256b637f61619efaa8 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 16:36:31 -0500 Subject: split up unicode systems into different files --- build_keyboard.mk | 4 +- quantum/process_keycode/process_ucis.c | 133 ++++++++++++++++++ quantum/process_keycode/process_ucis.h | 34 +++++ quantum/process_keycode/process_unicode.c | 200 --------------------------- quantum/process_keycode/process_unicode.h | 36 ----- quantum/process_keycode/process_unicodemap.c | 54 ++++++++ quantum/process_keycode/process_unicodemap.h | 8 ++ quantum/quantum.c | 13 ++ quantum/quantum.h | 10 +- 9 files changed, 253 insertions(+), 239 deletions(-) create mode 100644 quantum/process_keycode/process_ucis.c create mode 100644 quantum/process_keycode/process_ucis.h create mode 100644 quantum/process_keycode/process_unicodemap.c create mode 100644 quantum/process_keycode/process_unicodemap.h diff --git a/build_keyboard.mk b/build_keyboard.mk index c8e82cf0e5..9d2eaec1ff 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -168,12 +168,12 @@ endif ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE - UNICODE_ENABLE = yes + SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) OPT_DEFS += -DUNICODEMAP_ENABLE - UNICODE_ENABLE = yes + SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c endif ifeq ($(strip $(UNICODE_ENABLE)), yes) diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c new file mode 100644 index 0000000000..4ad2533b08 --- /dev/null +++ b/quantum/process_keycode/process_ucis.c @@ -0,0 +1,133 @@ +#include "process_ucis.h" + +qk_ucis_state_t qk_ucis_state; + +void qk_ucis_start(void) { + qk_ucis_state.count = 0; + qk_ucis_state.in_progress = true; + + qk_ucis_start_user(); +} + +__attribute__((weak)) +void qk_ucis_start_user(void) { + unicode_input_start(); + register_hex(0x2328); + unicode_input_finish(); +} + +static bool is_uni_seq(char *seq) { + uint8_t i; + + for (i = 0; seq[i]; i++) { + uint16_t code; + if (('1' <= seq[i]) && (seq[i] <= '0')) + code = seq[i] - '1' + KC_1; + else + code = seq[i] - 'a' + KC_A; + + if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != code) + return false; + } + + return (qk_ucis_state.codes[i] == KC_ENT || + qk_ucis_state.codes[i] == KC_SPC); +} + +__attribute__((weak)) +void qk_ucis_symbol_fallback (void) { + for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { + uint8_t code = qk_ucis_state.codes[i]; + register_code(code); + unregister_code(code); + wait_ms(UNICODE_TYPE_DELAY); + } +} + +void register_ucis(const char *hex) { + for(int i = 0; hex[i]; i++) { + uint8_t kc = 0; + char c = hex[i]; + + switch (c) { + case '0': + kc = KC_0; + break; + case '1' ... '9': + kc = c - '1' + KC_1; + break; + case 'a' ... 'f': + kc = c - 'a' + KC_A; + break; + case 'A' ... 'F': + kc = c - 'A' + KC_A; + break; + } + + if (kc) { + register_code (kc); + unregister_code (kc); + wait_ms (UNICODE_TYPE_DELAY); + } + } +} + +bool process_ucis (uint16_t keycode, keyrecord_t *record) { + uint8_t i; + + if (!qk_ucis_state.in_progress) + return true; + + if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && + !(keycode == KC_BSPC || keycode == KC_ESC || keycode == KC_SPC || keycode == KC_ENT)) { + return false; + } + + if (!record->event.pressed) + return true; + + qk_ucis_state.codes[qk_ucis_state.count] = keycode; + qk_ucis_state.count++; + + if (keycode == KC_BSPC) { + if (qk_ucis_state.count >= 2) { + qk_ucis_state.count -= 2; + return true; + } else { + qk_ucis_state.count--; + return false; + } + } + + if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) { + bool symbol_found = false; + + for (i = qk_ucis_state.count; i > 0; i--) { + register_code (KC_BSPC); + unregister_code (KC_BSPC); + wait_ms(UNICODE_TYPE_DELAY); + } + + if (keycode == KC_ESC) { + qk_ucis_state.in_progress = false; + return false; + } + + unicode_input_start(); + for (i = 0; ucis_symbol_table[i].symbol; i++) { + if (is_uni_seq (ucis_symbol_table[i].symbol)) { + symbol_found = true; + register_ucis(ucis_symbol_table[i].code + 2); + break; + } + } + if (!symbol_found) { + qk_ucis_symbol_fallback(); + } + unicode_input_finish(); + + qk_ucis_state.in_progress = false; + return false; + } + return true; +} \ No newline at end of file diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h new file mode 100644 index 0000000000..520db8042b --- /dev/null +++ b/quantum/process_keycode/process_ucis.h @@ -0,0 +1,34 @@ +#ifndef PROCESS_UCIS_H +#define PROCESS_UCIS_H + +#include "quantum.h" + +#ifndef UCIS_MAX_SYMBOL_LENGTH +#define UCIS_MAX_SYMBOL_LENGTH 32 +#endif + +typedef struct { + char *symbol; + char *code; +} qk_ucis_symbol_t; + +typedef struct { + uint8_t count; + uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; + bool in_progress:1; +} qk_ucis_state_t; + +extern qk_ucis_state_t qk_ucis_state; + +#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} +#define UCIS_SYM(name, code) {name, #code} + +extern const qk_ucis_symbol_t ucis_symbol_table[]; + +void qk_ucis_start(void); +void qk_ucis_start_user(void); +void qk_ucis_symbol_fallback (void); +void register_ucis(const char *hex); +bool process_ucis (uint16_t keycode, keyrecord_t *record); + +#endif diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 9d01a592d2..898e168a30 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -4,18 +4,6 @@ static uint8_t input_mode; uint8_t mods; -__attribute__((weak)) -uint16_t hex_to_keycode(uint8_t hex) -{ - if (hex == 0x0) { - return KC_0; - } else if (hex < 0xA) { - return KC_1 + (hex - 0x1); - } else { - return KC_A + (hex - 0xA); - } -} - void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; @@ -108,191 +96,3 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef UNICODEMAP_ENABLE -__attribute__((weak)) -const uint32_t PROGMEM unicode_map[] = { -}; - -void register_hex32(uint32_t hex) { - uint8_t onzerostart = 1; - for(int i = 7; i >= 0; i--) { - if (i <= 3) { - onzerostart = 0; - } - uint8_t digit = ((hex >> (i*4)) & 0xF); - if (digit == 0) { - if (onzerostart == 0) { - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } - } else { - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - onzerostart = 0; - } - } -} - -__attribute__((weak)) -void unicode_map_input_error() {} - -bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { - if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { - const uint32_t* map = unicode_map; - uint16_t index = keycode - QK_UNICODE_MAP; - uint32_t code = pgm_read_dword_far(&map[index]); - 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 { - unicode_input_start(); - register_hex32(code); - unicode_input_finish(); - } - } - return true; -} -#endif - -#ifdef UCIS_ENABLE -qk_ucis_state_t qk_ucis_state; - -void qk_ucis_start(void) { - qk_ucis_state.count = 0; - qk_ucis_state.in_progress = true; - - qk_ucis_start_user(); -} - -__attribute__((weak)) -void qk_ucis_start_user(void) { - unicode_input_start(); - register_hex(0x2328); - unicode_input_finish(); -} - -static bool is_uni_seq(char *seq) { - uint8_t i; - - for (i = 0; seq[i]; i++) { - uint16_t code; - if (('1' <= seq[i]) && (seq[i] <= '0')) - code = seq[i] - '1' + KC_1; - else - code = seq[i] - 'a' + KC_A; - - if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != code) - return false; - } - - return (qk_ucis_state.codes[i] == KC_ENT || - qk_ucis_state.codes[i] == KC_SPC); -} - -__attribute__((weak)) -void qk_ucis_symbol_fallback (void) { - for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { - uint8_t code = qk_ucis_state.codes[i]; - register_code(code); - unregister_code(code); - wait_ms(UNICODE_TYPE_DELAY); - } -} - -void register_ucis(const char *hex) { - for(int i = 0; hex[i]; i++) { - uint8_t kc = 0; - char c = hex[i]; - - switch (c) { - case '0': - kc = KC_0; - break; - case '1' ... '9': - kc = c - '1' + KC_1; - break; - case 'a' ... 'f': - kc = c - 'a' + KC_A; - break; - case 'A' ... 'F': - kc = c - 'A' + KC_A; - break; - } - - if (kc) { - register_code (kc); - unregister_code (kc); - wait_ms (UNICODE_TYPE_DELAY); - } - } -} - -bool process_ucis (uint16_t keycode, keyrecord_t *record) { - uint8_t i; - - if (!qk_ucis_state.in_progress) - return true; - - if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && - !(keycode == KC_BSPC || keycode == KC_ESC || keycode == KC_SPC || keycode == KC_ENT)) { - return false; - } - - if (!record->event.pressed) - return true; - - qk_ucis_state.codes[qk_ucis_state.count] = keycode; - qk_ucis_state.count++; - - if (keycode == KC_BSPC) { - if (qk_ucis_state.count >= 2) { - qk_ucis_state.count -= 2; - return true; - } else { - qk_ucis_state.count--; - return false; - } - } - - if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) { - bool symbol_found = false; - - for (i = qk_ucis_state.count; i > 0; i--) { - register_code (KC_BSPC); - unregister_code (KC_BSPC); - wait_ms(UNICODE_TYPE_DELAY); - } - - if (keycode == KC_ESC) { - qk_ucis_state.in_progress = false; - return false; - } - - unicode_input_start(); - for (i = 0; ucis_symbol_table[i].symbol; i++) { - if (is_uni_seq (ucis_symbol_table[i].symbol)) { - symbol_found = true; - register_ucis(ucis_symbol_table[i].code + 2); - break; - } - } - if (!symbol_found) { - qk_ucis_symbol_fallback(); - } - unicode_input_finish(); - - qk_ucis_state.in_progress = false; - return false; - } - return true; -} -#endif diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index f17cfa6cf2..7ed9e54d50 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -21,42 +21,6 @@ void register_hex(uint16_t hex); bool process_unicode(uint16_t keycode, keyrecord_t *record); -#ifdef UNICODEMAP_ENABLE -void unicode_map_input_error(void); -bool process_unicode_map(uint16_t keycode, keyrecord_t *record); -#endif - -#ifdef UCIS_ENABLE -#ifndef UCIS_MAX_SYMBOL_LENGTH -#define UCIS_MAX_SYMBOL_LENGTH 32 -#endif - -typedef struct { - char *symbol; - char *code; -} qk_ucis_symbol_t; - -typedef struct { - uint8_t count; - uint16_t codes[UCIS_MAX_SYMBOL_LENGTH]; - bool in_progress:1; -} qk_ucis_state_t; - -extern qk_ucis_state_t qk_ucis_state; - -#define UCIS_TABLE(...) {__VA_ARGS__, {NULL, NULL}} -#define UCIS_SYM(name, code) {name, #code} - -extern const qk_ucis_symbol_t ucis_symbol_table[]; - -void qk_ucis_start(void); -void qk_ucis_start_user(void); -void qk_ucis_symbol_fallback (void); -void register_ucis(const char *hex); -bool process_ucis (uint16_t keycode, keyrecord_t *record); - -#endif - #define UC_BSPC UC(0x0008) #define UC_SPC UC(0x0020) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c new file mode 100644 index 0000000000..b8cdeaa979 --- /dev/null +++ b/quantum/process_keycode/process_unicodemap.c @@ -0,0 +1,54 @@ +#include "process_unicode_map.h" + +__attribute__((weak)) +const uint32_t PROGMEM unicode_map[] = { +}; + +void register_hex32(uint32_t hex) { + uint8_t onzerostart = 1; + for(int i = 7; i >= 0; i--) { + if (i <= 3) { + onzerostart = 0; + } + uint8_t digit = ((hex >> (i*4)) & 0xF); + if (digit == 0) { + if (onzerostart == 0) { + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + } + } else { + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + onzerostart = 0; + } + } +} + +__attribute__((weak)) +void unicode_map_input_error() {} + +bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { + if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { + const uint32_t* map = unicode_map; + uint16_t index = keycode - QK_UNICODE_MAP; + uint32_t code = pgm_read_dword_far(&map[index]); + 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 { + unicode_input_start(); + register_hex32(code); + unicode_input_finish(); + } + } + return true; +} \ No newline at end of file diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h new file mode 100644 index 0000000000..291bd8de03 --- /dev/null +++ b/quantum/process_keycode/process_unicodemap.h @@ -0,0 +1,8 @@ +#ifndef PROCESS_UNICODEMAP_H +#define PROCESS_UNICODEMAP_H + +#include "quantum.h" + +void unicode_map_input_error(void); +bool process_unicode_map(uint16_t keycode, keyrecord_t *record); +#endif \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index 2088c10c95..4a6d0355fa 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -972,6 +972,19 @@ void send_nibble(uint8_t number) { } } + +__attribute__((weak)) +uint16_t hex_to_keycode(uint8_t hex) +{ + if (hex == 0x0) { + return KC_0; + } else if (hex < 0xA) { + return KC_1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + void api_send_unicode(uint32_t unicode) { #ifdef API_ENABLE uint8_t chunk[4]; diff --git a/quantum/quantum.h b/quantum/quantum.h index 18f072189d..580d51202a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -56,6 +56,14 @@ extern uint32_t default_layer_state; #include "process_unicode.h" #endif +#ifdef UCIS_ENABLE + #include "process_ucis.h" +#endif + +#ifdef UNICODEMAP_ENABLE + #include "process_unicodemap.h" +#endif + #include "process_tap_dance.h" #ifdef PRINTING_ENABLE @@ -117,7 +125,7 @@ void send_dword(uint32_t number); void send_word(uint16_t number); void send_byte(uint8_t number); void send_nibble(uint8_t number); - +uint16_t hex_to_keycode(uint8_t hex); void led_set_user(uint8_t usb_led); void led_set_kb(uint8_t usb_led); -- cgit v1.2.3 From 09add35e7f0b17f720862bc9b0f8478763937328 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 17:09:35 -0500 Subject: add unicode common file, get names right --- build_keyboard.mk | 3 + quantum/process_keycode/process_ucis.h | 1 + quantum/process_keycode/process_unicode.c | 85 --------------- quantum/process_keycode/process_unicode.h | 124 +-------------------- quantum/process_keycode/process_unicode_common.h | 130 +++++++++++++++++++++++ quantum/process_keycode/process_unicodemap.c | 2 +- quantum/process_keycode/process_unicodemap.h | 1 + 7 files changed, 137 insertions(+), 209 deletions(-) create mode 100644 quantum/process_keycode/process_unicode_common.h diff --git a/build_keyboard.mk b/build_keyboard.mk index 9d2eaec1ff..4a6fc0980f 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -168,16 +168,19 @@ endif ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) OPT_DEFS += -DUNICODEMAP_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c endif ifeq ($(strip $(UNICODE_ENABLE)), yes) OPT_DEFS += -DUNICODE_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c endif diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h index 520db8042b..4332f57b35 100644 --- a/quantum/process_keycode/process_ucis.h +++ b/quantum/process_keycode/process_ucis.h @@ -2,6 +2,7 @@ #define PROCESS_UCIS_H #include "quantum.h" +#include "process_unicode_common.h" #ifndef UCIS_MAX_SYMBOL_LENGTH #define UCIS_MAX_SYMBOL_LENGTH 32 diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 898e168a30..ccae6fdcad 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -1,91 +1,6 @@ #include "process_unicode.h" #include "action_util.h" -static uint8_t input_mode; -uint8_t mods; - -void set_unicode_input_mode(uint8_t os_target) -{ - input_mode = os_target; -} - -uint8_t get_unicode_input_mode(void) { - return input_mode; -} - -__attribute__((weak)) -void unicode_input_start (void) { - // save current mods - mods = keyboard_report->mods; - - // unregister all mods to start from clean state - if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); - - switch(input_mode) { - case UC_OSX: - register_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - case UC_WINC: - register_code(KC_RALT); - unregister_code(KC_RALT); - register_code(KC_U); - unregister_code(KC_U); - } - wait_ms(UNICODE_TYPE_DELAY); -} - -__attribute__((weak)) -void unicode_input_finish (void) { - switch(input_mode) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; - } - - // reregister previously set mods - if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); -} - -void register_hex(uint16_t hex) { - for(int i = 3; i >= 0; i--) { - uint8_t digit = ((hex >> (i*4)) & 0xF); - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - } -} - bool process_unicode(uint16_t keycode, keyrecord_t *record) { if (keycode > QK_UNICODE && record->event.pressed) { uint16_t unicode = keycode & 0x7FFF; diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 7ed9e54d50..4c21f11eb9 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -2,130 +2,8 @@ #define PROCESS_UNICODE_H #include "quantum.h" - -#define UC_OSX 0 // Mac OS X -#define UC_LNX 1 // Linux -#define UC_WIN 2 // Windows 'HexNumpad' -#define UC_BSD 3 // BSD (not implemented) -#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose - -#ifndef UNICODE_TYPE_DELAY -#define UNICODE_TYPE_DELAY 10 -#endif - -void set_unicode_input_mode(uint8_t os_target); -uint8_t get_unicode_input_mode(void); -void unicode_input_start(void); -void unicode_input_finish(void); -void register_hex(uint16_t hex); +#include "process_unicode_common.h" bool process_unicode(uint16_t keycode, keyrecord_t *record); -#define UC_BSPC UC(0x0008) - -#define UC_SPC UC(0x0020) - -#define UC_EXLM UC(0x0021) -#define UC_DQUT UC(0x0022) -#define UC_HASH UC(0x0023) -#define UC_DLR UC(0x0024) -#define UC_PERC UC(0x0025) -#define UC_AMPR UC(0x0026) -#define UC_QUOT UC(0x0027) -#define UC_LPRN UC(0x0028) -#define UC_RPRN UC(0x0029) -#define UC_ASTR UC(0x002A) -#define UC_PLUS UC(0x002B) -#define UC_COMM UC(0x002C) -#define UC_DASH UC(0x002D) -#define UC_DOT UC(0x002E) -#define UC_SLSH UC(0x002F) - -#define UC_0 UC(0x0030) -#define UC_1 UC(0x0031) -#define UC_2 UC(0x0032) -#define UC_3 UC(0x0033) -#define UC_4 UC(0x0034) -#define UC_5 UC(0x0035) -#define UC_6 UC(0x0036) -#define UC_7 UC(0x0037) -#define UC_8 UC(0x0038) -#define UC_9 UC(0x0039) - -#define UC_COLN UC(0x003A) -#define UC_SCLN UC(0x003B) -#define UC_LT UC(0x003C) -#define UC_EQL UC(0x003D) -#define UC_GT UC(0x003E) -#define UC_QUES UC(0x003F) -#define UC_AT UC(0x0040) - -#define UC_A UC(0x0041) -#define UC_B UC(0x0042) -#define UC_C UC(0x0043) -#define UC_D UC(0x0044) -#define UC_E UC(0x0045) -#define UC_F UC(0x0046) -#define UC_G UC(0x0047) -#define UC_H UC(0x0048) -#define UC_I UC(0x0049) -#define UC_J UC(0x004A) -#define UC_K UC(0x004B) -#define UC_L UC(0x004C) -#define UC_M UC(0x004D) -#define UC_N UC(0x004E) -#define UC_O UC(0x004F) -#define UC_P UC(0x0050) -#define UC_Q UC(0x0051) -#define UC_R UC(0x0052) -#define UC_S UC(0x0053) -#define UC_T UC(0x0054) -#define UC_U UC(0x0055) -#define UC_V UC(0x0056) -#define UC_W UC(0x0057) -#define UC_X UC(0x0058) -#define UC_Y UC(0x0059) -#define UC_Z UC(0x005A) - -#define UC_LBRC UC(0x005B) -#define UC_BSLS UC(0x005C) -#define UC_RBRC UC(0x005D) -#define UC_CIRM UC(0x005E) -#define UC_UNDR UC(0x005F) - -#define UC_GRV UC(0x0060) - -#define UC_a UC(0x0061) -#define UC_b UC(0x0062) -#define UC_c UC(0x0063) -#define UC_d UC(0x0064) -#define UC_e UC(0x0065) -#define UC_f UC(0x0066) -#define UC_g UC(0x0067) -#define UC_h UC(0x0068) -#define UC_i UC(0x0069) -#define UC_j UC(0x006A) -#define UC_k UC(0x006B) -#define UC_l UC(0x006C) -#define UC_m UC(0x006D) -#define UC_n UC(0x006E) -#define UC_o UC(0x006F) -#define UC_p UC(0x0070) -#define UC_q UC(0x0071) -#define UC_r UC(0x0072) -#define UC_s UC(0x0073) -#define UC_t UC(0x0074) -#define UC_u UC(0x0075) -#define UC_v UC(0x0076) -#define UC_w UC(0x0077) -#define UC_x UC(0x0078) -#define UC_y UC(0x0079) -#define UC_z UC(0x007A) - -#define UC_LCBR UC(0x007B) -#define UC_PIPE UC(0x007C) -#define UC_RCBR UC(0x007D) -#define UC_TILD UC(0x007E) -#define UC_DEL UC(0x007F) - #endif diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h new file mode 100644 index 0000000000..171ecbca1d --- /dev/null +++ b/quantum/process_keycode/process_unicode_common.h @@ -0,0 +1,130 @@ +#ifndef PROCESS_UNICODE_COMMON_H +#define PROCESS_UNICODE_COMMON_H + +#include "quantum.h" + +#ifndef UNICODE_TYPE_DELAY +#define UNICODE_TYPE_DELAY 10 +#endif + +void set_unicode_input_mode(uint8_t os_target); +uint8_t get_unicode_input_mode(void); +void unicode_input_start(void); +void unicode_input_finish(void); +void register_hex(uint16_t hex); + + +#define UC_OSX 0 // Mac OS X +#define UC_LNX 1 // Linux +#define UC_WIN 2 // Windows 'HexNumpad' +#define UC_BSD 3 // BSD (not implemented) +#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose + +#define UC_BSPC UC(0x0008) + +#define UC_SPC UC(0x0020) + +#define UC_EXLM UC(0x0021) +#define UC_DQUT UC(0x0022) +#define UC_HASH UC(0x0023) +#define UC_DLR UC(0x0024) +#define UC_PERC UC(0x0025) +#define UC_AMPR UC(0x0026) +#define UC_QUOT UC(0x0027) +#define UC_LPRN UC(0x0028) +#define UC_RPRN UC(0x0029) +#define UC_ASTR UC(0x002A) +#define UC_PLUS UC(0x002B) +#define UC_COMM UC(0x002C) +#define UC_DASH UC(0x002D) +#define UC_DOT UC(0x002E) +#define UC_SLSH UC(0x002F) + +#define UC_0 UC(0x0030) +#define UC_1 UC(0x0031) +#define UC_2 UC(0x0032) +#define UC_3 UC(0x0033) +#define UC_4 UC(0x0034) +#define UC_5 UC(0x0035) +#define UC_6 UC(0x0036) +#define UC_7 UC(0x0037) +#define UC_8 UC(0x0038) +#define UC_9 UC(0x0039) + +#define UC_COLN UC(0x003A) +#define UC_SCLN UC(0x003B) +#define UC_LT UC(0x003C) +#define UC_EQL UC(0x003D) +#define UC_GT UC(0x003E) +#define UC_QUES UC(0x003F) +#define UC_AT UC(0x0040) + +#define UC_A UC(0x0041) +#define UC_B UC(0x0042) +#define UC_C UC(0x0043) +#define UC_D UC(0x0044) +#define UC_E UC(0x0045) +#define UC_F UC(0x0046) +#define UC_G UC(0x0047) +#define UC_H UC(0x0048) +#define UC_I UC(0x0049) +#define UC_J UC(0x004A) +#define UC_K UC(0x004B) +#define UC_L UC(0x004C) +#define UC_M UC(0x004D) +#define UC_N UC(0x004E) +#define UC_O UC(0x004F) +#define UC_P UC(0x0050) +#define UC_Q UC(0x0051) +#define UC_R UC(0x0052) +#define UC_S UC(0x0053) +#define UC_T UC(0x0054) +#define UC_U UC(0x0055) +#define UC_V UC(0x0056) +#define UC_W UC(0x0057) +#define UC_X UC(0x0058) +#define UC_Y UC(0x0059) +#define UC_Z UC(0x005A) + +#define UC_LBRC UC(0x005B) +#define UC_BSLS UC(0x005C) +#define UC_RBRC UC(0x005D) +#define UC_CIRM UC(0x005E) +#define UC_UNDR UC(0x005F) + +#define UC_GRV UC(0x0060) + +#define UC_a UC(0x0061) +#define UC_b UC(0x0062) +#define UC_c UC(0x0063) +#define UC_d UC(0x0064) +#define UC_e UC(0x0065) +#define UC_f UC(0x0066) +#define UC_g UC(0x0067) +#define UC_h UC(0x0068) +#define UC_i UC(0x0069) +#define UC_j UC(0x006A) +#define UC_k UC(0x006B) +#define UC_l UC(0x006C) +#define UC_m UC(0x006D) +#define UC_n UC(0x006E) +#define UC_o UC(0x006F) +#define UC_p UC(0x0070) +#define UC_q UC(0x0071) +#define UC_r UC(0x0072) +#define UC_s UC(0x0073) +#define UC_t UC(0x0074) +#define UC_u UC(0x0075) +#define UC_v UC(0x0076) +#define UC_w UC(0x0077) +#define UC_x UC(0x0078) +#define UC_y UC(0x0079) +#define UC_z UC(0x007A) + +#define UC_LCBR UC(0x007B) +#define UC_PIPE UC(0x007C) +#define UC_RCBR UC(0x007D) +#define UC_TILD UC(0x007E) +#define UC_DEL UC(0x007F) + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index b8cdeaa979..37f10df866 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,4 +1,4 @@ -#include "process_unicode_map.h" +#include "process_unicodemap.h" __attribute__((weak)) const uint32_t PROGMEM unicode_map[] = { diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index 291bd8de03..64a7a01090 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -2,6 +2,7 @@ #define PROCESS_UNICODEMAP_H #include "quantum.h" +#include "process_unicode_common.h" void unicode_map_input_error(void); bool process_unicode_map(uint16_t keycode, keyrecord_t *record); -- cgit v1.2.3 From 1bb574fe48bf73af4f3a4dadcff62599fd5dbb9a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 17:09:47 -0500 Subject: add unicode common file, get names right --- quantum/process_keycode/process_unicode_common.c | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 quantum/process_keycode/process_unicode_common.c diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c new file mode 100644 index 0000000000..1a9d470c94 --- /dev/null +++ b/quantum/process_keycode/process_unicode_common.c @@ -0,0 +1,86 @@ +#include "process_unicode_common.h" + +static uint8_t input_mode; +uint8_t mods; + +void set_unicode_input_mode(uint8_t os_target) +{ + input_mode = os_target; +} + +uint8_t get_unicode_input_mode(void) { + return input_mode; +} + +__attribute__((weak)) +void unicode_input_start (void) { + // save current mods + mods = keyboard_report->mods; + + // unregister all mods to start from clean state + if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + + switch(input_mode) { + case UC_OSX: + register_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_U); + unregister_code(KC_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + break; + case UC_WIN: + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + break; + case UC_WINC: + register_code(KC_RALT); + unregister_code(KC_RALT); + register_code(KC_U); + unregister_code(KC_U); + } + wait_ms(UNICODE_TYPE_DELAY); +} + +__attribute__((weak)) +void unicode_input_finish (void) { + switch(input_mode) { + case UC_OSX: + case UC_WIN: + unregister_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_SPC); + unregister_code(KC_SPC); + break; + } + + // reregister previously set mods + if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); +} + +void register_hex(uint16_t hex) { + for(int i = 3; i >= 0; i--) { + uint8_t digit = ((hex >> (i*4)) & 0xF); + register_code(hex_to_keycode(digit)); + unregister_code(hex_to_keycode(digit)); + } +} \ No newline at end of file -- cgit v1.2.3 From c2a9acffd712145dc8b924005feb060c5ac3e2ff Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 17:39:51 -0500 Subject: publicise variables --- quantum/process_keycode/process_unicode_common.c | 3 --- quantum/process_keycode/process_unicode_common.h | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 1a9d470c94..baeee6d08c 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -1,8 +1,5 @@ #include "process_unicode_common.h" -static uint8_t input_mode; -uint8_t mods; - void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 171ecbca1d..9c26cfb071 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -7,13 +7,15 @@ #define UNICODE_TYPE_DELAY 10 #endif +static uint8_t input_mode; +uint8_t mods; + void set_unicode_input_mode(uint8_t os_target); uint8_t get_unicode_input_mode(void); void unicode_input_start(void); void unicode_input_finish(void); void register_hex(uint16_t hex); - #define UC_OSX 0 // Mac OS X #define UC_LNX 1 // Linux #define UC_WIN 2 // Windows 'HexNumpad' -- cgit v1.2.3 From f89499e255afbe5f8adeae5e71367f3d358af527 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 18:14:07 -0500 Subject: unique variable name --- quantum/process_keycode/process_unicode_common.c | 36 ++++++++++++------------ quantum/process_keycode/process_unicode_common.h | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index baeee6d08c..d924c364ac 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -12,17 +12,17 @@ uint8_t get_unicode_input_mode(void) { __attribute__((weak)) void unicode_input_start (void) { // save current mods - mods = keyboard_report->mods; + unicode_mods = keyboard_report->mods; // unregister all mods to start from clean state - if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + if (unicode_mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (unicode_mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (unicode_mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (unicode_mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (unicode_mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (unicode_mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (unicode_mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (unicode_mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); switch(input_mode) { case UC_OSX: @@ -63,15 +63,15 @@ void unicode_input_finish (void) { break; } - // reregister previously set mods - if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); - if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); - if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); - if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); - if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); - if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); - if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); + // reregister previously set unicode_mods + if (unicode_mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (unicode_mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (unicode_mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (unicode_mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (unicode_mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (unicode_mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (unicode_mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (unicode_mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); } void register_hex(uint16_t hex) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 9c26cfb071..aa233db222 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -8,7 +8,7 @@ #endif static uint8_t input_mode; -uint8_t mods; +uint8_t unicode_mods; void set_unicode_input_mode(uint8_t os_target); uint8_t get_unicode_input_mode(void); -- cgit v1.2.3 From 58823b4e0324f5b2861fc5a0f74f6faa3673f5dc Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 15 Feb 2017 23:20:35 -0500 Subject: fix weirdness with arm and mods --- quantum/process_keycode/process_unicode_common.c | 38 +++++++++++++----------- quantum/process_keycode/process_unicode_common.h | 1 - 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index d924c364ac..31bc3b7ab3 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -1,5 +1,7 @@ #include "process_unicode_common.h" +uint8_t mods; + void set_unicode_input_mode(uint8_t os_target) { input_mode = os_target; @@ -12,17 +14,17 @@ uint8_t get_unicode_input_mode(void) { __attribute__((weak)) void unicode_input_start (void) { // save current mods - unicode_mods = keyboard_report->mods; + mods = keyboard_report->mods; // unregister all mods to start from clean state - if (unicode_mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); - if (unicode_mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); - if (unicode_mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); - if (unicode_mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); - if (unicode_mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); - if (unicode_mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); - if (unicode_mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); - if (unicode_mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); + if (mods & MOD_BIT(KC_LSFT)) unregister_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) unregister_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) unregister_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) unregister_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) unregister_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) unregister_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) unregister_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) unregister_code(KC_RGUI); switch(input_mode) { case UC_OSX: @@ -63,15 +65,15 @@ void unicode_input_finish (void) { break; } - // reregister previously set unicode_mods - if (unicode_mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); - if (unicode_mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); - if (unicode_mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); - if (unicode_mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); - if (unicode_mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); - if (unicode_mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); - if (unicode_mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); - if (unicode_mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); + // reregister previously set mods + if (mods & MOD_BIT(KC_LSFT)) register_code(KC_LSFT); + if (mods & MOD_BIT(KC_RSFT)) register_code(KC_RSFT); + if (mods & MOD_BIT(KC_LCTL)) register_code(KC_LCTL); + if (mods & MOD_BIT(KC_RCTL)) register_code(KC_RCTL); + if (mods & MOD_BIT(KC_LALT)) register_code(KC_LALT); + if (mods & MOD_BIT(KC_RALT)) register_code(KC_RALT); + if (mods & MOD_BIT(KC_LGUI)) register_code(KC_LGUI); + if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); } void register_hex(uint16_t hex) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index aa233db222..1f25eae7dd 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -8,7 +8,6 @@ #endif static uint8_t input_mode; -uint8_t unicode_mods; void set_unicode_input_mode(uint8_t os_target); uint8_t get_unicode_input_mode(void); -- cgit v1.2.3 From af942f2e57023a469d2f617839b3b7cb7eec798a Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Wed, 15 Feb 2017 22:33:04 -0600 Subject: The Ordinary Layout is the best one, the one you are looking for. Really. Check it out. --- keyboards/ergodox/keymaps/ordinary/keymap.c | 46 ++++++++++++++------- .../ergodox/keymaps/ordinary/ordinary-symbol.png | Bin 89582 -> 90642 bytes .../ergodox/keymaps/ordinary/ordinary-symbol.txt | 12 +++--- keyboards/ergodox/keymaps/ordinary/readme.md | 14 +++---- 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index b79f0f0645..8f17ee276a 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -19,7 +19,9 @@ #define RSpec 15 // right special-shift key #define NotEq 16 // != macro -#define Point 17 // -> macro +#define GrtEq 17 // >= macro +#define LesEq 18 // <= macro +#define DeRef 19 // -> macro #define MUL 20 // mouse up left #define MUR 21 // mouse up right @@ -71,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC ,M(LSymb) ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G ,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) -,KC_SCLN ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI +,KC_LCTL ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN @@ -100,9 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ; | & | * | < | > | | 0 | . | = | + | Enter | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. - * ||||||||||||||| ||||||||||||||| + * | |||| | |||| | | |||| | |||| | * ,------|------|------| |------+------+------. - * | Plus | Equal|||||||| |||||||| Under| Dash | + * | Plus | Equal| |||| | | |||| | Under| Dash | * | | |------| |------| Score| | * | + | = | != | | -> | _ | - | * `--------------------' `--------------------' @@ -113,8 +115,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) ,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_TAB -,KC_LCTL ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) - ,KC_NO ,KC_NO +,KC_SCLN ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) + ,M(GrtEq),M(LesEq) ,KC_NO ,KC_PLUS ,KC_EQL ,M(NotEq) // right hand @@ -125,21 +127,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT ,KC_NO ,KC_NO ,KC_NO - ,M(Point) ,LSFT(KC_MINS),KC_MINS + ,M(DeRef) ,LSFT(KC_MINS),KC_MINS ), /******* Media Layer ******************************************************************************************************* * * ,---------------------------------------------------------------. ,---------------------------------------------------------------. - * | | F11 | F12 | F13 | F14 | F15 | Esc | | | F16 | F17 | F18 | F19 | F20 | | + * | | F11 | F12 | F13 | F14 | F15 | Esc | | |||| | F16 | F17 | F18 | F19 | F20 | | * |------+---------+---------+---------+---------+----------------| |------+---------+---------+---------+---------+---------+------| * | |Shut Down|MouseUpLf|Mouse Up |MouseUpRg|Volume Up|Scroll| |Scroll|PrintScrn| Home | Up | PgUp | Mail | | * |------+---------+---------+---------+---------+---------| Up | | Up |---------+---------+---------+---------+---------+------| * | | Sleep |MouseLeft|MouseDown|MouseRght|Volume Dn|------| |------| Num Lock| Left | Down | Right | MyComp | | * |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------| - * | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | | + * | | |||| |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | |||| | End | Down | PgDn | |||| | | * `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------' - * | | | MClick | LClick | R Click| | Insert | Del | | | | + * | ||| | |||| | MClick | LClick | R Click| | Insert | Del | |||| | |||| | ||| | * `---------------------------------------------' `---------------------------------------------' * ,-------------. ,-------------. * | Stop |Refrsh| | Prev | Next | @@ -219,7 +221,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------| * | \| | P | O | I | U | Y | ] | | [ | T | R | E | W | Q | Tab | * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------| - * | | ; | L | K | J | H |------| |------| G | F | D | S | A | '" | + * | '" | ; | L | K | J | H |------| |------| G | F | D | S | A | | * |------------+------+------+------+------+------| Tab | |Shift |------+------+------+------+------+------------| * | Capitals | / | . | , | M | N | | | -Tab | B | V | C | X | Z | Capitals | * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------' @@ -237,7 +239,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_EQL ,KC_0 ,KC_9 ,KC_8 ,KC_7 ,KC_6 ,KC_MINS ,KC_BSLS ,KC_P ,KC_O ,KC_I ,KC_U ,KC_Y ,KC_RBRC -,KC_NO ,LT(RBASE, KC_SCLN) ,KC_L ,KC_K ,LT(RBASE, KC_J) ,KC_H +,KC_QUOT ,LT(RBASE, KC_SCLN) ,KC_L ,KC_K ,LT(RBASE, KC_J) ,KC_H ,KC_RSFT ,KC_SLSH ,KC_DOT ,KC_COMM,KC_M ,KC_N ,KC_TAB ,KC_RCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_RALT,KC_RGUI ,KC_LEFT ,KC_RGHT @@ -246,7 +248,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand ,KC_ESC ,KC_5 ,KC_4 ,KC_3 ,KC_2 ,KC_1 ,KC_GRV ,KC_LBRC ,KC_T ,KC_R ,KC_E ,KC_W ,KC_Q ,KC_TAB - ,KC_G ,LT(RBASE, KC_F),KC_D ,KC_S ,LT(RBASE, KC_A) ,F(LSymb) + ,KC_G ,LT(RBASE, KC_F),KC_D ,KC_S ,LT(RBASE, KC_A) ,KC_NO ,LSFT(KC_TAB),KC_B ,KC_V ,KC_C ,KC_X ,KC_Z ,KC_LSFT ,KC_LGUI,KC_LALT,KC_HYPR ,KC_MEH,KC_LCTL ,KC_HOME ,KC_END @@ -390,13 +392,25 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case NotEq: if (record->event.pressed) { - return MACRO( I(30), T(EXLM), T(EQL), END ); // + return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END ); // != } break; - case Point: + case GrtEq: if (record->event.pressed) { - return MACRO( I(30), T(MINS), T(DOT), END ); // + return MACRO( I(10), D(LSFT), T(COMM), U(LSFT), T(EQL), END ); // <= + } + break; + + case LesEq: + if (record->event.pressed) { + return MACRO( I(10), D(LSFT), T(DOT), U(LSFT), T(EQL), END ); // >= + } + break; + + case DeRef: + if (record->event.pressed) { + return MACRO( I(10), T(MINS), D(LSFT), T(DOT), U(LSFT), END ); // -> } break; diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png index 8cd92cee14..1277f74837 100644 Binary files a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png and b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.png differ diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt index f64503ecbd..65eca9d6a5 100644 --- a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt +++ b/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt @@ -16,12 +16,12 @@ [{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"], [{y:-0.875,c:"#c6c600",t:"#9e0000",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb",t:"#000000"},"%",{x:14.5,c:"#89b087"},"-",{c:"#c6c600",t:"#9e0000",w:1.5},"\n\nCapitals\n\n\n\n\nShift"], [{y:-0.375,x:3.5,c:"#bbddbb",t:"#000000"},"<",{x:10.5,c:"#89b087"},"."], -[{y:-0.875,x:2.5,c:"#bbddbb"},"*",{x:1,a:5},">",{x:8.5,c:"#89b087",a:4},"0",{x:1},"="], +[{y:-0.875,x:2.5,c:"#bbddbb"},"*",{x:1},">",{x:8.5,c:"#89b087"},"0",{x:1},"="], [{y:-0.75,x:0.5,c:"#bbddbb"},";","&",{x:14.5,c:"#89b087"},"+","Enter"], -[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#737373",a:7},"",""], -[{c:"#bbddbb",h:2},"+",{h:2},"=",{c:"#737373"},""], -[{x:2,c:"#bbddbb"},"!="], -[{r:-30,rx:13,y:-1,x:-3,c:"#737373"},"",""], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#bbddbb"},"<=",">="], +[{a:7,h:2},"+",{h:2},"=",{c:"#737373"},""], +[{x:2,c:"#bbddbb",a:4},"!="], +[{r:-30,rx:13,y:-1,x:-3,c:"#737373",a:7},"",""], [{x:-3},"",{c:"#bbddbb",h:2},"_",{h:2},"-"], -[{x:-3},"->"] +[{x:-3,a:4},"->"] diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/keyboards/ergodox/keymaps/ordinary/readme.md index 313b726bad..927356892e 100644 --- a/keyboards/ergodox/keymaps/ordinary/readme.md +++ b/keyboards/ergodox/keymaps/ordinary/readme.md @@ -10,13 +10,13 @@ no rights reserved, use for any purposes, credit me if you are a nice person ## The Base Layout ## -* *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets). -* *Modifier Keys* are light yellow and in the traditional locationn at the bottom of the keyboard: Control, Option, Command, plus Hyper and Meh. -* *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional shift) is found in the usual place and above that is found Symbol Shift, Media Shift, and Special Shift (Shift Lock). +* *White Keys* are all the normal characters and symbols in all the normal locations (except for the brackets, and who touch-types brackets?). +* *Modifier Keys* are light yellow and in the traditional locationn at the bottom of the keyboard: Control, Option, Command, plus Hyper and Meh. Modifier keys are only found on the base layout. +* *Shift Keys* are dark yellow, found on the outsides of the keyboard. Capitals Shift (traditional Shift) is found in the usual place and above that are Symbol Shift, Media Shift, and Special Shift (Shift Lock). * Several of the shift keys double for entry of characters which would typically be in those locations. * *Thumb Keys* shown in orange are for text navigation and manipulation. * The keys under pinky fingers and index fingers will *reverse* the keyboard layout. -* *Escape* is red and it is always found in that location no matter what. +* *Escape* is red and it is always found in that location (*except* when the layout is reversed). ![Ordinary base layout](ordinary-base.png) @@ -26,18 +26,18 @@ The Forward Tab and Backward Tab keys are in their locations mostly because I en #### Reversing The Base Layout #### -The Ordinary Layout can be used to perform one-handed chorded text input. If you hold down the key under either index finger or either pinky finger (A, F, J and Semicolon), the whole base layout reverses order. Most keys are _mirrored_ but the delete keys are merely *translated* to preserve directionality. Pro-tip: This feature is particularly handly for bringing the Enter key to the left hand when the right hand is using the mouse. +The Ordinary Layout can be used to perform one-handed chorded text input. If you hold down the key under either index finger or either pinky finger (A, F, J and Semicolon), the whole base layout reverses order. Most keys are _mirrored_ but the delete keys, home/end, and left/right arrow keys are merely *translated* to preserve directionality. Pro-tip: This feature is particularly handly for bringing the Enter key to the left hand when the right hand is using the mouse. ## The Symbols Layer ## * *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column. * *F-Keys* are bright green and overlay the row of numerals. This layer has F1-F10, higher *F-Keys* are on the Symbols layer. * *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed. +* The dark gray keys do nothing in case you bump them by accident. ![Ordinary symbol layout](ordinary-symbol.png) The Symbols Layer is based on the Coder Layer from the default Ergodox EZ layout. I slightly rearranged the symbols, added some symbols, expanded the number pad, and straightened out the F-Keys. It's very handy to have the symbols directly underneath the normal typing keys. -* The dark gray keys do nothing in case you bump them by accident. ## The Media Layer ## @@ -85,7 +85,7 @@ The Escape and Backspace special sequences are so useful why not have a few more ## Errata ## -Some of the symbols on the Symbols layer are produced by the keyboard by "capitalizing" another symbol (such as *!* from *1*) so when you type that key you will notice the Capitals Shift red LED turn on. +Some of the symbols on the Symbols layer are produced by the keyboard by "capitalizing" another character (such as *!* from *1*) so when you type that key you will notice the Capitals Shift red LED turn on. **** -- cgit v1.2.3 From 7606f784ddd2f276827ed2131d8d4f12047d7f4f Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Wed, 15 Feb 2017 23:02:30 -0600 Subject: This is the best layout, really, come look --- keyboards/ergodox/keymaps/ordinary/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 8f17ee276a..1dfdf7e624 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -96,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | | * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * | | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | | - * |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------| - * | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | | + * |-----------+------+------+------+------+------| ' | | " |------+------+------+------+------+-----------| + * | | % | ^ | [ | ] | ~ | | | | \ | 1 | 2 | 3 | - | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | ; | & | * | < | > | | 0 | . | = | + | Enter | * `-----------------------------------' `-----------------------------------' @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) ,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_TAB +,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_QUOT ,KC_SCLN ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) ,M(GrtEq),M(LesEq) ,KC_NO @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS - ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS + ,LSFT(KC_QUOT),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT ,KC_NO ,KC_NO ,KC_NO -- cgit v1.2.3 From d99f03a1a60877ac18bfcceb3e9aff3796a4464b Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Wed, 15 Feb 2017 23:11:04 -0600 Subject: The Ordinary Layout has all the keys in the right places. --- keyboards/ergodox/keymaps/ordinary/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/keyboards/ergodox/keymaps/ordinary/readme.md index 927356892e..e13cb7ec86 100644 --- a/keyboards/ergodox/keymaps/ordinary/readme.md +++ b/keyboards/ergodox/keymaps/ordinary/readme.md @@ -30,7 +30,7 @@ The Ordinary Layout can be used to perform one-handed chorded text input. If you ## The Symbols Layer ## -* *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe justapose each other. Pipe, slash, and backslash are arranged in a column. +* *Symbols* shown in light green. All kinds of brackets are available on this layer. Ampersand and Pipe juxtapose each other. Pipe, slash, and backslash are arranged in a column. * *F-Keys* are bright green and overlay the row of numerals. This layer has F1-F10, higher *F-Keys* are on the Symbols layer. * *Number pad* in dark green under the right hand includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads so that NumLock is not needed. * The dark gray keys do nothing in case you bump them by accident. -- cgit v1.2.3 From 15dc540cac293b6f2e1433b701408c89e72c52ec Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 10:06:02 -0500 Subject: ignore PRs in versioning --- 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 de2481ce54..582c45ff7d 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,7 +7,7 @@ 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 +if [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false"]] ; then increment_version () { -- cgit v1.2.3 From 1ac5dc9e524444ef98cfab1d9822151a6bfb9621 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 11:37:46 -0500 Subject: fix travis and reduce warnings --- quantum/audio/voices.c | 1 + quantum/process_keycode/process_unicode_common.h | 1 + util/travis_compiled_push.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 8326e91eaa..c2edb75f01 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c @@ -24,6 +24,7 @@ void voice_deiterate() { float voice_envelope(float frequency) { // envelope_index ranges from 0 to 0xFFFF, which is preserved at 880.0 Hz + __attribute__ ((unused)) uint16_t compensated_index = (uint16_t)((float)envelope_index * (880.0 / frequency)); switch (voice) { diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 1f25eae7dd..864693cdd0 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -7,6 +7,7 @@ #define UNICODE_TYPE_DELAY 10 #endif +__attribute__ ((unused)) static uint8_t input_mode; void set_unicode_input_mode(uint8_t os_target); diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 582c45ff7d..58334cb1f6 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,7 +7,7 @@ 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" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false"]] ; then +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then increment_version () { -- cgit v1.2.3 From 96a8e2d5f52c4f9d4c774f820139be726894e70d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 16 Feb 2017 23:53:09 +0700 Subject: reposition ins and del key --- .../handwired/promethium/keymaps/priyadi/README.md | 2 +- .../handwired/promethium/keymaps/priyadi/keymap.c | 28 ++++++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md index 37c2be6f99..ddeaed939e 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/README.md +++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md @@ -13,7 +13,7 @@ Main layer modifications from default Planck layout: * Lower & Raise is now called Num and Fun. * OS & Left keys become another thumb modifier: Empty & Greek (Empty because I used this for another use and my muscle memory is not adapted to it yet) -On Promethium, Trackpoint is enabled on PD2 and PD2. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). +On Promethium, Trackpoint is enabled on PD2 and PD3. We impersonate a Thinkpad keyboard to be able to use Thinkpad driver on Windows (still needs verification). AltGr & Compose dual use key. Tap for Compose (mapped to Scroll Lock in hardware) and press for AltGr. diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 2c43f98847..4b9491fae7 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -54,6 +54,10 @@ along with this program. If not, see . #undef KC_RALT #define KC_RALT MT(MOD_RALT, KC_SLCK) +// dual use right-shift & del key +#undef KC_RSFT +#define KC_RSFT MT(MOD_RSFT, KC_DEL) + bool capslock = false; #ifdef DOUBLESPACE_LAYER_ENABLE bool lspace_active = false; @@ -664,16 +668,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | * | \ | - | = | / | ≠ | ( | ) | < | > | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | : | + * | & | ^ | | | _ | + | ? | ± | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | : | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______ ), /* Num @@ -682,23 +686,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | ` | * | \ | - | = | / | B | 4 | 5 | 6 | E | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : | + * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 0 | , | . | x | | + * | | | x | | | | | 0 | , | . | : | | * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN, - _______, _______, _______, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_X, _______ + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), _______, + _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______ ), /* Func * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | + * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | + * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F9 | F10 | F11 | F12 | | | | Home | End | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -706,8 +710,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUN] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, _______, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -- cgit v1.2.3 From e5bd81f0a68948a87ad5279bc2c41a4876466023 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 16 Feb 2017 23:56:47 +0700 Subject: Fix integer overflow --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4b9491fae7..8f712ccfed 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -51,12 +51,10 @@ along with this program. If not, see . #define KC_WWWF KC_WWW_FORWARD // hybrid right-alt & scroll lock (mapped to Compose in OS) -#undef KC_RALT -#define KC_RALT MT(MOD_RALT, KC_SLCK) +#define C_RALT MT(MOD_RALT, KC_SLCK) // dual use right-shift & del key -#undef KC_RSFT -#define KC_RSFT MT(MOD_RSFT, KC_DEL) +#define C_RSFT MT(MOD_RSFT, KC_DEL) bool capslock = false; #ifdef DOUBLESPACE_LAYER_ENABLE @@ -575,8 +573,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( 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_QUOT, KC_ENT , - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, KC_RALT, KC_RCTL + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, C_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL ), /* Dvorak -- cgit v1.2.3 From 49e72632d2200fc3bf71d5ced2aa43058da3b2e0 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 13:13:38 -0500 Subject: remove more warnings --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 2 ++ keyboards/ergodox/keymaps/twey/keymap.c | 1 + keyboards/planck/keymaps/cbbrowne/config.h | 4 +++ keyboards/planck/keymaps/unicode/keymap.c | 45 +++++++++++++++--------- quantum/keymap_extras/keymap_french.h | 4 ++- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index b62b14449f..aaf75d58f2 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -312,6 +312,8 @@ uint16_t hex_to_keycode(uint8_t hex) return NEO_E; case 0xF: return NEO_F; + default: + return KC_NO; } } } diff --git a/keyboards/ergodox/keymaps/twey/keymap.c b/keyboards/ergodox/keymaps/twey/keymap.c index 5deacd63f5..1ecbce4661 100644 --- a/keyboards/ergodox/keymaps/twey/keymap.c +++ b/keyboards/ergodox/keymaps/twey/keymap.c @@ -205,6 +205,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { + __attribute__ ((unused)) uint32_t layer0 = layer_state & (1UL << 0), layer1 = layer_state & (1UL << 1), layer2 = layer_state & (1UL << 2), diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index bd15fd5a22..3a4ee907f4 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -1,8 +1,12 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H +#ifndef NO_DEBUG #define NO_DEBUG +#endif +#ifndef NO_PRINT #define NO_PRINT +#endif #include "../../config.h" diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index d73e7e09d4..1b4ca8ed7d 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -195,24 +195,20 @@ const uint16_t PROGMEM fn_actions[] = { }; #ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {440.0*pow(2.0,(31)/12.0), 12}, - {440.0*pow(2.0,(28)/12.0), 8}, - {440.0*pow(2.0,(19)/12.0), 8}, - {440.0*pow(2.0,(24)/12.0), 8}, - {440.0*pow(2.0,(28)/12.0), 20} -}; +float tone_startup[][2] = SONG(STARTUP_SOUND); float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_plover[][2] = SONG(PLOVER_SOUND); float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_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); @@ -309,18 +305,35 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) }; void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // stops the tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif } #ifdef AUDIO_ENABLE -void play_goodbye_tone() + +void startup_user() { - PLAY_NOTE_ARRAY(goodbye, false, 0); - _delay_ms(150); + _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(); } -#endif +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index 834c69650e..401bbdf644 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -4,7 +4,9 @@ #include "keymap.h" // Alt gr +#ifndef ALGR #define ALGR(kc) RALT(kc) +#endif #define NO_ALGR KC_RALT // Normal characters @@ -72,7 +74,7 @@ #define FR_PIPE ALGR(KC_6) #define FR_GRV ALGR(KC_7) #define FR_BSLS ALGR(KC_8) -#define FR_CIRC ALGR(KC_9) +#define FR_CCIRC ALGR(KC_9) #define FR_AT ALGR(KC_0) #define FR_RBRC ALGR(FR_RPRN) #define FR_RCBR ALGR(FR_EQL) -- cgit v1.2.3 From cbef63d8fa5b7a55de24b7fd6cb147bbecfee160 Mon Sep 17 00:00:00 2001 From: skullY Date: Thu, 16 Feb 2017 13:27:32 -0800 Subject: Rework the clueboard keymaps a bit. --- keyboards/clueboard/keymaps/caps_fn/keymap.c | 83 ++++++++++++++++++ keyboards/clueboard/keymaps/caps_fn/layout.png | Bin 0 -> 112289 bytes keyboards/clueboard/keymaps/caps_fn/readme.md | 15 ++++ keyboards/clueboard/keymaps/default/keymap.c | 93 ++++++++------------- keyboards/clueboard/keymaps/default/layout.png | Bin 0 -> 112442 bytes keyboards/clueboard/keymaps/default/readme.md | 17 ++++ keyboards/clueboard/keymaps/mac_optimized/keymap.c | 83 ++++++++++++++++++ .../clueboard/keymaps/mac_optimized/layout.png | Bin 0 -> 107368 bytes .../clueboard/keymaps/mac_optimized/readme.md | 15 ++++ keyboards/clueboard/keymaps/max/Makefile | 49 ----------- keyboards/clueboard/keymaps/max/keymap.c | 85 ------------------- keyboards/clueboard/keymaps/maximised/keymap.c | 47 +++++++++++ keyboards/clueboard/keymaps/maximised/layout.png | Bin 0 -> 111157 bytes keyboards/clueboard/keymaps/maximised/readme.md | 14 ++++ keyboards/clueboard/keymaps/mouse_keys/keymap.c | 83 ++++++++++++++++++ keyboards/clueboard/keymaps/mouse_keys/layout.png | Bin 0 -> 143816 bytes keyboards/clueboard/keymaps/mouse_keys/readme.md | 16 ++++ keyboards/clueboard/keymaps/shift_fn/keymap.c | 83 ++++++++++++++++++ keyboards/clueboard/keymaps/shift_fn/layout.png | Bin 0 -> 107234 bytes keyboards/clueboard/keymaps/shift_fn/readme.md | 17 ++++ keyboards/clueboard/keymaps/skully/keymap.c | 90 +++++++------------- keyboards/clueboard/keymaps/skully/layout.png | Bin 0 -> 111676 bytes keyboards/clueboard/keymaps/skully/readme.md | 11 +++ .../clueboard/keymaps/unix_optimized/keymap.c | 83 ++++++++++++++++++ .../clueboard/keymaps/unix_optimized/layout.png | Bin 0 -> 111171 bytes .../clueboard/keymaps/unix_optimized/readme.md | 15 ++++ keyboards/clueboard/keymaps/win_optimized/keymap.c | 83 ++++++++++++++++++ .../clueboard/keymaps/win_optimized/layout.png | Bin 0 -> 110405 bytes .../clueboard/keymaps/win_optimized/readme.md | 17 ++++ keyboards/clueboard/rules.mk | 10 +-- 30 files changed, 752 insertions(+), 257 deletions(-) create mode 100644 keyboards/clueboard/keymaps/caps_fn/keymap.c create mode 100644 keyboards/clueboard/keymaps/caps_fn/layout.png create mode 100644 keyboards/clueboard/keymaps/caps_fn/readme.md create mode 100644 keyboards/clueboard/keymaps/default/layout.png create mode 100644 keyboards/clueboard/keymaps/default/readme.md create mode 100644 keyboards/clueboard/keymaps/mac_optimized/keymap.c create mode 100644 keyboards/clueboard/keymaps/mac_optimized/layout.png create mode 100644 keyboards/clueboard/keymaps/mac_optimized/readme.md delete mode 100644 keyboards/clueboard/keymaps/max/Makefile delete mode 100644 keyboards/clueboard/keymaps/max/keymap.c create mode 100644 keyboards/clueboard/keymaps/maximised/keymap.c create mode 100644 keyboards/clueboard/keymaps/maximised/layout.png create mode 100644 keyboards/clueboard/keymaps/maximised/readme.md create mode 100644 keyboards/clueboard/keymaps/mouse_keys/keymap.c create mode 100644 keyboards/clueboard/keymaps/mouse_keys/layout.png create mode 100644 keyboards/clueboard/keymaps/mouse_keys/readme.md create mode 100644 keyboards/clueboard/keymaps/shift_fn/keymap.c create mode 100644 keyboards/clueboard/keymaps/shift_fn/layout.png create mode 100644 keyboards/clueboard/keymaps/shift_fn/readme.md create mode 100644 keyboards/clueboard/keymaps/skully/layout.png create mode 100644 keyboards/clueboard/keymaps/unix_optimized/keymap.c create mode 100644 keyboards/clueboard/keymaps/unix_optimized/layout.png create mode 100644 keyboards/clueboard/keymaps/unix_optimized/readme.md create mode 100644 keyboards/clueboard/keymaps/win_optimized/keymap.c create mode 100644 keyboards/clueboard/keymaps/win_optimized/layout.png create mode 100644 keyboards/clueboard/keymaps/win_optimized/readme.md diff --git a/keyboards/clueboard/keymaps/caps_fn/keymap.c b/keyboards/clueboard/keymaps/caps_fn/keymap.c new file mode 100644 index 0000000000..37f00e8d80 --- /dev/null +++ b/keyboards/clueboard/keymaps/caps_fn/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/caps_fn/layout.png b/keyboards/clueboard/keymaps/caps_fn/layout.png new file mode 100644 index 0000000000..a5bd57adbb Binary files /dev/null and b/keyboards/clueboard/keymaps/caps_fn/layout.png differ diff --git a/keyboards/clueboard/keymaps/caps_fn/readme.md b/keyboards/clueboard/keymaps/caps_fn/readme.md new file mode 100644 index 0000000000..74ad01fca8 --- /dev/null +++ b/keyboards/clueboard/keymaps/caps_fn/readme.md @@ -0,0 +1,15 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Caps Fn Layout + +This is the default layout except that Caps Lock acts like Caps Lock when +tapped but Fn when held. diff --git a/keyboards/clueboard/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 01f158bf0f..37f00e8d80 100644 --- a/keyboards/clueboard/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c @@ -1,7 +1,8 @@ #include "clueboard.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS // 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. @@ -9,21 +10,10 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _RS 2 +#define _CL 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' + /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ @@ -33,61 +23,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' */ [_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | | | - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL| | | | - * `----------------------------------------------------------------------------------' + /* Keymap _CL: Control layer */ -[_RS] = KEYMAP( - KC_TRNS, KC_TRNS, 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_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), -}; - -enum function_id { - SHIFT_ESC, +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), + [0] = ACTION_FUNCTION(0), // Calls action_function() }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; + static uint8_t mods_pressed; + switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + if (record->event.pressed) { - if (shift_esc_shift_mask) { + /* The key is being pressed. + */ + if (mods_pressed) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -95,7 +68,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + /* The key is being released. + */ + if (mods_pressed) { del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/default/layout.png b/keyboards/clueboard/keymaps/default/layout.png new file mode 100644 index 0000000000..cd318163e4 Binary files /dev/null and b/keyboards/clueboard/keymaps/default/layout.png differ diff --git a/keyboards/clueboard/keymaps/default/readme.md b/keyboards/clueboard/keymaps/default/readme.md new file mode 100644 index 0000000000..cede17ee17 --- /dev/null +++ b/keyboards/clueboard/keymaps/default/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c new file mode 100644 index 0000000000..59f7ff2436 --- /dev/null +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/mac_optimized/layout.png b/keyboards/clueboard/keymaps/mac_optimized/layout.png new file mode 100644 index 0000000000..e84ba54ea9 Binary files /dev/null and b/keyboards/clueboard/keymaps/mac_optimized/layout.png differ diff --git a/keyboards/clueboard/keymaps/mac_optimized/readme.md b/keyboards/clueboard/keymaps/mac_optimized/readme.md new file mode 100644 index 0000000000..940e09125d --- /dev/null +++ b/keyboards/clueboard/keymaps/mac_optimized/readme.md @@ -0,0 +1,15 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout for Mac + +This is the default Clueboard layout with Alt and GUI switched to match Mac +conventions. diff --git a/keyboards/clueboard/keymaps/max/Makefile b/keyboards/clueboard/keymaps/max/Makefile deleted file mode 100644 index 950dadf841..0000000000 --- a/keyboards/clueboard/keymaps/max/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -#---------------------------------------------------------------------------- -# 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 -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/clueboard/keymaps/max/keymap.c b/keyboards/clueboard/keymaps/max/keymap.c deleted file mode 100644 index 193809840b..0000000000 --- a/keyboards/clueboard/keymaps/max/keymap.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "clueboard.h" - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _RS 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * | Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| ~| BS| |PgUp| - * |--------------------------------------------------------------------------| |----| - * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgDn| - * |--------------------------------------------------------------------------| `----' - * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| Up| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Alt| Gui| MHen| Space| Space| Hen| Gui| Alt| Ctrl|Left|Down|Rght| - * `----------------------------------------------------------------------------------' - */ -[_BL] = KEYMAP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _RS: Reset/Underlight layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | | | - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL| | | | - * `----------------------------------------------------------------------------------' - */ -[_RS] = KEYMAP( - KC_TRNS, KC_TRNS, 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_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), -}; - -/*enum function_id { -};*/ - -const uint16_t PROGMEM fn_actions[] = { -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - } -} diff --git a/keyboards/clueboard/keymaps/maximised/keymap.c b/keyboards/clueboard/keymaps/maximised/keymap.c new file mode 100644 index 0000000000..ebaefa6690 --- /dev/null +++ b/keyboards/clueboard/keymaps/maximised/keymap.c @@ -0,0 +1,47 @@ +#include "clueboard.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ + _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Reset/Underlight layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { +}; diff --git a/keyboards/clueboard/keymaps/maximised/layout.png b/keyboards/clueboard/keymaps/maximised/layout.png new file mode 100644 index 0000000000..bdc5d76239 Binary files /dev/null and b/keyboards/clueboard/keymaps/maximised/layout.png differ diff --git a/keyboards/clueboard/keymaps/maximised/readme.md b/keyboards/clueboard/keymaps/maximised/readme.md new file mode 100644 index 0000000000..b95d1750f4 --- /dev/null +++ b/keyboards/clueboard/keymaps/maximised/readme.md @@ -0,0 +1,14 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Maximised Clueboard Layout + +This layout is intended for a board with one or both shifts split. The outside key on the split shift is an Fn, while the inside is shift. The bottom row has all the mods on both sides, optimised for a Mac. diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c new file mode 100644 index 0000000000..37f00e8d80 --- /dev/null +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/mouse_keys/layout.png b/keyboards/clueboard/keymaps/mouse_keys/layout.png new file mode 100644 index 0000000000..52e5c4581b Binary files /dev/null and b/keyboards/clueboard/keymaps/mouse_keys/layout.png differ diff --git a/keyboards/clueboard/keymaps/mouse_keys/readme.md b/keyboards/clueboard/keymaps/mouse_keys/readme.md new file mode 100644 index 0000000000..97ac6dfa23 --- /dev/null +++ b/keyboards/clueboard/keymaps/mouse_keys/readme.md @@ -0,0 +1,16 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# MouseKeys Layout + +This layout adds a mouse layer. When you hold down the spacebar the arrow keys +will move your mouse cursor. You can click using the 3 mods to the left of the +arrow keys, or the 3 keys under your primary fingers on the home row. diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c new file mode 100644 index 0000000000..f21b9b5895 --- /dev/null +++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \ + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ + KC_LCTL, KC_LALT, KC_LGUI,MO(_FL), S(KC_SPC),S(KC_SPC), MO(_FL), KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/shift_fn/layout.png b/keyboards/clueboard/keymaps/shift_fn/layout.png new file mode 100644 index 0000000000..66d85410cc Binary files /dev/null and b/keyboards/clueboard/keymaps/shift_fn/layout.png differ diff --git a/keyboards/clueboard/keymaps/shift_fn/readme.md b/keyboards/clueboard/keymaps/shift_fn/readme.md new file mode 100644 index 0000000000..369f556f88 --- /dev/null +++ b/keyboards/clueboard/keymaps/shift_fn/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Shift Fn Clueboard Layout + +This is an experimental layout. It makes the left shift key a dual roll key. +For most keys it acts as a shift key, but for some keys it activates an +alternate function instead. Primarily I use this to access the F-keys under +the number rows. diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c index df6f054e07..295090352d 100644 --- a/keyboards/clueboard/keymaps/skully/keymap.c +++ b/keyboards/clueboard/keymaps/skully/keymap.c @@ -1,7 +1,8 @@ #include "clueboard.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS // 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. @@ -9,21 +10,10 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _RS 2 +#define _CL 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' + /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ @@ -33,61 +23,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT,KC_LGUI,MO(_FL), KC_SPC, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' */ [_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_DEL, BL_STEP, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \ - KC_TRNS,KC_TRNS,MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_PGUP, \ - KC_TRNS,KC_TRNS,KC_TRNS,MO(_FL), KC_TRNS,KC_TRNS, MO(_FL),KC_TRNS,KC_TRNS,MO(_FL),KC_HOME,KC_PGDN,KC_END), + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, BL_STEP, \ + _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ + _______,_______,_______,MO(_FL), _______,_______, MO(_FL),_______,_______,MO(_FL),KC_HOME,KC_PGDN,KC_END), - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | | | - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL| | | | - * `----------------------------------------------------------------------------------' + /* Keymap _CL: Control layer */ -[_RS] = KEYMAP( - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \ - KC_TRNS,KC_TRNS,MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,MO(_FL),KC_TRNS, KC_TRNS, KC_TRNS), -}; - -enum function_id { - SHIFT_ESC, +[_CL] = KEYMAP( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______, _______,_______, _______,_______,_______,MO(_FL),_______, _______, _______), }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), + [0] = ACTION_FUNCTION(0), }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; + static uint8_t mods_pressed; + switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + if (record->event.pressed) { - if (shift_esc_shift_mask) { + /* The key is being pressed. + */ + if (mods_pressed) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -95,7 +65,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + /* The key is being released. + */ + if (mods_pressed) { del_key(KC_GRV); send_keyboard_report(); } else { diff --git a/keyboards/clueboard/keymaps/skully/layout.png b/keyboards/clueboard/keymaps/skully/layout.png new file mode 100644 index 0000000000..64854aaefd Binary files /dev/null and b/keyboards/clueboard/keymaps/skully/layout.png differ diff --git a/keyboards/clueboard/keymaps/skully/readme.md b/keyboards/clueboard/keymaps/skully/readme.md index c1182123d9..08255dfbc5 100644 --- a/keyboards/clueboard/keymaps/skully/readme.md +++ b/keyboards/clueboard/keymaps/skully/readme.md @@ -1,3 +1,14 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + # skullY's Clueboard Layout This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing. diff --git a/keyboards/clueboard/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/keymaps/unix_optimized/keymap.c new file mode 100644 index 0000000000..9fbd772405 --- /dev/null +++ b/keyboards/clueboard/keymaps/unix_optimized/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_INS, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/unix_optimized/layout.png b/keyboards/clueboard/keymaps/unix_optimized/layout.png new file mode 100644 index 0000000000..ea7d30e357 Binary files /dev/null and b/keyboards/clueboard/keymaps/unix_optimized/layout.png differ diff --git a/keyboards/clueboard/keymaps/unix_optimized/readme.md b/keyboards/clueboard/keymaps/unix_optimized/readme.md new file mode 100644 index 0000000000..3510e138bf --- /dev/null +++ b/keyboards/clueboard/keymaps/unix_optimized/readme.md @@ -0,0 +1,15 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout + +This is the default layout except that Caps Lock has been changed to Control +and Insert and Delete have been put into the Fn layer. diff --git a/keyboards/clueboard/keymaps/win_optimized/keymap.c b/keyboards/clueboard/keymaps/win_optimized/keymap.c new file mode 100644 index 0000000000..a85f0824f1 --- /dev/null +++ b/keyboards/clueboard/keymaps/win_optimized/keymap.c @@ -0,0 +1,83 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mods_pressed) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/win_optimized/layout.png b/keyboards/clueboard/keymaps/win_optimized/layout.png new file mode 100644 index 0000000000..7d8c82da7c Binary files /dev/null and b/keyboards/clueboard/keymaps/win_optimized/layout.png differ diff --git a/keyboards/clueboard/keymaps/win_optimized/readme.md b/keyboards/clueboard/keymaps/win_optimized/readme.md new file mode 100644 index 0000000000..cede17ee17 --- /dev/null +++ b/keyboards/clueboard/keymaps/win_optimized/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](layout.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/rules.mk b/keyboards/clueboard/rules.mk index 3909fbd5cb..7ce096ba8b 100644 --- a/keyboards/clueboard/rules.mk +++ b/keyboards/clueboard/rules.mk @@ -90,14 +90,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +COMMAND_ENABLE ?= yes # Commands for debug and configuration NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality MIDI_ENABLE ?= no # MIDI controls UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3 From 1d87df5262331bee3cd27995ba17b035db2bef42 Mon Sep 17 00:00:00 2001 From: skullY Date: Thu, 16 Feb 2017 14:04:04 -0800 Subject: Add the mouse_keys layout --- keyboards/clueboard/keymaps/mouse_keys/Makefile | 1 + keyboards/clueboard/keymaps/mouse_keys/keymap.c | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 keyboards/clueboard/keymaps/mouse_keys/Makefile diff --git a/keyboards/clueboard/keymaps/mouse_keys/Makefile b/keyboards/clueboard/keymaps/mouse_keys/Makefile new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/clueboard/keymaps/mouse_keys/Makefile @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c index 37f00e8d80..a9c5cebd0c 100644 --- a/keyboards/clueboard/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -11,6 +11,7 @@ #define _BL 0 #define _FL 1 #define _CL 2 +#define _ML 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) @@ -39,6 +40,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), + + /* Keymap _ML: Mouse layer + */ + [_ML] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ + _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ + _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), }; /* This is a list of user defined functions. F(N) corresponds to item N -- cgit v1.2.3 From d168822477a495091076aa2a36f0c5f7900d9c8a Mon Sep 17 00:00:00 2001 From: Stanley Lai Date: Sat, 18 Feb 2017 20:56:17 -0800 Subject: Updated XD60 readme and photos to reflect v2 PCB --- keyboards/xd60/arrow-cluster.JPG | Bin 1875718 -> 0 bytes keyboards/xd60/readme.md | 8 ++++++-- keyboards/xd60/top-view.JPG | Bin 2092542 -> 0 bytes keyboards/xd60/xd60.jpg | Bin 0 -> 2466209 bytes 4 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 keyboards/xd60/arrow-cluster.JPG delete mode 100644 keyboards/xd60/top-view.JPG create mode 100644 keyboards/xd60/xd60.jpg diff --git a/keyboards/xd60/arrow-cluster.JPG b/keyboards/xd60/arrow-cluster.JPG deleted file mode 100644 index aa03dc08ed..0000000000 Binary files a/keyboards/xd60/arrow-cluster.JPG and /dev/null differ diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index 393ea5d683..224498caa9 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -1,7 +1,6 @@ # QMK Firmware for XIUDI's 60% XD60 PCB -![Top View of XD60 Keyboard, with DSA Dolch keycaps](./top-view.JPG) -![Angled View of XD60 Keyboard Arrow Cluster, with DSA Dolch keycaps](./arrow-cluster.JPG) +![Top View of a pair of XD60 Keyboard](./xd60.JPG) ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). @@ -9,5 +8,10 @@ For the full Quantum feature list, see [the parent readme.md](/readme.md). ## Additional Notes The XD60 is essentially a GH60 rev. C, with support for a right-hand arrow cluster. Includes full compatibility with GH60 expansion boards. Board also supports in-switch LEDs (two-pin, single colour), as well as WS2182 LED strips for underglow lighting. Default keymap included, matching configuration on sale page. +Version 2 PCBs include 6 soldered on RGB underglow LEDs on the bottom, and are labelled "XD60v2" on the top. They are otherwise identical to v1 PCBs. + +## Known Issues +In-switch backlight LEDs seem to only support 1 brightness level. + ## Build To build the default keymap, simply run `make xd60-default`. diff --git a/keyboards/xd60/top-view.JPG b/keyboards/xd60/top-view.JPG deleted file mode 100644 index 613759b4d2..0000000000 Binary files a/keyboards/xd60/top-view.JPG and /dev/null differ diff --git a/keyboards/xd60/xd60.jpg b/keyboards/xd60/xd60.jpg new file mode 100644 index 0000000000..11654f0fd9 Binary files /dev/null and b/keyboards/xd60/xd60.jpg differ -- cgit v1.2.3 From 76b1f392abb2a0cf4a7fa14a01818998f4de4d39 Mon Sep 17 00:00:00 2001 From: Stanley Lai Date: Sat, 18 Feb 2017 21:47:11 -0800 Subject: XD60: Added BL_TOGG back to keymap, with 6 backlight steps --- keyboards/xd60/config.h | 7 ++----- keyboards/xd60/keymaps/stanleylai/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/keyboards/xd60/config.h b/keyboards/xd60/config.h index d3052b4038..4bbaec882d 100644 --- a/keyboards/xd60/config.h +++ b/keyboards/xd60/config.h @@ -46,12 +46,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } #define UNUSED_PINS -/* Backlight Setup - * Only 1 level, since XD60's backlight implementation doesn't seem compatible with QMK for variable brightness - * Use BL_STEP to toggle LEDs instead, as BL_TOGG can be inconsistent (depending on current level) - */ +/* Backlight Setup */ #define BACKLIGHT_PIN F5 -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 6 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index 4d3032a106..feb2cd1b6d 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -21,8 +21,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 2: RGB Layer KEYMAP( - 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, \ - BL_STEP, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, BL_TOGG, BL_STEP, 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, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(1), KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), -- cgit v1.2.3 From 77f93636757d32f4e2ce6d7295f3d6293af3b462 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 03:24:32 +0700 Subject: Only process Fnumber on key release, and only when layer is still active --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 8f712ccfed..cf486b39f5 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1046,6 +1046,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; #endif + // only process Fnumber on key release, and only when layer switcher is still pressed. + // this is to avoid accidental presses + case KC_F1 ... KC_F12: + if (!record->event.pressed && layer == _FUN) { + register_code(keycode); + unregister_code(keycode); + } + return false; + break; + // layer switcher // case GREEK: -- cgit v1.2.3 From b306f83c6b5ef671917bbc3789297e7344bede99 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 04:00:05 +0700 Subject: Move del back to fun+backspce --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index cf486b39f5..0c39da8248 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -54,7 +54,7 @@ along with this program. If not, see . #define C_RALT MT(MOD_RALT, KC_SLCK) // dual use right-shift & del key -#define C_RSFT MT(MOD_RSFT, KC_DEL) +// #define C_RSFT MT(MOD_RSFT, KC_DEL) bool capslock = false; #ifdef DOUBLESPACE_LAYER_ENABLE @@ -573,7 +573,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( 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_QUOT, KC_ENT , - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, C_RSFT, + 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, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL ), @@ -708,7 +708,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUN] = KEYMAP( - XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, _______, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -- cgit v1.2.3 From b9fce164906195d8fa6eff4b1e5e080b43b63b30 Mon Sep 17 00:00:00 2001 From: Nathan Kessler Date: Mon, 20 Feb 2017 22:31:40 -0500 Subject: Add dvorak_emacs_software layout for ergodox --- .../ergodox/keymaps/dvorak_emacs_software/keymap.c | 166 +++++++++++++++++++++ .../keymaps/dvorak_emacs_software/readme.md | 74 +++++++++ 2 files changed, 240 insertions(+) create mode 100755 keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c create mode 100644 keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c b/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c new file mode 100755 index 0000000000..a2bc15c991 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c @@ -0,0 +1,166 @@ +#include "ergodox.h" +#include "keymap_dvorak.h" +#include "debug.h" +#include "action_layer.h" + +/****************************************************************************************** + * DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/) + * Layer 1: auxiliary keys + * Layer 2: full qwerty layout + *****************************************************************************************/ + +// LAYERS +#define BASE 0 // dvorak layout (default) +#define AUX 1 // auxiliary keys + +// MACROS +/* #define OBRACE 0 // key { or shift */ +/* #define CBRACE 1 // key } or shift */ +/* #define OBRACK 2 // key [ or left alt */ +/* #define CBRACK 3 // key ] or left alt */ +/* #define CAPS 4 // caps lock */ + +// LEDS +#define USB_LED_NUM_LOCK 0 +#define USB_LED_CAPS_LOCK 1 +#define USB_LED_SCROLL_LOCK 2 +#define USB_LED_COMPOSE 3 +#define USB_LED_KANA 4 + +// TIMERS +#define KEY_TAP_FAST 85 +#define KEY_TAP_SLOW 95 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base layer + * Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? | + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + * | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ | + * |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------| + * | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | ~L1 | | ~L1 | | | \ / || | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | HOME | END | | LEFT | RIGHT| + * ,------|------|------| |------+--------+------. + * | BSPC | DEL | PGUP | | UP | SPACE |RETURN| + * | / | / |------| |------| / | / | + * | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL | + * `--------------------' `----------------------' + * + */ +[BASE] = KEYMAP( + // left hand + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TILD, DV_QUOT, DV_COMM,DV_DOT, DV_P, DV_Y, DV_LBRC, + KC_TAB, DV_A, DV_O, DV_E, SFT_T(DV_U), LT(AUX, DV_I), + SFT_T(DV_LBRC), DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_LGUI, + KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX), + KC_HOME, KC_END, + KC_PGUP, + CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, DV_EQL, + DV_RBRC, DV_F, DV_G, DV_C, DV_R, DV_L, DV_SLSH, + LT(AUX, DV_D), SFT_T(DV_H), DV_T, DV_N, DV_S, DV_MINS, + KC_LGUI, DV_B, DV_M, DV_W, DV_V, DV_Z, SFT_T(DV_RBRC), + MO(AUX), KC_NO, KC_NO, KC_BSLS, KC_NO, + KC_LEFT, KC_RIGHT, + KC_UP, + KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC) + ), +/* Keymap 1: Aux layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | VolUp | | | | | | SLEEP | PWR | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | |PSCR |------+-----aan+------+------+------+--------| + * | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | TRANS| TRANS| | TRANS| TRANS| + * ,------|------|------| |------+------+------. + * | | | TRANS| | TRANS| | | + * |TRANS |TRANS |------| |------| TRANS| TRANS| + * | | | TRANS| | TRANS| | | + * `--------------------' `--------------------' + */ +[AUX] = KEYMAP( + // left hand + KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, + KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, + KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + LCTL(DV_S), LCTL(DV_Z), LCTL(DV_X), LCTL(DV_C), KC_TRNS, + KC_TRNS , KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO, + KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO, + KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO, + KC_TRNS , KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) +}; + + +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); + } else { + unregister_code(KC_RSFT); + } + 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); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +} diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md b/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md new file mode 100644 index 0000000000..0e1e94ffe1 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md @@ -0,0 +1,74 @@ +# Ergodox Dvorak Layout with emacs binding in mind - software version + +This configuration is the same as the dvorak_emacs layout, but using a sofware dvorak configuration +instead of a firmware configuration. This layout is for those who run their computer in dvorak mode. + + * Control & Alt key on the thumbs (activated if pressed with another key). + * In the same way, "U" and "R" are the shift modifier if pressed with another key. + * "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key. + * Software layout set to english. + +## Keymap Layers + - L0: dvorak with some customizations (see layout below) + - L1: auxiliary keys (includes function keys, numpad...) + + +### Keymap 0: Base layer +Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively + +

+
+,--------------------------------------------------.           ,--------------------------------------------------.
+|        |   1  |   2  |   3  |   4  |   5  |  Esc |           |  Esc |   6  |   7  |   8  |   9  |   0  |   =    |
+|--------|------|------|------|------|-------------|           |------|------|------|------|------|------|--------|
+|   ~    |  '   |   ,  |   .  |   P  |   Y  |   [  |           |   ]  |   F  |   G  |   C  |   H  |   L  |   /    |
+|--------|------|------|------|------|------|   {  |           |   }  |------|------|------|------|------|--------|
+|  Tab   |   A  |   O  |   E  |U/LSft| I/L1 |------|           |------|  D/L1|R/RSft|   T  |   N  |   S  |   -    |
+|--------|------|------|------|------|------| LGUI |           | LGUI |------|------|------|------|------|--------|
+| {/LSft |   ;  |   Q  |   J  |   K  |   X  |      |           |      |   B  |   M  |   W  |   V  |   Z  | }/RSft |
+`--------|------|------|------|------|-------------'           `-------------|------|------|------|------|--------'
+  |      |      |      |      | ~L1  |                                       | ~L1  |      |      |   \  |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       | HOME |  END |       | LEFT | RIGHT|
+                                ,------|------|------|       |------|--------|------.
+                                | BSPC |  DEL | PGUP |       |  UP  | SPACE  |RETURN|
+                                |  /   |  /   |------|       |------|   /    |  /   |
+                                | LCTL | LALT |PGDWN |       | DOWN | LALT   | LCTL |
+                                `--------------------'       `----------------------'
+
+
+ +### Keymap 1: Aux layer + +

+
+,--------------------------------------------------.           ,--------------------------------------------------.
+|  VolUp |      |      |      |      |      | SLEEP            | PWR  |      |      |      |      |      |        |
+|--------|------|------|------|------|-------------|           |------|------|------|------|------|------|--------|
+|  VolDn |  F1  |  F2  |  F3  |  F4  |      |      |           |      |      |   7  |   8  |   9  |   *  |        |
+|--------|------|------|------|------|------|      |           |      |------|------|------|------|------|--------|
+|        |  F5  |  F6  |  F7  |  F8  | TRANS|------|           |------|TRANS |   4  |   5  |   6  |   +  |        |
+|--------|------|------|------|------|------|      |           |PSCR  |------|------|------|------|------|--------|
+|  TRANS |  F9  |  F10 |  F11 |  F12 |      |      |           |      |      |   1  |   2  |   3  |   /  |  TRANS |
+`--------|------|------|------|------|-------------'           `-------------|------|------|------|------|--------'
+  |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS|                                       | TRANS|    . |   0  |   =  |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       | TRANS| TRANS|       | TRANS| TRANS|
+                                ,------|------|------|       |------|------|------.
+                                |      |      | TRANS|       | TRANS|      |      |
+                                |TRANS |TRANS |------|       |------| TRANS| TRANS|
+                                |      |      | TRANS|       | TRANS|      |      |
+                                `--------------------'       `--------------------'
+
+
+ + + +## Generation of .hex file +> In the "qmk_firmware/keyboards/ergodox" directory. + +> Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware". + +> Flash with `teensy_loader` binary -- cgit v1.2.3 From 57623805e8d73aa14adae1e76d5338911dfc31b2 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 16:36:35 +0700 Subject: Move caps to FUN layer; add Pause key --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 0c39da8248..aed5a81eef 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -700,17 +700,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | Ins | | PgUp | Up | PgDn | PgUp | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | + * | Caps | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | | | Home | End | | | + * | | F9 | F10 | F11 | F12 |Pause | | | Home | End | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_FUN] = KEYMAP( XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, - XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, - _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -935,7 +935,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // handle greek layer shift - // handle both shift = capslock case KC_LSFT: case KC_RSFT: ; @@ -949,13 +948,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_GREEKU); } } - } else { - if (record->event.pressed) { - if (lshift ^ rshift) { // if only one shift was pressed - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } - } } return true; break; -- cgit v1.2.3 From 3dab8a60fca182376d1df07d3f1e25882aa57be4 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Tue, 21 Feb 2017 16:40:38 +0700 Subject: added pause, prtsc & ins to list of keys to be processed on release --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index aed5a81eef..cf7c67339d 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -1039,9 +1039,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // only process Fnumber on key release, and only when layer switcher is still pressed. - // this is to avoid accidental presses + // this is to avoid accidental presses on potentially destructive keys case KC_F1 ... KC_F12: - if (!record->event.pressed && layer == _FUN) { + case KC_PAUS: + case KC_PSCR: + case KC_INS: + if (!record->event.pressed && layer == _FUN) { // key released and still in FUN layer register_code(keycode); unregister_code(keycode); } -- cgit v1.2.3 From 1316ca67af42dac619ddcf70b5fc3c9bfd8db4d2 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 21 Feb 2017 23:07:22 +0000 Subject: added hotkey cluster --- keyboards/planck/keymaps/callum/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 2acd988ea6..e1841dbd8b 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,7 +14,7 @@ extern keymap_config_t keymap_config; #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) - +#define H(X) LALT(LCTL(X)) enum planck_keycodes { MOVE = SAFE_RANGE, @@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {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, _______}, + {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, + {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From b06961c38ba66b351c4e3beed7f0c4b5750b6e8f Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 22 Feb 2017 12:26:13 +0000 Subject: updated readme --- keyboards/planck/keymaps/callum/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 71e200b9d7..1f8f92257d 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -6,7 +6,7 @@ This is a layout for the grid planck, built with a few ideals in mind: - 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. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster, a hotkey 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 @@ -23,11 +23,11 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -68,4 +68,4 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ - ``` +``` -- cgit v1.2.3 From 296b927e7740f23fc91f84ebac6ca0c85c654028 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 23 Feb 2017 18:10:00 +0700 Subject: Fix UNICODE_MAP input_mode problem --- quantum/process_keycode/process_unicodemap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 37f10df866..68a593a186 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,25 +1,26 @@ #include "process_unicodemap.h" +#include "process_unicode_common.h" __attribute__((weak)) const uint32_t PROGMEM unicode_map[] = { }; void register_hex32(uint32_t hex) { - uint8_t onzerostart = 1; + bool onzerostart = true; for(int i = 7; i >= 0; i--) { if (i <= 3) { - onzerostart = 0; + onzerostart = false; } uint8_t digit = ((hex >> (i*4)) & 0xF); if (digit == 0) { - if (onzerostart == 0) { + if (!onzerostart) { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); } } else { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); - onzerostart = 0; + onzerostart = false; } } } @@ -28,6 +29,7 @@ __attribute__((weak)) void unicode_map_input_error() {} bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { + uint8_t input_mode = get_unicode_input_mode(); if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { const uint32_t* map = unicode_map; uint16_t index = keycode - QK_UNICODE_MAP; -- cgit v1.2.3 From af29d0d0941ccc2aa67788b6eb1cb21116f39412 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Thu, 23 Feb 2017 18:10:00 +0700 Subject: Fix UNICODE_MAP input_mode problem --- quantum/process_keycode/process_unicodemap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 37f10df866..68a593a186 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -1,25 +1,26 @@ #include "process_unicodemap.h" +#include "process_unicode_common.h" __attribute__((weak)) const uint32_t PROGMEM unicode_map[] = { }; void register_hex32(uint32_t hex) { - uint8_t onzerostart = 1; + bool onzerostart = true; for(int i = 7; i >= 0; i--) { if (i <= 3) { - onzerostart = 0; + onzerostart = false; } uint8_t digit = ((hex >> (i*4)) & 0xF); if (digit == 0) { - if (onzerostart == 0) { + if (!onzerostart) { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); } } else { register_code(hex_to_keycode(digit)); unregister_code(hex_to_keycode(digit)); - onzerostart = 0; + onzerostart = false; } } } @@ -28,6 +29,7 @@ __attribute__((weak)) void unicode_map_input_error() {} bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { + uint8_t input_mode = get_unicode_input_mode(); if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { const uint32_t* map = unicode_map; uint16_t index = keycode - QK_UNICODE_MAP; -- cgit v1.2.3 From d0b4dcc82ce1dd8549c2f7416bf79f4d0c0f23a7 Mon Sep 17 00:00:00 2001 From: Phong Nguyen Date: Sat, 25 Feb 2017 19:49:03 +0700 Subject: Removes redundant {} which cause build failure when DEBUG_ACTION is set --- tmk_core/common/action_tapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index e16e11be7f..ff78d7f2ab 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -257,7 +257,7 @@ bool process_tapping(keyrecord_t *keyp) return true; } } else { - if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n") {}; + if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n"); process_record(keyp); return true; } -- cgit v1.2.3 From 138b89e1a169290b783548085c64f8dd13cc4175 Mon Sep 17 00:00:00 2001 From: Date: Mon, 27 Feb 2017 00:16:55 +0100 Subject: Add colemak_programmer --- .../ergodox/keymaps/colemak_programmer/Makefile | 1 + .../colemak_programmer/colemak_programmer_001.jpg | Bin 0 -> 301259 bytes .../colemak_programmer/colemak_programmer_002.jpg | Bin 0 -> 235864 bytes .../ergodox/keymaps/colemak_programmer/keymap.c | 256 +++++++++++++++++++++ .../ergodox/keymaps/colemak_programmer/readme.md | 21 ++ 5 files changed, 278 insertions(+) create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/Makefile create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/keymap.c create mode 100644 keyboards/ergodox/keymaps/colemak_programmer/readme.md diff --git a/keyboards/ergodox/keymaps/colemak_programmer/Makefile b/keyboards/ergodox/keymaps/colemak_programmer/Makefile new file mode 100644 index 0000000000..91b77c77ab --- /dev/null +++ b/keyboards/ergodox/keymaps/colemak_programmer/Makefile @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = no \ No newline at end of file diff --git a/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg new file mode 100644 index 0000000000..de24d93734 Binary files /dev/null and b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_001.jpg differ diff --git a/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg new file mode 100644 index 0000000000..15f8ec8c40 Binary files /dev/null and b/keyboards/ergodox/keymaps/colemak_programmer/colemak_programmer_002.jpg differ diff --git a/keyboards/ergodox/keymaps/colemak_programmer/keymap.c b/keyboards/ergodox/keymaps/colemak_programmer/keymap.c new file mode 100644 index 0000000000..1caccc5c29 --- /dev/null +++ b/keyboards/ergodox/keymaps/colemak_programmer/keymap.c @@ -0,0 +1,256 @@ +#include "ergodox.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * MEH: Alt+Control+Shift + * HYPER: Alt+Control+Shift+Gui + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` ~ | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | | 7 & | 8 * | 9 ( | 0 ) | - _ | = + | Backsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | F | P | G |TG(3) | |TG(4) | J | L | U | Y | ; : | ' " | + * |--------+------+------+------+------+------|F-lck | |N-lck |------+------+------+------+------+--------| + * | CAPS | A | R | S | T | D |------| |------| H | N | E | I | O | ENT | + * |--------+------+------+------+------+------| MEH | | MEH |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | K | M | , < | . > | UP | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCTL | LCTL | LGUI | LALT | LGUI | | RALT | RCTL | LEFT | DOWN | RIGHT| + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * | Esc | App | | Ins | Del | + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * | MO(2)| MO(4)|-------| |------| Space |Space | + * |symbol|N-Lock| End | | PgDn | | | + * `---------------------' `---------------------' + */ +[0] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(3), + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MEH, + KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_LGUI, + + KC_ESC, KC_APP, + KC_HOME, + MO(2), MO(4), KC_END, + + // right hand + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + TG(4), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_MEH, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, + + KC_INS, KC_DEL, + KC_PGUP, + KC_PGDN, KC_SPC, KC_SPC + ), + +/* Keymap 1: QWERTY layer (games) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[1] = KEYMAP( // layer 1: QWERTY layer (games) + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, + KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TRNS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_TRNS, + KC_TRNS, KC_N, KC_M, KC_TRNS, KC_TRNS, KC_TRNS, 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: Symbol Layer +* +* ,--------------------------------------------------. ,--------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +* | | | | + | < | % | # | DF(1)| | | & | [ | ] | \ | : | " | +* |--------+------+------+------+------+------|QWERTY| | |------+------+------+------+------+--------| +* | | ! | - | > | = | @ |------| |------| * | { | } | / | ? | | +* |--------+------+------+------+------+------| DF(0)| | |------+------+------+------+------+--------| +* | | NUBS | NUHS | / | $ | ^ |COLEMAK | | | | ( | ) | | | | +* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' +* | | | | | | | | | | | | +* `----------------------------------' `----------------------------------' +* ,-------------. ,-------------. +* | | | | | | +* ,------|------|------| |------+------+------. +* | | | | | | | | +* | | |------| |------| | | +* | | | | | | | | +* `--------------------' `--------------------' +*/ +// SYMBOLS +[2] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_PIPE, KC_PLUS, KC_LT, KC_PERC, KC_HASH, DF(1), + KC_LBRC, KC_EXCLAIM, KC_MINUS, KC_GT, KC_EQUAL, KC_AT, + KC_TRNS, KC_NUBS, KC_NUHS, KC_SLSH, KC_DOLLAR, KC_CIRC, DF(0), + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_AMPERSAND, KC_LBRC, KC_RBRC, KC_BSLS, KC_COLN, KC_DQT, + KC_ASTERISK, KC_LCBR, KC_RCBR, KC_SLSH, KC_QUES, KC_TRNS, + KC_TRNS, KC_PIPE, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, 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 3: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | HYPR | | HYPR | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// F-keys +[3] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, + 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HYPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 4: Numlock + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | |P-SCRE|S-LOCK|PAUSE | |NLOCK | CALC | = | / | * | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | Vol+ | 7 | 8 | 9 | - | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| Vol- | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | HYPR | | HYPR | Mute | 1 | 2 | 3 |Enter | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | . | RCTL | RCTL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------ |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[4] = KEYMAP( + RESET, KC_LSFT, KC_LSFT, KC_SYSREQ, KC_PSCR, KC_SLCK, KC_PAUSE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, + 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_NLCK, KC_CALC, KC_PEQL, KC_PSLS, KC_PAST, KC_LSFT, KC_TRNS, + KC_TRNS, KC_VOLU, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_TRNS, + KC_VOLD, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, + KC_HYPR, KC_MUTE, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, + KC_TRNS, KC_P0, KC_PDOT, KC_RCTL, KC_RCTL, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + static uint8_t state; + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + //reduce LED on time to 1/6th because LEDs are too strong + if (++state < 6) return; + state = 0; + + //bit 1: default layer 1 - QWERTY + if (default_layer_state & (1UL << 1)) ergodox_right_led_1_on(); + + uint8_t layer = biton32(layer_state); + + //layer 2 : Symbols (& Fs) + //if (layer == 2) ergodox_right_led_2_on(); + + //layer 3 : F-lock + if (layer == 3) ergodox_right_led_2_on(); + + //layer 4 : Num-lock + if (layer == 4) ergodox_right_led_3_on(); +}; diff --git a/keyboards/ergodox/keymaps/colemak_programmer/readme.md b/keyboards/ergodox/keymaps/colemak_programmer/readme.md new file mode 100644 index 0000000000..fae5e3553e --- /dev/null +++ b/keyboards/ergodox/keymaps/colemak_programmer/readme.md @@ -0,0 +1,21 @@ +# ErgoDox EZ colemak_programmer + +## Features + +* Qwerty and colemak 2 in 1 + * Use DF() macro to swap the bottom layer so it behaves literally as collemak or qwerty + * Graphical creator did not allow this so I had to use TO(0) and TO(1) on the picture +* Symbol layer programmers friendly + * Not only symbols are easy to access but common combination are easy too: ->, =>, !=, etc. +* Windows and Mac + * The extra repeated Win key is very handy on Mac +* Numlock + +I came to this layout after several iterations. It is not the ultimate best ergonomic layout but it is the best if you switch back and forth between ergodox and laptops. + +## Notes +* The Quote and Enter can be swapped +* If you use sculpted key caps try turning the bottom key 180 degrees so it became very comfortable to type with thumb. + +![Default](colemak_programer_001.jpg) +![Default](colemak_programer_002.jpg) \ No newline at end of file -- cgit v1.2.3 From bbbd49a1754c9b8cf2f69ca427fa5fe5630644f4 Mon Sep 17 00:00:00 2001 From: Date: Mon, 27 Feb 2017 00:27:57 +0100 Subject: Ammend readme.md --- keyboards/ergodox/keymaps/colemak_programmer/readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/ergodox/keymaps/colemak_programmer/readme.md b/keyboards/ergodox/keymaps/colemak_programmer/readme.md index fae5e3553e..db0cc5777a 100644 --- a/keyboards/ergodox/keymaps/colemak_programmer/readme.md +++ b/keyboards/ergodox/keymaps/colemak_programmer/readme.md @@ -17,5 +17,7 @@ I came to this layout after several iterations. It is not the ultimate best ergo * The Quote and Enter can be swapped * If you use sculpted key caps try turning the bottom key 180 degrees so it became very comfortable to type with thumb. -![Default](colemak_programer_001.jpg) -![Default](colemak_programer_002.jpg) \ No newline at end of file +Alternatively view the [graphical creator version](http://configure.ergodox-ez.com/keyboard_layouts/kmevwm/edit) but beware it is not the same due to the creator limitations. + +![Default](colemak_programmer_001.jpg) +![Default](colemak_programmer_002.jpg) \ No newline at end of file -- cgit v1.2.3 From c370c1e1f3c27027c0a6513d34a749a1a88603fc Mon Sep 17 00:00:00 2001 From: Gunther Gruber Date: Mon, 27 Feb 2017 09:48:58 +0100 Subject: guni keymap --- keyboard/ergodox_ez/keymaps/guni/keymap.c | 176 ++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 keyboard/ergodox_ez/keymaps/guni/keymap.c diff --git a/keyboard/ergodox_ez/keymaps/guni/keymap.c b/keyboard/ergodox_ez/keymaps/guni/keymap.c new file mode 100644 index 0000000000..fc8567e68c --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/guni/keymap.c @@ -0,0 +1,176 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( // layer 0 : default + // left hand + KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, + KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, + KC_NO , KC_NO , + KC_NO , + KC_BSPC,KC_DEL ,KC_FN23, + // right hand + KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, + KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, + KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, + KC_NO , KC_NO, + KC_NO , + KC_FN29,KC_ENT ,KC_SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, + KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, + KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, + LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, + KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,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( // layer 2: navigation + // left hand + KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, + KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, + KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, + KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + KEYMAP( // layer 3 : teensy bootloader functions + // left hand + KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // 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_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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( // layer 4: numpad + // 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, + // right hand + KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, + KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, + KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + [1] = ACTION_LAYER_SET(0, ON_PRESS), + //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), + //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), + + //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), + //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), + //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), + //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), + [23] = ACTION_LAYER_SET(3, ON_PRESS), + [24] = ACTION_LAYER_SET(2, ON_PRESS), + [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), + [26] = ACTION_LAYER_SET(1, ON_PRESS), + [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), + [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), + //[29] = ACTION_LAYER_TOGGLE(4), + [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), + [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), + [31] = ACTION_LAYER_MOMENTARY(2), + //[] = ACTION_LAYER_TAP_KEY(4, KC_S), +}; + + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void * matrix_init_user(void) { + +}; + + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} -- cgit v1.2.3 From 38cf08697b571e5efd55428a4682e248295091fb Mon Sep 17 00:00:00 2001 From: Gunther Gruber Date: Mon, 27 Feb 2017 09:55:24 +0100 Subject: small changes in guni.c keymap to work with new qmk_firmware packet --- keyboard/ergodox_ez/keymaps/guni/keymap.c | 176 ----------------------------- keyboards/ergodox/keymaps/guni/keymap.c | 177 ++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+), 176 deletions(-) delete mode 100644 keyboard/ergodox_ez/keymaps/guni/keymap.c create mode 100644 keyboards/ergodox/keymaps/guni/keymap.c diff --git a/keyboard/ergodox_ez/keymaps/guni/keymap.c b/keyboard/ergodox_ez/keymaps/guni/keymap.c deleted file mode 100644 index fc8567e68c..0000000000 --- a/keyboard/ergodox_ez/keymaps/guni/keymap.c +++ /dev/null @@ -1,176 +0,0 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( // layer 0 : default - // left hand - KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, - KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, - KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, - KC_NO , KC_NO , - KC_NO , - KC_BSPC,KC_DEL ,KC_FN23, - // right hand - KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, - KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, - KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, - KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, - KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, - KC_NO , KC_NO, - KC_NO , - KC_FN29,KC_ENT ,KC_SPC - ), - - KEYMAP( // layer 1 : function and symbol keys - // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, - KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, - KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1, - // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, - KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, - LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, - KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,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( // layer 2: navigation - // left hand - KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, - KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1 , - // right hand - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, - KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, - KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, - KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS - ), - KEYMAP( // layer 3 : teensy bootloader functions - // left hand - KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1 , - // 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_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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( // layer 4: numpad - // 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, - // right hand - KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, - KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, - KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, - KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, - KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS - ), - -}; - -/* id for user defined functions */ -enum function_id { - TEENSY_KEY, -}; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key - [1] = ACTION_LAYER_SET(0, ON_PRESS), - //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), - //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), - - //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), - //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), - //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), - [23] = ACTION_LAYER_SET(3, ON_PRESS), - [24] = ACTION_LAYER_SET(2, ON_PRESS), - [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), - [26] = ACTION_LAYER_SET(1, ON_PRESS), - [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), - [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), - //[29] = ACTION_LAYER_TOGGLE(4), - [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), - [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), - [31] = ACTION_LAYER_MOMENTARY(2), - //[] = ACTION_LAYER_TAP_KEY(4, KC_S), -}; - - -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); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void * matrix_init_user(void) { - -}; - - -void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) -{ - - if (id == TEENSY_KEY) { - clear_keyboard(); - print("\n\nJump to bootloader... "); - _delay_ms(250); - bootloader_jump(); // should not return - print("not supported.\n"); - } -} diff --git a/keyboards/ergodox/keymaps/guni/keymap.c b/keyboards/ergodox/keymaps/guni/keymap.c new file mode 100644 index 0000000000..f33829b8a4 --- /dev/null +++ b/keyboards/ergodox/keymaps/guni/keymap.c @@ -0,0 +1,177 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "bootloader.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( // layer 0 : default + // left hand + KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, + KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, + KC_NO , KC_NO , + KC_NO , + KC_BSPC,KC_DEL ,KC_FN23, + // right hand + KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, + KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, + KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, + KC_NO , KC_NO, + KC_NO , + KC_FN29,KC_ENT ,KC_SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, + KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, + KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, + LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, + KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,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( // layer 2: navigation + // left hand + KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, + KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, + KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, + KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + KEYMAP( // layer 3 : teensy bootloader functions + // left hand + KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // 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_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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( // layer 4: numpad + // 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, + // right hand + KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, + KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, + KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + [1] = ACTION_LAYER_SET(0, ON_PRESS), + //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), + //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), + + //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), + //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), + //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), + //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), + [23] = ACTION_LAYER_SET(3, ON_PRESS), + [24] = ACTION_LAYER_SET(2, ON_PRESS), + [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), + [26] = ACTION_LAYER_SET(1, ON_PRESS), + [27] = ACTION_LAYER_TAP_KEY(1, KC_CAPS), + [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), + //[29] = ACTION_LAYER_TOGGLE(4), + [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), + [30] = ACTION_LAYER_TAP_KEY(1, KC_QUOT), + [31] = ACTION_LAYER_MOMENTARY(2), + //[] = ACTION_LAYER_TAP_KEY(4, KC_S), +}; + + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} -- cgit v1.2.3 From e12b1a237cd4e9ce4191efb13987871a91b5916e Mon Sep 17 00:00:00 2001 From: John M Daly Date: Mon, 27 Feb 2017 21:42:25 -0500 Subject: Add initial version of TheVan Keyboards Roadkit Firmware --- keyboards/roadkit/Makefile | 3 + keyboards/roadkit/config.h | 162 ++++++++++++++++++++++++++++ keyboards/roadkit/keymaps/default/Makefile | 21 ++++ keyboards/roadkit/keymaps/default/config.h | 8 ++ keyboards/roadkit/keymaps/default/keymap.c | 49 +++++++++ keyboards/roadkit/keymaps/default/readme.md | 1 + keyboards/roadkit/keymaps/singles/Makefile | 21 ++++ keyboards/roadkit/keymaps/singles/config.h | 8 ++ keyboards/roadkit/keymaps/singles/keymap.c | 61 +++++++++++ keyboards/roadkit/keymaps/singles/readme.md | 3 + keyboards/roadkit/readme.md | 32 ++++++ keyboards/roadkit/roadkit.c | 28 +++++ keyboards/roadkit/roadkit.h | 33 ++++++ keyboards/roadkit/rules.mk | 69 ++++++++++++ 14 files changed, 499 insertions(+) create mode 100644 keyboards/roadkit/Makefile create mode 100644 keyboards/roadkit/config.h create mode 100644 keyboards/roadkit/keymaps/default/Makefile create mode 100644 keyboards/roadkit/keymaps/default/config.h create mode 100644 keyboards/roadkit/keymaps/default/keymap.c create mode 100644 keyboards/roadkit/keymaps/default/readme.md create mode 100644 keyboards/roadkit/keymaps/singles/Makefile create mode 100644 keyboards/roadkit/keymaps/singles/config.h create mode 100644 keyboards/roadkit/keymaps/singles/keymap.c create mode 100644 keyboards/roadkit/keymaps/singles/readme.md create mode 100644 keyboards/roadkit/readme.md create mode 100644 keyboards/roadkit/roadkit.c create mode 100644 keyboards/roadkit/roadkit.h create mode 100644 keyboards/roadkit/rules.mk diff --git a/keyboards/roadkit/Makefile b/keyboards/roadkit/Makefile new file mode 100644 index 0000000000..4e2a6f00fd --- /dev/null +++ b/keyboards/roadkit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/roadkit/config.h b/keyboards/roadkit/config.h new file mode 100644 index 0000000000..9596f7f3b2 --- /dev/null +++ b/keyboards/roadkit/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 0xFEAE +#define PRODUCT_ID 0x8846 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT Roadkit Micro +#define DESCRIPTION keyboard firmware for Roadkit Micro + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F5, D7, B4 } +#define MATRIX_COL_PINS { F1, F4, D6, D4 } +#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 + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * 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/roadkit/keymaps/default/Makefile b/keyboards/roadkit/keymaps/default/Makefile new file mode 100644 index 0000000000..f4671a9d11 --- /dev/null +++ b/keyboards/roadkit/keymaps/default/Makefile @@ -0,0 +1,21 @@ +# 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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/roadkit/keymaps/default/config.h b/keyboards/roadkit/keymaps/default/config.h new file mode 100644 index 0000000000..df06a26206 --- /dev/null +++ b/keyboards/roadkit/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/default/keymap.c b/keyboards/roadkit/keymaps/default/keymap.c new file mode 100644 index 0000000000..3fc18915a8 --- /dev/null +++ b/keyboards/roadkit/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +#include "roadkit.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 _NP 0 + +// Macro name shortcuts +#define NUMPAD M(_NP) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NP] = /* Numpad */ + KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ + KC_KP_4, KC_KP_5, KC_KP_6, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \ + KC_KP_0, KC_KP_DOT), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _NP: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NP); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/roadkit/keymaps/default/readme.md b/keyboards/roadkit/keymaps/default/readme.md new file mode 100644 index 0000000000..5984a71d1a --- /dev/null +++ b/keyboards/roadkit/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for roadkit diff --git a/keyboards/roadkit/keymaps/singles/Makefile b/keyboards/roadkit/keymaps/singles/Makefile new file mode 100644 index 0000000000..f4671a9d11 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/Makefile @@ -0,0 +1,21 @@ +# 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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/roadkit/keymaps/singles/config.h b/keyboards/roadkit/keymaps/singles/config.h new file mode 100644 index 0000000000..df06a26206 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singles/keymap.c b/keyboards/roadkit/keymaps/singles/keymap.c new file mode 100644 index 0000000000..5ee7a752b8 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/keymap.c @@ -0,0 +1,61 @@ +#include "roadkit.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 _NP 0 +#define _L1 1 + +// Macro name shortcuts +#define NUMPAD M(_NP) +#define LAYER1 M(_L1) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NP] = /* Numpad */ + SINGLES_KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \ + KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC), + [_L1] = /* LAYER 1 */ + SINGLES_KEYMAP(KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_VOLU, \ + KC_TRNS, KC_UP, KC_TRNS, KC_VOLD, \ + KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _L1: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_L1); + } + break; + case _NP: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_NP); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/roadkit/keymaps/singles/readme.md b/keyboards/roadkit/keymaps/singles/readme.md new file mode 100644 index 0000000000..48ea4a8b35 --- /dev/null +++ b/keyboards/roadkit/keymaps/singles/readme.md @@ -0,0 +1,3 @@ +# The singles keymap for roadkit + +This keymap has a base layer with numpad functionality, and then a second layer with some additional keys. The user is encouraged to develop their own keymap using this as a starting point. diff --git a/keyboards/roadkit/readme.md b/keyboards/roadkit/readme.md new file mode 100644 index 0000000000..d7480a1654 --- /dev/null +++ b/keyboards/roadkit/readme.md @@ -0,0 +1,32 @@ +roadkit keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the QMK Wiki](https://github.com/qmk/qmk_firmware/wiki). + +## Building + +Download or clone the whole firmware and navigate to the `keyboards/roadkit` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex. You can then use the programmer of your choice 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 default`. For the roadkit, the default layout is a standard numpad layout. + +### Singles + +The singles layout for the roadkit corresponds to the configuration where only 1u keys are used and there are 16 of them on the board. To build the singles keymap, run `make singles`. + +### 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 a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/roadkit/roadkit.c b/keyboards/roadkit/roadkit.c new file mode 100644 index 0000000000..26e0c51ec5 --- /dev/null +++ b/keyboards/roadkit/roadkit.c @@ -0,0 +1,28 @@ +#include "roadkit.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/roadkit/roadkit.h b/keyboards/roadkit/roadkit.h new file mode 100644 index 0000000000..b10e5740f3 --- /dev/null +++ b/keyboards/roadkit/roadkit.h @@ -0,0 +1,33 @@ +#ifndef ROADKIT_H +#define ROADKIT_H + +#include "quantum.h" + +// This is a shortcut to help you visually see your layout. +#define KEYMAP( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K32 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, KC_NO, K32, KC_NO } \ +} + +#define SINGLES_KEYMAP( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#endif diff --git a/keyboards/roadkit/rules.mk b/keyboards/roadkit/rules.mk new file mode 100644 index 0000000000..dbba6bace6 --- /dev/null +++ b/keyboards/roadkit/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= yes # 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 -- cgit v1.2.3 From 18ba21aa3123719461e007fd124074bb6c78960f Mon Sep 17 00:00:00 2001 From: Chris Helming Date: Tue, 28 Feb 2017 11:27:23 -0500 Subject: Update default maps for missing keys --- keyboards/planck/keymaps/default/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 1b1b998b20..d149019fed 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -102,16 +102,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_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_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_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {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_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_HOME, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Raise @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | S | T | P | H | * | * | F | P | L | T | D | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * | | S | K | W | R | * | * | R | B | G | S | Z | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Exit | | | A | O | | E | U | | | | * `-----------------------------------------------------------------------------------' @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -- cgit v1.2.3 From 71971e818f272196c29a80b4ce9a6ae3ac5b09bd Mon Sep 17 00:00:00 2001 From: folkert4 Date: Tue, 28 Feb 2017 17:49:42 -0500 Subject: Various QOL changes: Removed some unneeded keys from raise and lower layers moved the + and = signs, backspace is now more intuitive moved all the Function keys to CUSTOM layer added ctrl alt del to CUSTOM layer simplified the layout picture greatly --- .../planck/keymaps/espynn/keyboard-layout.jpg | Bin 52908 -> 53129 bytes keyboards/planck/keymaps/espynn/keymap.c | 22 ++-- keyboards/planck/keymaps/espynn/layout.json | 131 ++++++++++++--------- keyboards/planck/keymaps/espynn/readme.md | 12 +- 4 files changed, 95 insertions(+), 70 deletions(-) diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg index 55e5396bfd..c5e438f6af 100644 Binary files a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg 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 index 4a3fe32b8c..a24ad9d485 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM fn_actions[] = { [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), }; -// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l +// This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO 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}, @@ -69,22 +69,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_MINS, 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} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, S(KC_COMM), S(KC_DOT), KC_BSLS, 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} + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, CUS4, KC_TRNS, KC_F12, KC_TRNS}, + {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {BL, RESET, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} } }; diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json index 38ccc34529..ccdf2afdea 100644 --- a/keyboards/planck/keymaps/espynn/layout.json +++ b/keyboards/planck/keymaps/espynn/layout.json @@ -3,6 +3,7 @@ "backcolor": "#858585", "name": "Planck 40%", "author": "James Folkert", + "notes": "# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard\nAdded several custom functions to the keymap from the \"ab\" map. Special thanks to \"mollat\" for demonstration of macros in their keymap.c\n \n\n![Layout](keyboard-layout.png \"Practical Keymap\")\n\n* Online keyboard layout editor: http://goo.gl/mlLAFZ\n\n# Notes\n* Front legend text is the custom layer (both raise and lower)\n* Holding is denoted by down arrow, for example, right shift is an enter button when tapped, shift when held\n* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here\n* I disregarded the advice of Jack and used macros for passwords. I accept my fate.\n* RAISE and LOWER also acts as PgUp and PgDn when tapped.\n* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works)\n* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience.", "background": { "name": "Aluminium brushed", "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');" @@ -19,41 +20,49 @@ 2, 2, 0, - 2 + 0 ] }, - "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", + "!\n1\n\n\nF1\n\n\n\n\n", + "@\n2\n\n\nF2\n\n\n\n\nQ", + "#\n3\n\n\nF3\n\n\n\n\nW", + "$\n4\n\n\nF4\n\n\n\n\nE", + "%\n5\n\n\nF5\n\n\n\n\nR", + "^\n6\n\n\nF6\n\n\n\n\nT", + "&\n7\n\n\nF7\n\n\n\n\nY", + "*\n8\n\n\nF8\n\n\n\n\nU", + "(\n9\n\n\nF9\n\n\n\n\nI", { "fa": [ + 2, 0, 0, - 0, - 2 + 0 ] }, - "F10\n0\n\n)\n\n\n\n\n\nO", + ")\n0\n\n\nF10\n\n\n\n\nO", { "fa": [ 2, 2, 0, - 2 + 0, + 0, + 0, + 0, + 0, + 0 ] }, - "F11\n-\n\n_\n\n\n\n\n\nP", - "F12\n=\n\n+\n\n\n\n\n\n" + "_\n-\n\n\nF11\n\n\n\n\nP", + { + "a": 7, + "f": 3 + }, + "" ], [ { - "a": 7, "f": 3 }, "", @@ -66,12 +75,12 @@ }, "S", { + "a": 4, "f": 3 }, - "D", + "=\n_\n\n\n\n\n\n\n\nD", { "t": "#ff0000", - "a": 4, "f": 3 }, "\n(\n\n\n\n\n\n\n\nF", @@ -93,24 +102,21 @@ "t": "#000000", "f": 3 }, - "{\n\n\n\n\n\n\n\n\nK", + "+\n-\n\n\nMacro4\n\n\n\n\nK", { + "a": 7, "f": 3 }, - "{\n\n\n\n\n\n\n\n\nL", + "L", { + "a": 6, "fa": [ 2, 2, - 2, - 2, - 0, - 0, - 0, 2 ] }, - "\\\n\n|\n\n\n\n\n:\n\n;", + "\n\n:\n\nF12\n\n\n\n;", { "a": 7, "fa": [ @@ -141,66 +147,79 @@ "fa": [ 2, 2, - 2, - 2 + 0, + 0 ] }, - "\\\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\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 + 0, + 0, + 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,", { - "a": 6 + "fa": [ + 2, + 2, + 0 + ] }, - "\n\n?\n\n\n\n\n\n/", + ">\n\n\n\n\n\n\n>\n\n.", { - "a": 4, "fa": [ + 0, 2, - 2, + 0, + 0, + 0, + 0, + 0, + 2 + ] + }, + "\\\n\n\n\n\n\n\n?\n\n/", + { + "fa": [ + 0, 2, 0, 0, 0, 0, - 1, - 9, - 0 + 0, + 2, + 9 ] }, "\n\n\nShift\n\n\n\n\n\n\nShift" ], [ { - "a": 7, - "f": 3 + "a": 7 }, "Ctrl\n\n\n\nBLight", { "a": 4, "fa": [ - 2, + 0, 1, - 2, 0, 0, 0, 0, - 1, + 0, + 2, 9, 9 ] @@ -208,29 +227,29 @@ "\nZNorm\n\n\nRESET\n\n\n\n\n", { "fa": [ - 2, + 0, 1, - 2, 0, 0, 0, 0, - 1, + 0, + 2, 9, 6 ] }, - "\nZIn\n\n\n\n\n\n\n\n", + "\nZIn\n\n\nc.a.del\n\n\n\n\n", { "fa": [ - 2, + 0, 1, - 2, 0, 0, 0, 0, - 1, + 0, + 2, 9, 9 ] diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md index 8882f46011..ea84cf9552 100644 --- a/keyboards/planck/keymaps/espynn/readme.md +++ b/keyboards/planck/keymaps/espynn/readme.md @@ -3,7 +3,7 @@ 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") +![Layout](keyboard-layout.jpg "Practical Keymap") * Online keyboard layout editor: http://www.keyboard-layout-editor.com/ @@ -14,5 +14,11 @@ Added several custom functions to the keymap from the "ab" map. Special thanks t * 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 +* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. + +## changes +* Removed some unneeded keys from raise and lower layers +* moved the + and = signs, backspace is now more intuitive +* moved all the Function keys to CUSTOM layer +* added ctrl alt del to CUSTOM layer +* simplified the layout picture greatly \ No newline at end of file -- cgit v1.2.3 From a8a49276220ab6b91b0d8e40282c2ae5cb87444e Mon Sep 17 00:00:00 2001 From: Eric Dodd Date: Wed, 1 Mar 2017 21:39:19 -0500 Subject: gh60 spacefn --- keyboards/gh60/keymaps/unxmaal/Makefile | 112 +++++++++++ keyboards/gh60/keymaps/unxmaal/README.md | 20 ++ keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg | Bin 0 -> 1038926 bytes keyboards/gh60/keymaps/unxmaal/config.h | 190 +++++++++++++++++++ keyboards/gh60/keymaps/unxmaal/keymap.c | 228 +++++++++++++++++++++++ 5 files changed, 550 insertions(+) create mode 100644 keyboards/gh60/keymaps/unxmaal/Makefile create mode 100644 keyboards/gh60/keymaps/unxmaal/README.md create mode 100644 keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg create mode 100644 keyboards/gh60/keymaps/unxmaal/config.h create mode 100644 keyboards/gh60/keymaps/unxmaal/keymap.c diff --git a/keyboards/gh60/keymaps/unxmaal/Makefile b/keyboards/gh60/keymaps/unxmaal/Makefile new file mode 100644 index 0000000000..c73cf11417 --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/Makefile @@ -0,0 +1,112 @@ +#---------------------------------------------------------------------------- +# 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". +#---------------------------------------------------------------------------- + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + diff --git a/keyboards/gh60/keymaps/unxmaal/README.md b/keyboards/gh60/keymaps/unxmaal/README.md new file mode 100644 index 0000000000..52bf97ef4f --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/README.md @@ -0,0 +1,20 @@ +Unxmaal's GH60 Layout +===================== +* Mostly stolen from /u/robotmaxtron + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +* Standard Mac ANSI layout +* Spacebar acts as space when tapped, Fn when held +* Menu acts as menu when tapped, Fn2 when held +* Layer1: + * Top row = `~, F1-F12, Del + * JKIL = arrow cluster +* Layer2: + * Top row = media controls + * JKIL = PgDn/Up/Home/Insert + * Backspace = Reset + +### Additional Credits +Keymap has been based on various keymaps available from the QMK Repo for the GH60-SATAN and KC60 keyboards. diff --git a/keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg b/keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg new file mode 100644 index 0000000000..4ab8cc31ac Binary files /dev/null and b/keyboards/gh60/keymaps/unxmaal/WS2812-wiring.jpg differ diff --git a/keyboards/gh60/keymaps/unxmaal/config.h b/keyboards/gh60/keymaps/unxmaal/config.h new file mode 100644 index 0000000000..bb218d6fd4 --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/config.h @@ -0,0 +1,190 @@ +/* +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 geekhack +#define PRODUCT GH60 +#define DESCRIPTION t.m.k. keyboard firmware for GH60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +// Rev A +// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } +// Rev B/C +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 + +/* + * RGB Underglow + * These settings are for the F4 by default: + * + * + * #define ws2812_PORTREG PORTF + * #define ws2812_DDRREG DDRF + * #define ws2812_pin PF4 + * #define RGBLED_NUM 14 // Number of LEDs + * #define RGBLIGHT_HUE_STEP 10 + * #define RGBLIGHT_SAT_STEP 17 + * #define RGBLIGHT_VAL_STEP 17 + * + * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. + * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. + * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c +*/ + +/* Deprecated code below +#define ws2812_PORTREG PORTF +#define ws2812_DDRREG DDRF +#define ws2812_pin PF4 +*/ +#define RGB_DI_PIN F4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/gh60/keymaps/unxmaal/keymap.c b/keyboards/gh60/keymaps/unxmaal/keymap.c new file mode 100644 index 0000000000..7c9bd6a6d7 --- /dev/null +++ b/keyboards/gh60/keymaps/unxmaal/keymap.c @@ -0,0 +1,228 @@ +#include "gh60.h" +#include "action_layer.h" + +#define _BL 0 +#define _AL 1 +#define _FL 2 +#define _UL 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ANSI Base, Mac style + * ,-----------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | Backsp | + * |-----------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I| O| P| [| ]| \| + * |-----------------------------------------------------------------------------| + * |Caps/Fn | A| S| D| F| G| H| J| K| L| ;| '| Enter | + * |-----------------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | + * |-----------------------------------------------------------------------------| + * |Fn|Alt |Gui | Space(tapped), Fn(held) |Gui |Alt |Menu(tapped, Fn2(held)|Ctrl| + * `-----------------------------------------------------------------------------' + */ + [_BL] = KEYMAP( + KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, \ + KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, \ + KC_LCTL,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \ + KC_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \ + MO(1),KC_LALT,KC_LGUI, LT(1,KC_SPACE), KC_NO, KC_RGUI, KC_RALT, LT(2,KC_MENU), KC_RCTL), + + /* + * Pok3r style arrow cluster + * ,-----------------------------------------------------------. + * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL | + * |-----------------------------------------------------------| + * | | | | | | | | |Up| | | | | | + * |-----------------------------------------------------------| + * | | | | | | | |Left|Down|Right| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [_AL] = KEYMAP( + KC_GRV,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_DELETE, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + + + /* + * Secondary function layer + * ,-------------------------------------------------------------. + * | | | | | | | | RW|Play|FF| Mute| Vol Down | Vol up |Reset | + * |-------------------------------------------------------------| + * | | | | | | | | | |PgUp| | | | | + * |-------------------------------------------------------------| + * | | | | | | | |Home|PgDown|End| | | | + * |-------------------------------------------------------------| + * | | | | | | | | | | | | | + * |-------------------------------------------------------------| + * | | | | | | | | | + * `-------------------------------------------------------------' + */ + [_FL] = KEYMAP( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MPRV,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,RESET, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PGUP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_TRNS,KC_HOME,KC_PGDN,KC_END,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), + + /* + * Locking layer for controlling the underglow. + * NOTE: currently unused. + * + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | |On|Mode| | | | | | | | | | | + * |-----------------------------------------------------------| + * | | |Hue+|Hue-|Sat+|Sat-|Val+|Val-| | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [_UL] = KEYMAP( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS,F(6),F(7),F(8),F(9),F(10),F(11),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), +}; + +enum function_id { + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(2), // Momentary Fn overlay + [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay + [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer + [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay + [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow + [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode + [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), + [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), + [12] = ACTION_FUNCTION(SHIFT_ESC), + [13] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + +// Layer LED indicators +// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + uint32_t layer = layer_state; + if (layer & (1<<1)) { + gh60_wasd_leds_on(); + } else { + gh60_wasd_leds_off(); + } + + if (layer & (1<<2)) { + gh60_esc_led_on(); + } else { + gh60_esc_led_off(); + } +}; + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + case RGBLED_INCREASE_HUE: + if (record->event.pressed) { + rgblight_increase_hue(); + } + break; + case RGBLED_DECREASE_HUE: + if (record->event.pressed) { + rgblight_decrease_hue(); + } + break; + case RGBLED_INCREASE_SAT: + if (record->event.pressed) { + rgblight_increase_sat(); + } + break; + case RGBLED_DECREASE_SAT: + if (record->event.pressed) { + rgblight_decrease_sat(); + } + break; + case RGBLED_INCREASE_VAL: + if (record->event.pressed) { + rgblight_increase_val(); + } + break; + case RGBLED_DECREASE_VAL: + if (record->event.pressed) { + rgblight_decrease_val(); + } + break; + case RGBLED_STEP_MODE: + if (record->event.pressed) { + rgblight_step(); + } + break; + static uint8_t shift_esc_shift_mask; + // Shift + ESC = ~ + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}; -- cgit v1.2.3 From d35809a98289597fd437479422489118f78653ac Mon Sep 17 00:00:00 2001 From: Eric Dodd Date: Wed, 1 Mar 2017 21:40:13 -0500 Subject: gh60 satan spacefn --- keyboards/satan/keymaps/unxmaal/Makefile | 21 ++++++ keyboards/satan/keymaps/unxmaal/README.md | 20 +++++ keyboards/satan/keymaps/unxmaal/keymap.c | 119 ++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 keyboards/satan/keymaps/unxmaal/Makefile create mode 100644 keyboards/satan/keymaps/unxmaal/README.md create mode 100644 keyboards/satan/keymaps/unxmaal/keymap.c diff --git a/keyboards/satan/keymaps/unxmaal/Makefile b/keyboards/satan/keymaps/unxmaal/Makefile new file mode 100644 index 0000000000..ee94a67b4e --- /dev/null +++ b/keyboards/satan/keymaps/unxmaal/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/satan/keymaps/unxmaal/README.md b/keyboards/satan/keymaps/unxmaal/README.md new file mode 100644 index 0000000000..50ad0cf1fe --- /dev/null +++ b/keyboards/satan/keymaps/unxmaal/README.md @@ -0,0 +1,20 @@ +Unxmaal's GH60 Satan Layout +===================== +* Mostly stolen from /u/robotmaxtron + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +* Standard Mac ANSI layout +* Spacebar acts as space when tapped, Fn when held +* Menu acts as menu when tapped, Fn2 when held +* Layer1: + * Top row = `~, F1-F12, Del + * JKIL = arrow cluster +* Layer2: + * Top row = media controls + * JKIL = PgDn/Up/Home/Insert + * Backspace = Reset + +### Additional Credits +Keymap has been based on various keymaps available from the QMK Repo for the GH60-SATAN and KC60 keyboards. \ No newline at end of file diff --git a/keyboards/satan/keymaps/unxmaal/keymap.c b/keyboards/satan/keymaps/unxmaal/keymap.c new file mode 100644 index 0000000000..657602de02 --- /dev/null +++ b/keyboards/satan/keymaps/unxmaal/keymap.c @@ -0,0 +1,119 @@ +#include "satan.h" + + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _AL 1 +#define _FL 2 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ANSI Base, Mac style + * ,-----------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | Backsp | + * |-----------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I| O| P| [| ]| \| + * |-----------------------------------------------------------------------------| + * |Caps/Fn | A| S| D| F| G| H| J| K| L| ;| '| Enter | + * |-----------------------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | + * |-----------------------------------------------------------------------------| + * |Fn|Alt |Gui | Space(tapped), Fn(held) |Gui |Alt |Menu(tapped, Fn2(held)|Ctrl| + * `-----------------------------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(_AL), KC_LALT,KC_LGUI, LT(_AL,KC_SPACE), KC_RGUI, KC_RALT, LT(_FL,KC_MENU), KC_RCTL), + /* + * Pok3r style arrow cluster + * ,-----------------------------------------------------------. + * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL | + * |-----------------------------------------------------------| + * | | | | | | | | |Up| | | | | | + * |-----------------------------------------------------------| + * | | | | | | | |Left|Down|Right| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ +[_AL] = KEYMAP_ANSI( + KC_GRV, KC_F1, KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_DELETE, \ + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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 _FL: Function Layer + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | RESET| + * |-----------------------------------------------------------| + * | | | | | | | | | | | |BL-|BL+|BL | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | RGB on|RGB step|Hue+|Hue- |Sat+|Sat-|Val+| Val-| | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + #ifdef RGBLIGHT_ENABLE + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______, _______), + #else + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, BL_INC,BL_TOGG, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______), + #endif +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} -- cgit v1.2.3 From 61459ab5ba75ba4176589098b659a7a1d5eaf669 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 2 Mar 2017 11:40:25 +0000 Subject: moar hotkeys --- keyboards/planck/keymaps/callum/keymap.c | 14 +++++++------- keyboards/planck/keymaps/callum/readme.md | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index e1841dbd8b..aede27df75 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, - {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),H(KC_8), KC_HOME, KC_UP, KC_END, H(KC_7), KC_ESC }, + {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),H(KC_9),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), H(KC_A), KC_PGDN, KC_PGUP, H(KC_5), H(KC_6), _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNC] = { {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU}, {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD}, - {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER,XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 1f8f92257d..4d4e5cdd78 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -6,7 +6,7 @@ This is a layout for the grid planck, built with a few ideals in mind: - 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, a hotkey 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. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster, other movement keys, and hotkeys; 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 @@ -23,11 +23,11 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| | Home | Up | End | | Esc | + * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| | Left | Down | Right| Caps | Del | + * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | | Pg Dn| Pg Up| | | | + * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' -- cgit v1.2.3 From 08cba6c09b505340ec6c1932df4b17aab1816d97 Mon Sep 17 00:00:00 2001 From: Joshua Colbeck Date: Tue, 7 Mar 2017 09:43:08 -0600 Subject: Fixed minor error in ergodox infinity section. --- keyboards/ergodox/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 45b3354c1c..5e50548be3 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -100,7 +100,7 @@ for the left and right halves seperately. To flash them: - Install the firmware with `sudo make infinity-keymapname-dfu-util` - - Build left hand firmware with `make infinity-keymapname MASTER=right` + - Build right hand firmware with `make infinity-keymapname MASTER=right` - Plug in the right hand keyboard only. -- cgit v1.2.3 From 1023a47be6b91282b92b9a44f4492aa88375bf8e Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 22 Feb 2017 16:51:25 -0500 Subject: Copy CMD60 as starting point and rename files --- keyboards/handwired/magicforce68/README.md | 35 +++++ keyboards/handwired/magicforce68/config.h | 162 +++++++++++++++++++++ .../magicforce68/keymaps/default/keymap.c | 66 +++++++++ keyboards/handwired/magicforce68/magicforce68.c | 8 + keyboards/handwired/magicforce68/magicforce68.h | 20 +++ keyboards/handwired/magicforce68/rules.mk | 73 ++++++++++ 6 files changed, 364 insertions(+) create mode 100644 keyboards/handwired/magicforce68/README.md create mode 100644 keyboards/handwired/magicforce68/config.h create mode 100644 keyboards/handwired/magicforce68/keymaps/default/keymap.c create mode 100644 keyboards/handwired/magicforce68/magicforce68.c create mode 100644 keyboards/handwired/magicforce68/magicforce68.h create mode 100644 keyboards/handwired/magicforce68/rules.mk diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md new file mode 100644 index 0000000000..83e371543e --- /dev/null +++ b/keyboards/handwired/magicforce68/README.md @@ -0,0 +1,35 @@ +CMD60 keyboard firmware +====================== + +##CMD60 + +This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work +with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2 +and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to +achieve a higher level of productivity if you take the time to learn its function layers. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 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 + +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 **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h new file mode 100644 index 0000000000..9671b66bad --- /dev/null +++ b/keyboards/handwired/magicforce68/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 Hexwire +#define PRODUCT Magicforce 68 +#define DESCRIPTION Advanced Programming Keeb Layout + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * 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 { F0, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 } +#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 + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * 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/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c new file mode 100644 index 0000000000..9f9cbcd661 --- /dev/null +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +#include "CMD60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( /* CMD60 - QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + LT(3, KC_ENT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \ + ), + [1] = KEYMAP( /* CMD60 - GameMode */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \ + KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [2] = KEYMAP( /* CMD60 - Arrows */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [3] = KEYMAP( /* CMD60 - Functions */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \ + KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = KEYMAP( /* CMD60 - Mouse */ + KC_SYSTEM_SLEEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [5] = KEYMAP( /* CMD60 - Media */ + KC_SYSTEM_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \ + KC_TRNS, 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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/handwired/magicforce68/magicforce68.c b/keyboards/handwired/magicforce68/magicforce68.c new file mode 100644 index 0000000000..84b1007e2c --- /dev/null +++ b/keyboards/handwired/magicforce68/magicforce68.c @@ -0,0 +1,8 @@ +#include "magicforce68.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h new file mode 100644 index 0000000000..de465a828f --- /dev/null +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -0,0 +1,20 @@ +#ifndef MAGICFORCE68_H +#define MAGICFORCE68_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk new file mode 100644 index 0000000000..7117599173 --- /dev/null +++ b/keyboards/handwired/magicforce68/rules.mk @@ -0,0 +1,73 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# 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 + + -- cgit v1.2.3 From 6ee823a821d9c89a67c53f65ecf4d745223694a0 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Sun, 26 Feb 2017 10:16:24 -0500 Subject: Add rule for flashing microcontroller using avrdude --- keyboards/handwired/magicforce68/rules.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 7117599173..e897ef2523 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -70,4 +70,14 @@ ifndef QUANTUM_DIR include ../../../Makefile endif +avrdude: build + ls /dev/tty* > /tmp/1; \ + 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 From f3aef727e174279e69d8d5831d859d00802eb8c4 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 11:41:10 -0500 Subject: Set pinout and layout --- keyboards/handwired/magicforce68/config.h | 6 +- .../magicforce68/keymaps/default/keymap.c | 90 ++++++++++++---------- keyboards/handwired/magicforce68/magicforce68.h | 20 ++--- 3 files changed, 61 insertions(+), 55 deletions(-) diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 9671b66bad..8a49b09353 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 14 +#define MATRIX_COLS 15 /* * Keyboard Matrix Assignments @@ -42,8 +42,8 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { F0, F4, F5, F6, F7 } -#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 } +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c index 9f9cbcd661..628249c2d8 100644 --- a/keyboards/handwired/magicforce68/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -1,52 +1,58 @@ -#include "CMD60.h" +#include "magicforce68.h" + +#define _QWERTY 0 +#define _FN1 1 +#define _FN2 2 +#define KC_ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( /* CMD60 - QWERTY */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - LT(3, KC_ENT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \ - ), - [1] = KEYMAP( /* CMD60 - GameMode */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \ - KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [2] = KEYMAP( /* CMD60 - Arrows */ - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [3] = KEYMAP( /* CMD60 - Functions */ - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \ - KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + [_QWERTY] = KEYMAP( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, + /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, + /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ + FN0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , + /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ + LCTL ,LGUI ,LALT , SPACE , FN1 ,RALT ,RCTL , LEFT,DOWN,RGHT + /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ ), - [4] = KEYMAP( /* CMD60 - Mouse */ - KC_SYSTEM_SLEEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [5] = KEYMAP( /* CMD60 - Media */ - KC_SYSTEM_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + + [_FN1] = KEYMAP( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , , , , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , , , , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , ,MUTE, , , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ), + + [_FN2] = KEYMAP( + /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, + /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ + , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, + /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ + , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , + /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ + , , , , , , 0 , 1 , 2 , 3 , , , MUTE, + /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ + , , , , , , , MPRV,MPLY,MNXT + /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + ) }; const uint16_t PROGMEM fn_actions[] = { - + [0] = LT(KC_FN2, KC_GRV), + [1] = MO(_FN1), + [2] = MO(_FN2), }; diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h index de465a828f..cfcdce38d5 100644 --- a/keyboards/handwired/magicforce68/magicforce68.h +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -4,17 +4,17 @@ #include "quantum.h" #define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ } #endif \ No newline at end of file -- cgit v1.2.3 From 2cd2ac02d1c215167a1d82d675dc7cab1d5d90be Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 12:19:29 -0500 Subject: Add readme file --- keyboards/handwired/magicforce68/README.md | 39 +++++++-------------- keyboards/handwired/magicforce68/wiring-layout.png | Bin 0 -> 73739 bytes 2 files changed, 12 insertions(+), 27 deletions(-) create mode 100644 keyboards/handwired/magicforce68/wiring-layout.png diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md index 83e371543e..4f0ccecf99 100644 --- a/keyboards/handwired/magicforce68/README.md +++ b/keyboards/handwired/magicforce68/README.md @@ -1,35 +1,20 @@ -CMD60 keyboard firmware -====================== +Magicforce 68 Handwired +======================= -##CMD60 +This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro. -This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work -with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2 -and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to -achieve a higher level of productivity if you take the time to learn its function layers. +## Wiring Layout -## Quantum MK Firmware +![Wiring Layout](wiring-layout.png) -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). +## Pinout -## Building +The following pins are used: +- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 +- Rows 1-5: F0, F1, F4, F5, F6 -Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 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. +## Compiling and loading the firmware -Depending on which keymap you would like to use, you will have to compile slightly differently. +To build the firmware, run `make`. -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -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 **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button. diff --git a/keyboards/handwired/magicforce68/wiring-layout.png b/keyboards/handwired/magicforce68/wiring-layout.png new file mode 100644 index 0000000000..816b10b2b5 Binary files /dev/null and b/keyboards/handwired/magicforce68/wiring-layout.png differ -- cgit v1.2.3 From 38a83700c3c21326e691452c4dc002d398812679 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 12:29:48 -0500 Subject: Update description --- keyboards/handwired/magicforce68/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 8a49b09353..1e2b7d3e73 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -26,7 +26,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Hexwire #define PRODUCT Magicforce 68 -#define DESCRIPTION Advanced Programming Keeb Layout +#define DESCRIPTION Handwired Magicforce 68 /* key matrix size */ #define MATRIX_ROWS 5 -- cgit v1.2.3 From a9959783c0a190410307e3e6cc1be4c024e9cddd Mon Sep 17 00:00:00 2001 From: stites Date: Tue, 7 Mar 2017 11:45:47 -0500 Subject: Add freebsd support in "util/install_dependencies.sh" A simple addition to the `install_dependencies` script which remaps the debian dependencies to their freebsd package-names. After a recursive clone and using gmake, I can successfully build all firmware from the root directory (minus some warnings generated by gcc-4.9.4 which I can procure on request). however there is a problem running tests. --- util/install_dependencies.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/util/install_dependencies.sh b/util/install_dependencies.sh index 936a865938..1b73a8b3bf 100755 --- a/util/install_dependencies.sh +++ b/util/install_dependencies.sh @@ -92,4 +92,23 @@ elif [[ -n "$(type -P zypper)" ]]; then # TODO: The avr and eabi tools are not available as default packages, so we need # another way to install them +elif [[ -n "$(type -P pkg)" ]]; then + # FreeBSD + pkg update + pkg install -y \ + git \ + wget \ + gmake \ + gcc \ + zip \ + unzip \ + avr-binutils \ + avr-gcc \ + avr-libc \ + dfu-programmer \ + dfu-util \ + arm-none-eabi-gcc \ + arm-none-eabi-binutils \ + arm-none-eabi-newlib \ + diffutils fi -- cgit v1.2.3 From 7042af702057d4d129f1517712fab7f28e75b2f3 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 23:06:41 -0500 Subject: Add Makefile --- keyboards/handwired/magicforce68/Makefile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 keyboards/handwired/magicforce68/Makefile diff --git a/keyboards/handwired/magicforce68/Makefile b/keyboards/handwired/magicforce68/Makefile new file mode 100644 index 0000000000..191c6bb664 --- /dev/null +++ b/keyboards/handwired/magicforce68/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3 From 3d082382b20ab338bb7f41b33329daffc994169a Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 7 Mar 2017 23:08:44 -0500 Subject: Fix function layer actions --- keyboards/handwired/magicforce68/keymaps/default/keymap.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c index 628249c2d8..22553f714c 100644 --- a/keyboards/handwired/magicforce68/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -4,6 +4,8 @@ #define _FN1 1 #define _FN2 2 #define KC_ KC_TRNS +#define KC_X0 LT(_FN2, KC_GRV) +#define KC_X1 MO(_FN1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KEYMAP( @@ -12,11 +14,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ - FN0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , + X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ - LCTL ,LGUI ,LALT , SPACE , FN1 ,RALT ,RCTL , LEFT,DOWN,RGHT + LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ ), @@ -49,13 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = LT(KC_FN2, KC_GRV), - [1] = MO(_FN1), - [2] = MO(_FN2), -}; - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function -- cgit v1.2.3 From cd1eb8d24649662dcc1e916634beb481c98173d7 Mon Sep 17 00:00:00 2001 From: Gunther Gruber Date: Wed, 8 Mar 2017 11:13:19 +0100 Subject: added readme file --- keyboards/ergodox/keymaps/guni/readme.txt | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 keyboards/ergodox/keymaps/guni/readme.txt diff --git a/keyboards/ergodox/keymaps/guni/readme.txt b/keyboards/ergodox/keymaps/guni/readme.txt new file mode 100644 index 0000000000..93ae5f0567 --- /dev/null +++ b/keyboards/ergodox/keymaps/guni/readme.txt @@ -0,0 +1,133 @@ +My main layout (Layer 0) is based on qwerty. I tried to fit the layout of the kinesis keyboard onto the ergodox. Furthermore I did some tweaks. +The other layers are seldom used. Except the F Keys and the teensy key. As I own a ergodox I cant press the reset button, so i need a key to send the teensy into reprogram mode. +There is a layer with symbols a numpad. These layers are seldom used. Except the F Keys and the teensy key. As I own a ergodox I need a key to reprogram, because I can't access the reset button. + +I am a linux user and need the esc key and str keys often therefore it is easyly accessed. Switching console str+alt+tab+f2 (layer 2 and 2) is tricky but you get it after a while. +As I live in germany and need to type umlaut frquently, i mapped the CAPS to the meta key, and swapped ' and ". So I can type ö with CAPS o + ¨. no need to press o+SHIFT+' +As a note for linux users i use str+p to get last command, instead of using the cursor keys. + +HOWTO to convert CAPS to Meta-Key and swap ' with " + +* create file with following content +.Xmodmap + clear Lock + keycode 48 = quotedbl apostrophe quotedbl apostrophe + keycode 66 = Multi_key + +* apply with +xmodmap .Xmodmap + +* convert to xkbmap +xkbcomp $DISPLAY $HOME/.xkbmap + +* automatic startup each time you startup x +echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc + + KEYMAP( // layer 0 : default + // left hand + KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, + KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, + KC_FN27 , KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, + KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, + KC_NO , KC_NO , + KC_NO , + KC_BSPC,KC_DEL ,KC_FN23, + // right hand + KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, + KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, KC_FN28, + KC_H , KC_J, KC_K , KC_L, KC_SCLN,KC_FN30, + KC_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,KC_FN29, + KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, + KC_NO , KC_NO, + KC_NO , + KC_FN29,KC_ENT ,KC_SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, + KC_TRNS,KC_BSLS,KC_SLSH,KC_LCBR ,KC_RCBR ,KC_ASTR, + KC_TRNS,KC_HASH ,KC_DLR ,KC_PIPE ,KC_TILD ,KC_GRV ,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, + LSFT(KC_SLSH),KC_LPRN,KC_RPRN,KC_MINS,LSFT(KC_SCLN),KC_TRNS, + KC_TRNS,KC_PLUS,LSFT(KC_5),LSFT(KC_QUOT),KC_QUOT,KC_SCLN,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( // layer 2: navigation + // left hand + KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, + KC_TRNS,KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO,KC_NO,KC_NO, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, + KC_NO, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,KC_TRNS, + KC_LEFT, KC_DOWN,KC_RGHT,KC_PGDN,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + KEYMAP( // layer 3 : teensy bootloader functions + // left hand + KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_FN1 , + // 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_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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( // layer 4: numpad + // 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, + // right hand + KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PAST,KC_PMNS,KC_BSPC, + KC_TRNS,KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS,KC_BSPC, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + KC_TRNS,KC_NO, KC_P1, KC_P2, KC_P3, KC_PPLS,KC_PENT, + KC_P0, KC_PDOT,KC_SLSH,KC_PENT,KC_PENT, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS + ), + +}; + + -- cgit v1.2.3 From 2aa079d93e31403debd467fb4eed98fb98cced0f Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 20:41:35 +0100 Subject: Left control and alt Use the left control and the left alt key. --- quantum/quantum_keycodes.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 63b626926d..903d57f1ee 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -183,6 +183,7 @@ enum quantum_keycodes { #define ALTG(kc) (kc | QK_RCTL | QK_RALT) #define SCMD(kc) (kc | QK_LGUI | QK_LSFT) #define SWIN(kc) SCMD(kc) +#define LCA(kc) (kc | QK_LCTL | QK_LALT) #define MOD_HYPR 0xf #define MOD_MEH 0x7 @@ -339,6 +340,7 @@ enum quantum_keycodes { #define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ #define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) #define SWIN_T(kc) SCMD_T(kc) +#define LCA_T(kc) MT((MOD_LCTL | MOD_LALT), kc) // Left control and left alt // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) -- cgit v1.2.3 From 8cc70f4d9dd75e4efb186ec71ee4a3a7a0dd4587 Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 20:58:55 +0100 Subject: Added german-lukas Added my keymap called germman-lukas. --- keyboards/ergodox/keymaps/german-lukas/keymap.c | 235 ++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 keyboards/ergodox/keymaps/german-lukas/keymap.c diff --git a/keyboards/ergodox/keymaps/german-lukas/keymap.c b/keyboards/ergodox/keymaps/german-lukas/keymap.c new file mode 100644 index 0000000000..f6709595ec --- /dev/null +++ b/keyboards/ergodox/keymaps/german-lukas/keymap.c @@ -0,0 +1,235 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_german.h" + +// Layer names +#define BASE 0 // default layer +#define SYMB 1 // symbol layer +#define MDIA 2 // media keys +#define SHRT 3 // shortcut layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Caps | 1 | 2 | 3 | 4 | 5 |X ` X| | PRSC | 6 | 7 | 8 | 9 | 0 | ß | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | Ü | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä/L2 | + * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * | LShift | Y | X | C | V | B | | | | N | M | , | . | - | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGui | ^ | < | LEFT | RIGHT| | Up | Down | # | + | LCA | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | CTRL | ALT | | Alt |Ctrl/Esc| + * ,------+------+------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Del |------| |------| Bkspc | Enter| + * | | | 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_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, DE_ACUT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT, + KC_LCTRL, KC_LALT, + KC_HOME, + KC_SPC ,KC_DELT,KC_END, + // right hand + KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UE), + KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, + KC_UP, KC_DOWN, DE_HASH, DE_PLUS, LCA_T(KC_NO), + KC_RALT, KC_RCTRL, + KC_PGUP, + KC_PGDN, KC_BSPC, KC_ENT + ), + +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, + KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV, + KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_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, + // 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, DE_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, KC_TRNS, + KC_TRNS, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, DE_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | |VolDwn| Mute |VolUp | | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Btn4 |MsLeft|MsDown|MsRght| Btn5 |------| |------| | Prev | Stop | Play | Next | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |WhRght|WhDown| WhUp |WhLeft|WhClk | | | |BwSrch|BwBack|BwHome|BwRefr|BwFwd | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | |MsAcl0|MsAcl1|MsAcl2| | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | |Brwser|Brwser| + * | Lclk | Rclk |------| |------|Back |Forwd | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + // left hand + KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, + KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + // right hand + KC_TRNS, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11, + KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12, + KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS, + KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_WBAK, KC_WFWD +), + +/* Keymap 3: Linux shortcuts + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |LCA-F1|LCA-F2|LCA-F3|LCA-F4|LCA-F5| | | |LCA-F6|LCA-F7|LCA-F8|LCA-F9| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |LCA-Le| |LCA-Ri| |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | |LCA-Le|LCA-Ri| | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[SHRT] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), KC_TRNS, + KC_TRNS, KC_TRNS, LCA(KC_LEFT), KC_TRNS, LCA(KC_RIGHT), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_LEFT), LCA(KC_RIGHT), + 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, LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + LCA(KC_UP), LCA(KC_DOWN), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +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) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + 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); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case SYMB: + ergodox_right_led_1_on(); + break; + case MDIA: + ergodox_right_led_2_on(); + break; + case SHRT: + ergodox_right_led_3_on(); + break; + default: + ergodox_board_led_off(); + break; + } + +}; -- cgit v1.2.3 From 2f5143e219c8410cfaeeadb87782b3dc212aa3b9 Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 21:09:51 +0100 Subject: Corrected the description of the layer Corrected the description of the Shortcuts layer. --- keyboards/ergodox/keymaps/german-lukas/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/german-lukas/keymap.c b/keyboards/ergodox/keymaps/german-lukas/keymap.c index f6709595ec..c6e9f2f900 100644 --- a/keyboards/ergodox/keymaps/german-lukas/keymap.c +++ b/keyboards/ergodox/keymaps/german-lukas/keymap.c @@ -162,8 +162,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// MEDIA AND MOUSE +// Shortcuts [SHRT] = KEYMAP( + // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_LEFT), KC_TRNS, LCA(KC_RIGHT), KC_TRNS, -- cgit v1.2.3 From 34fa8fd5d3f0c46135f22d5d24b098c9e7117b67 Mon Sep 17 00:00:00 2001 From: Lukas Stiebig Date: Wed, 8 Mar 2017 21:14:16 +0100 Subject: readme Added a readme.md file for the keymap german-lukas. --- keyboards/ergodox/keymaps/german-lukas/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/ergodox/keymaps/german-lukas/README.md diff --git a/keyboards/ergodox/keymaps/german-lukas/README.md b/keyboards/ergodox/keymaps/german-lukas/README.md new file mode 100644 index 0000000000..3566b4ee64 --- /dev/null +++ b/keyboards/ergodox/keymaps/german-lukas/README.md @@ -0,0 +1,12 @@ +# About this keymap + +This keymap is based on the qwertz layout. +It has a key for pressing the left control and the left alt key at once. + +Linux makes a difference between AltGr and Control + Alt. Some keybindings are easier to press now. + +Also, I added a layer for pressing Control + Alt + F-Keys very fast. + +# Layer + +Each layer in the *keymap.c*-file has a comment showing the mappings of the layer. -- cgit v1.2.3