From c1f143124d07ddd1023d5d5e86b7c3b93961667f Mon Sep 17 00:00:00 2001 From: Ryan Ascheman Date: Tue, 19 Apr 2016 14:21:23 -0700 Subject: initial changes, no doc changes --- keyboard/ergodox_ez/keymaps/phoenix/default.png | Bin 0 -> 193672 bytes .../ergodox_ez/keymaps/phoenix/default_highres.png | Bin 0 -> 1459389 bytes keyboard/ergodox_ez/keymaps/phoenix/keymap.c | 184 +++++++++++++++++++++ keyboard/ergodox_ez/keymaps/phoenix/readme.md | 10 ++ 4 files changed, 194 insertions(+) create mode 100644 keyboard/ergodox_ez/keymaps/phoenix/default.png create mode 100644 keyboard/ergodox_ez/keymaps/phoenix/default_highres.png create mode 100644 keyboard/ergodox_ez/keymaps/phoenix/keymap.c create mode 100644 keyboard/ergodox_ez/keymaps/phoenix/readme.md diff --git a/keyboard/ergodox_ez/keymaps/phoenix/default.png b/keyboard/ergodox_ez/keymaps/phoenix/default.png new file mode 100644 index 000000000..6575f7b5e Binary files /dev/null and b/keyboard/ergodox_ez/keymaps/phoenix/default.png differ diff --git a/keyboard/ergodox_ez/keymaps/phoenix/default_highres.png b/keyboard/ergodox_ez/keymaps/phoenix/default_highres.png new file mode 100644 index 000000000..7d9f045f4 Binary files /dev/null and b/keyboard/ergodox_ez/keymaps/phoenix/default_highres.png differ diff --git a/keyboard/ergodox_ez/keymaps/phoenix/keymap.c b/keyboard/ergodox_ez/keymaps/phoenix/keymap.c new file mode 100644 index 000000000..86aae910d --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/phoenix/keymap.c @@ -0,0 +1,184 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | Home | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | End | | PgUp | | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | LGui | | 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_HOME, + KC_END, + KC_SPC,KC_BSPC,KC_LGUI, + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,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_TRNS,KC_TRNS,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_TRNS, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// 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_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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + 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) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboard/ergodox_ez/keymaps/phoenix/readme.md b/keyboard/ergodox_ez/keymaps/phoenix/readme.md new file mode 100644 index 000000000..8f6dba45e --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/phoenix/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ Default Configuration + +## Changelog + +* Feb 2, 2016 (V1.1): + * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). + +This is what we ship with out of the factory. :) The image says it all: + +![Default](default_highres.png) -- cgit v1.2.3 From 7929ee487918a306520a680f4670a9812ff7b650 Mon Sep 17 00:00:00 2001 From: Ryan Ascheman Date: Mon, 25 Apr 2016 15:40:52 -0700 Subject: update readme --- keyboard/ergodox_ez/keymaps/phoenix/default.png | Bin 193672 -> 0 bytes .../ergodox_ez/keymaps/phoenix/default_highres.png | Bin 1459389 -> 0 bytes keyboard/ergodox_ez/keymaps/phoenix/readme.md | 12 ++++++------ 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 keyboard/ergodox_ez/keymaps/phoenix/default.png delete mode 100644 keyboard/ergodox_ez/keymaps/phoenix/default_highres.png diff --git a/keyboard/ergodox_ez/keymaps/phoenix/default.png b/keyboard/ergodox_ez/keymaps/phoenix/default.png deleted file mode 100644 index 6575f7b5e..000000000 Binary files a/keyboard/ergodox_ez/keymaps/phoenix/default.png and /dev/null differ diff --git a/keyboard/ergodox_ez/keymaps/phoenix/default_highres.png b/keyboard/ergodox_ez/keymaps/phoenix/default_highres.png deleted file mode 100644 index 7d9f045f4..000000000 Binary files a/keyboard/ergodox_ez/keymaps/phoenix/default_highres.png and /dev/null differ diff --git a/keyboard/ergodox_ez/keymaps/phoenix/readme.md b/keyboard/ergodox_ez/keymaps/phoenix/readme.md index 8f6dba45e..b1053bfb7 100644 --- a/keyboard/ergodox_ez/keymaps/phoenix/readme.md +++ b/keyboard/ergodox_ez/keymaps/phoenix/readme.md @@ -1,10 +1,10 @@ -# ErgoDox EZ Default Configuration +# ErgoDox EZ Phoenix Configuration -## Changelog +I started working using the default layout. The changes that I made are largely things that I consistely do wrong. -* Feb 2, 2016 (V1.1): - * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). +As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other. -This is what we ship with out of the factory. :) The image says it all: +## Changelog -![Default](default_highres.png) +* April 25, 2016 (V1.0): + * Initial submission. -- cgit v1.2.3 From d1c70328f8d8ded6ce1e5422b468fc41ef315e7d Mon Sep 17 00:00:00 2001 From: Ryan Ascheman Date: Thu, 12 May 2016 10:32:26 -0700 Subject: update volume control to match arrow change --- keyboard/ergodox_ez/keymaps/phoenix/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/phoenix/keymap.c b/keyboard/ergodox_ez/keymaps/phoenix/keymap.c index 86aae910d..86ee5a65c 100644 --- a/keyboard/ergodox_ez/keymaps/phoenix/keymap.c +++ b/keyboard/ergodox_ez/keymaps/phoenix/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK -- cgit v1.2.3 From b73adf0dea567407bd5e6bd7921b607529a2aa4a Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Sun, 29 May 2016 02:48:56 +0200 Subject: Support the Pegasus Hoof controller. Replacement controller for Filco Majestouch TKL keyboards. matrix.c ported from: https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard More details: http://bathroomepiphanies.com/controllers/ --- keyboards/pegasushoof/Makefile | 3 + keyboards/pegasushoof/README.md | 24 +++ keyboards/pegasushoof/config.h | 46 ++++++ keyboards/pegasushoof/keymaps/blowrak/Makefile | 22 +++ keyboards/pegasushoof/keymaps/blowrak/keymap.c | 112 ++++++++++++++ keyboards/pegasushoof/keymaps/default/Makefile | 22 +++ keyboards/pegasushoof/keymaps/default/keymap.c | 60 ++++++++ keyboards/pegasushoof/matrix.c | 204 +++++++++++++++++++++++++ keyboards/pegasushoof/pegasushoof.c | 51 +++++++ keyboards/pegasushoof/pegasushoof.h | 51 +++++++ keyboards/pegasushoof/rules.mk | 67 ++++++++ 11 files changed, 662 insertions(+) create mode 100644 keyboards/pegasushoof/Makefile create mode 100644 keyboards/pegasushoof/README.md create mode 100644 keyboards/pegasushoof/config.h create mode 100644 keyboards/pegasushoof/keymaps/blowrak/Makefile create mode 100644 keyboards/pegasushoof/keymaps/blowrak/keymap.c create mode 100644 keyboards/pegasushoof/keymaps/default/Makefile create mode 100644 keyboards/pegasushoof/keymaps/default/keymap.c create mode 100644 keyboards/pegasushoof/matrix.c create mode 100644 keyboards/pegasushoof/pegasushoof.c create mode 100644 keyboards/pegasushoof/pegasushoof.h create mode 100644 keyboards/pegasushoof/rules.mk diff --git a/keyboards/pegasushoof/Makefile b/keyboards/pegasushoof/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/pegasushoof/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/pegasushoof/README.md b/keyboards/pegasushoof/README.md new file mode 100644 index 000000000..074222c71 --- /dev/null +++ b/keyboards/pegasushoof/README.md @@ -0,0 +1,24 @@ +pegasushoof keyboard firmware +============================= + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent README.md](/README.md). + +## Building + +Download or clone the whole firmware and navigate to the `keyboard/pegasushoof` 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 all keymaps, simply run `make`, the `.hex` files will end up in the top directory. + +### Specific Keymap +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `/keymap.c` in the `keymaps` folder, and see keymap document (you can find in top README.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just enter the keymap directory and type `make`: +``` +$ cd keymaps/default +$ make +``` diff --git a/keyboards/pegasushoof/config.h b/keyboards/pegasushoof/config.h new file mode 100644 index 000000000..0dbec26e4 --- /dev/null +++ b/keyboards/pegasushoof/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2016 Daniel Svensson + +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 0x6050 +#define DEVICE_VER 0x0104 +#define MANUFACTURER Filco +#define PRODUCT Majestouch TKL \\w The Pegasus Hoof +#define DESCRIPTION QMK firmware for Majestouch TKL + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 18 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#endif diff --git a/keyboards/pegasushoof/keymaps/blowrak/Makefile b/keyboards/pegasushoof/keymaps/blowrak/Makefile new file mode 100644 index 000000000..fec0d2d97 --- /dev/null +++ b/keyboards/pegasushoof/keymaps/blowrak/Makefile @@ -0,0 +1,22 @@ +# 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 ?= 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 +CUSTOM_MATRIX ?= yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42 +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= 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. + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/pegasushoof/keymaps/blowrak/keymap.c new file mode 100644 index 000000000..6faf4db6f --- /dev/null +++ b/keyboards/pegasushoof/keymaps/blowrak/keymap.c @@ -0,0 +1,112 @@ +/* +Copyright 2016 Daniel Svensson + +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 "pegasushoof.h" + +#define _______ KC_TRNS + +/* Swedish keys */ +#define SE_HALF KC_GRV +#define SE_PLUS KC_MINS +#define SE_ACUT KC_EQL +#define SE_AO KC_LBRC +#define SE_CIRC KC_RBRC +#define SE_QUOT KC_BSLS +#define SE_OE KC_SCLN +#define SE_AE KC_QUOT +#define SE_MINS KC_SLSH +#define SE_LTGT KC_NUBS +#define SE_LCBR RALT(KC_7) +#define SE_LBRC RALT(KC_8) +#define SE_RBRC RALT(KC_9) +#define SE_RCBR RALT(KC_0) +#define SE_PIPE RALT(SE_LTGT) +#define SE_BSLS RALT(SE_PLUS) + +#define KM_BLOWRAK 0 +#define KM_QWERTY 1 +#define KM_MEDIA 2 +#define KM_HAXHAX 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Blowrak ISO layer, a Swedish take on Dvorak */ + [KM_BLOWRAK] = KEYMAP( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ + KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ + KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ + KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + /* Layer 1: Standard ISO layer */ + [KM_QWERTY] = KEYMAP( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ + KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ + KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ + KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + /* Layer 2: Media layer */ + [KM_MEDIA] = KEYMAP( \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_MUTE,_______,KC_VOLD, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MPLY, \ + _______,_______,_______, _______, _______,_______,RESET ,_______, KC_MPRV,KC_MSTP,KC_MNXT), + /* Layer 3: Programming layer */ + [KM_HAXHAX] = KEYMAP( \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + _______,SE_LCBR,SE_PIPE,SE_RCBR,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + _______,SE_LBRC,SE_BSLS,SE_RBRC,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(KM_MEDIA), + [1] = ACTION_LAYER_TOGGLE(KM_QWERTY) +}; + +void matrix_scan_user(void) +{ + uint8_t layer = biton32(layer_state); + switch (layer) { + case KM_BLOWRAK: + ph_caps_led_on(); + ph_sclk_led_off(); + break; + case KM_QWERTY: + ph_sclk_led_on(); + ph_caps_led_off(); + break; + } +} + +/* Mixes in KM_HAXHAX via RALT modifier without shadowing the RALT key combinations. */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint8_t modifiers = get_mods(); + if (modifiers & MOD_BIT(KC_RALT) && record->event.pressed) { + uint16_t kc = keymap_key_to_keycode(KM_HAXHAX, record->event.key); + if (kc != KC_TRNS) { + register_code(kc); + unregister_code(kc); + return false; + } + } + return true; +} diff --git a/keyboards/pegasushoof/keymaps/default/Makefile b/keyboards/pegasushoof/keymaps/default/Makefile new file mode 100644 index 000000000..fec0d2d97 --- /dev/null +++ b/keyboards/pegasushoof/keymaps/default/Makefile @@ -0,0 +1,22 @@ +# 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 ?= 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 +CUSTOM_MATRIX ?= yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42 +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= 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. + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/pegasushoof/keymaps/default/keymap.c b/keyboards/pegasushoof/keymaps/default/keymap.c new file mode 100644 index 000000000..aa006b23a --- /dev/null +++ b/keyboards/pegasushoof/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2016 Daniel Svensson + +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 "pegasushoof.h" + +#define _______ KC_TRNS + +#define KM_QWERTY 0 +#define KM_MEDIA 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Standard ISO layer */ + [KM_QWERTY] = KEYMAP( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CLCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN0, KC_LEFT,KC_DOWN,KC_RGHT), + /* Layer 1: Function layer */ + [KM_MEDIA] = KEYMAP( \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLD, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MPLY, \ + _______,_______,_______, _______, _______,_______,RESET ,_______, KC_MPRV,KC_MSTP,KC_MNXT) +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(KM_MEDIA) +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + ph_caps_led_on(); + } else { + ph_caps_led_off(); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + ph_sclk_led_on(); + } else { + ph_sclk_led_off(); + } +} diff --git a/keyboards/pegasushoof/matrix.c b/keyboards/pegasushoof/matrix.c new file mode 100644 index 000000000..d2a74b8d7 --- /dev/null +++ b/keyboards/pegasushoof/matrix.c @@ -0,0 +1,204 @@ +/* +Copyright 2014 Ralf Schmitt +Copyright 2016 Daniel Svensson + +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 "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" + +static uint8_t debouncing = DEBOUNCING_DELAY; +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void select_row(uint8_t col); + +inline uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + /* Column output pins */ + DDRD |= 0b01111011; + /* Row input pins */ + DDRC &= ~0b10000000; + DDRB &= ~0b01111111; + PORTC |= 0b10000000; + PORTB |= 0b01111111; + + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_row(col); + wait_us(30); + matrix_row_t rows = read_cols(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "pegasushoof.h" + +__attribute__ ((weak)) +void matrix_init_user(void) { +}; + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +__attribute__ ((weak)) +bool process_action_user(keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { +} + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_action_kb(keyrecord_t *record) { + return process_action_user(record); +} + +void led_set_kb(uint8_t usb_led) { + led_set_user(usb_led); +} diff --git a/keyboards/pegasushoof/pegasushoof.h b/keyboards/pegasushoof/pegasushoof.h new file mode 100644 index 000000000..d031e3ed2 --- /dev/null +++ b/keyboards/pegasushoof/pegasushoof.h @@ -0,0 +1,51 @@ +/* +Copyright 2016 Daniel Svensson + +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 PEGASUSHOOF_H +#define PEGASUSHOOF_H + +#include "matrix.h" +#include "quantum.h" + +#define ___ KC_NO + +#define KEYMAP( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , ___ , KC0 , ___ , ___ , KF0 , ___ , ___ , ___ , KJ0 , KK0 , ___ , KM0 , KN0 , KO0 , ___ , KQ0 , KR0 }, \ + /* 1 */ { ___ , ___ , ___ , ___ , ___ , ___ , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , ___ , KO1 , KP1 , ___ , ___ }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , ___ , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , ___ , KO2 , ___ , ___ , ___ }, \ + /* 3 */ { KA3 , KB3 , ___ , ___ , ___ , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , ___ , KO3 , ___ , ___ , ___ }, \ + /* 4 */ { ___ , ___ , KC4 , ___ , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , ___ , KO4 , KP4 , KQ4 , KR4 }, \ + /* 5 */ { ___ , ___ , KC5 , ___ , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , ___ , ___ }, \ + /* 6 */ { ___ , ___ , KC6 , ___ , ___ , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , KL6 , ___ , KN6 , KO6 , ___ , KQ6 , ___ }, \ + /* 7 */ { ___ , ___ , ___ , ___ , ___ , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , ___ , KP7 , ___ , ___ }, \ + } + +inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); } +inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); } + +inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); } +inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } + + +#endif diff --git a/keyboards/pegasushoof/rules.mk b/keyboards/pegasushoof/rules.mk new file mode 100644 index 000000000..b3eeebfdb --- /dev/null +++ b/keyboards/pegasushoof/rules.mk @@ -0,0 +1,67 @@ +# MCU name +MCU = atmega32u2 + +# 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 +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= 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. + + +CUSTOM_MATRIX ?= yes +SRC = matrix.c -- cgit v1.2.3 From 1dcee07eaba6de71211322fb8be327cc4d1069e2 Mon Sep 17 00:00:00 2001 From: Rob Rogers Date: Mon, 17 Oct 2016 08:04:29 -0500 Subject: Move hand_swap_config to ez.c, removes error for infinity --- keyboards/ergodox/ergodox.c | 20 -------------------- keyboards/ergodox/ez/ez.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/keyboards/ergodox/ergodox.c b/keyboards/ergodox/ergodox.c index c88c1ad89..648ec8ad2 100644 --- a/keyboards/ergodox/ergodox.c +++ b/keyboards/ergodox/ergodox.c @@ -2,23 +2,3 @@ #include "debug.h" #include "action_layer.h" -// swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - /* Left hand, matrix positions */ - {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, - {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, - {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, - {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, - {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, - {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, - {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, - /* Right hand, matrix positions */ - {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, - {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, - {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, - {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, - {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, - {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, - {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, -}; - diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index e7afc9859..1052e2fbb 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c @@ -83,3 +83,25 @@ out: } +#ifdef ONEHAND_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, + {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, + {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, + {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + /* Right hand, matrix positions */ + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, +}; +#endif -- cgit v1.2.3 From 75ea142d01a92345c43c5ac776cc61ec805c8869 Mon Sep 17 00:00:00 2001 From: Rob Rogers Date: Tue, 18 Oct 2016 13:59:19 -0500 Subject: Update ez.c --- keyboards/ergodox/ez/ez.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index 1052e2fbb..ddb8ff0cf 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c @@ -82,7 +82,6 @@ out: return mcp23018_status; } - #ifdef ONEHAND_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap -- cgit v1.2.3 From 60326eded27332a561ccdc561679b89921a58461 Mon Sep 17 00:00:00 2001 From: Ryan Ascheman Date: Tue, 18 Oct 2016 12:44:30 -0700 Subject: moving keymap to new location --- keyboard/ergodox_ez/keymaps/phoenix/keymap.c | 184 ------------------------- keyboard/ergodox_ez/keymaps/phoenix/readme.md | 10 -- keyboards/ergodox/ez/keymaps/phoenix/keymap.c | 184 +++++++++++++++++++++++++ keyboards/ergodox/ez/keymaps/phoenix/readme.md | 10 ++ 4 files changed, 194 insertions(+), 194 deletions(-) delete mode 100644 keyboard/ergodox_ez/keymaps/phoenix/keymap.c delete mode 100644 keyboard/ergodox_ez/keymaps/phoenix/readme.md create mode 100644 keyboards/ergodox/ez/keymaps/phoenix/keymap.c create mode 100644 keyboards/ergodox/ez/keymaps/phoenix/readme.md diff --git a/keyboard/ergodox_ez/keymaps/phoenix/keymap.c b/keyboard/ergodox_ez/keymaps/phoenix/keymap.c deleted file mode 100644 index 86ee5a65c..000000000 --- a/keyboard/ergodox_ez/keymaps/phoenix/keymap.c +++ /dev/null @@ -1,184 +0,0 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | Home | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | End | | PgUp | | | - * | Space|Backsp|------| |------| Enter |Space | - * | |ace | LGui | | 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS), - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_HOME, - KC_END, - KC_SPC,KC_BSPC,KC_LGUI, - // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_ENT, KC_SPC - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | 0 | 0 | . | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,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_TRNS,KC_TRNS,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_TRNS, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// 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_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, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - 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) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboard/ergodox_ez/keymaps/phoenix/readme.md b/keyboard/ergodox_ez/keymaps/phoenix/readme.md deleted file mode 100644 index b1053bfb7..000000000 --- a/keyboard/ergodox_ez/keymaps/phoenix/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox EZ Phoenix Configuration - -I started working using the default layout. The changes that I made are largely things that I consistely do wrong. - -As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other. - -## Changelog - -* April 25, 2016 (V1.0): - * Initial submission. diff --git a/keyboards/ergodox/ez/keymaps/phoenix/keymap.c b/keyboards/ergodox/ez/keymaps/phoenix/keymap.c new file mode 100644 index 000000000..86ee5a65c --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/phoenix/keymap.c @@ -0,0 +1,184 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | Home | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | End | | PgUp | | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | LGui | | 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_HOME, + KC_END, + KC_SPC,KC_BSPC,KC_LGUI, + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,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_TRNS,KC_TRNS,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_TRNS, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// 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_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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + 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) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/ez/keymaps/phoenix/readme.md b/keyboards/ergodox/ez/keymaps/phoenix/readme.md new file mode 100644 index 000000000..b1053bfb7 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/phoenix/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ Phoenix Configuration + +I started working using the default layout. The changes that I made are largely things that I consistely do wrong. + +As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other. + +## Changelog + +* April 25, 2016 (V1.0): + * Initial submission. -- cgit v1.2.3 From cabfd7830914d19fb445058da41fa26e01dd3c02 Mon Sep 17 00:00:00 2001 From: Ryan Ascheman Date: Tue, 18 Oct 2016 12:48:07 -0700 Subject: didn't read PR comment close enough, correcting folder --- keyboards/ergodox/ez/keymaps/phoenix/keymap.c | 184 ------------------------- keyboards/ergodox/ez/keymaps/phoenix/readme.md | 10 -- keyboards/ergodox/keymaps/phoenix/keymap.c | 184 +++++++++++++++++++++++++ keyboards/ergodox/keymaps/phoenix/readme.md | 10 ++ 4 files changed, 194 insertions(+), 194 deletions(-) delete mode 100644 keyboards/ergodox/ez/keymaps/phoenix/keymap.c delete mode 100644 keyboards/ergodox/ez/keymaps/phoenix/readme.md create mode 100644 keyboards/ergodox/keymaps/phoenix/keymap.c create mode 100644 keyboards/ergodox/keymaps/phoenix/readme.md diff --git a/keyboards/ergodox/ez/keymaps/phoenix/keymap.c b/keyboards/ergodox/ez/keymaps/phoenix/keymap.c deleted file mode 100644 index 86ee5a65c..000000000 --- a/keyboards/ergodox/ez/keymaps/phoenix/keymap.c +++ /dev/null @@ -1,184 +0,0 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | Home | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | End | | PgUp | | | - * | Space|Backsp|------| |------| Enter |Space | - * | |ace | LGui | | 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS), - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_HOME, - KC_END, - KC_SPC,KC_BSPC,KC_LGUI, - // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_ENT, KC_SPC - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | 0 | 0 | . | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,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_TRNS,KC_TRNS,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_TRNS, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// 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_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, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - 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) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox/ez/keymaps/phoenix/readme.md b/keyboards/ergodox/ez/keymaps/phoenix/readme.md deleted file mode 100644 index b1053bfb7..000000000 --- a/keyboards/ergodox/ez/keymaps/phoenix/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox EZ Phoenix Configuration - -I started working using the default layout. The changes that I made are largely things that I consistely do wrong. - -As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other. - -## Changelog - -* April 25, 2016 (V1.0): - * Initial submission. diff --git a/keyboards/ergodox/keymaps/phoenix/keymap.c b/keyboards/ergodox/keymaps/phoenix/keymap.c new file mode 100644 index 000000000..86ee5a65c --- /dev/null +++ b/keyboards/ergodox/keymaps/phoenix/keymap.c @@ -0,0 +1,184 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | Home | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | End | | PgUp | | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | LGui | | 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_HOME, + KC_END, + KC_SPC,KC_BSPC,KC_LGUI, + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,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_TRNS,KC_TRNS,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_TRNS, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// 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_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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + 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) { + // TODO: Make this relevant to the ErgoDox EZ. + 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/phoenix/readme.md b/keyboards/ergodox/keymaps/phoenix/readme.md new file mode 100644 index 000000000..b1053bfb7 --- /dev/null +++ b/keyboards/ergodox/keymaps/phoenix/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ Phoenix Configuration + +I started working using the default layout. The changes that I made are largely things that I consistely do wrong. + +As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other. + +## Changelog + +* April 25, 2016 (V1.0): + * Initial submission. -- cgit v1.2.3 From fad20756e30d532ff46ec8fb5e90a8c446f5c8f2 Mon Sep 17 00:00:00 2001 From: Ryan Ascheman Date: Tue, 18 Oct 2016 13:58:59 -0700 Subject: update header file --- keyboards/ergodox/keymaps/phoenix/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/phoenix/keymap.c b/keyboards/ergodox/keymaps/phoenix/keymap.c index 86ee5a65c..624817d47 100644 --- a/keyboards/ergodox/keymaps/phoenix/keymap.c +++ b/keyboards/ergodox/keymaps/phoenix/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox_ez.h" +#include "ergodox.h" #include "debug.h" #include "action_layer.h" -- cgit v1.2.3 From 1688c014ccc89fc46538c7b9f80cb09126904a4f Mon Sep 17 00:00:00 2001 From: h-parks Date: Tue, 18 Oct 2016 21:58:33 -0500 Subject: Win10 Writer's Block - An ErgoDox Keymap This is a QWERTY layout for ErgoDox on QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10.--- .../ergodox/keymaps/win10_writers-block/Makefile | 9 + .../ergodox/keymaps/win10_writers-block/config.h | 36 +++ .../win10_writers-block/images/base-layer.png | Bin 0 -> 125979 bytes .../win10_writers-block/images/media-layer.png | Bin 0 -> 102643 bytes .../win10_writers-block/images/rimworld-layer.png | Bin 0 -> 90359 bytes .../win10_writers-block/images/symbol-layer.png | Bin 0 -> 101477 bytes .../ergodox/keymaps/win10_writers-block/keymap.c | 323 +++++++++++++++++++++ .../ergodox/keymaps/win10_writers-block/readme.md | 111 +++++++ 8 files changed, 479 insertions(+) create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/Makefile create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/config.h create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/keymap.c create mode 100644 keyboards/ergodox/keymaps/win10_writers-block/readme.md diff --git a/keyboards/ergodox/keymaps/win10_writers-block/Makefile b/keyboards/ergodox/keymaps/win10_writers-block/Makefile new file mode 100644 index 000000000..fbab4b71c --- /dev/null +++ b/keyboards/ergodox/keymaps/win10_writers-block/Makefile @@ -0,0 +1,9 @@ +# Having a file like this allows you to override Makefile definitions +# for your own particular keymap + +TAP_DANCE_ENABLE=yes + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/win10_writers-block/config.h b/keyboards/ergodox/keymaps/win10_writers-block/config.h new file mode 100644 index 000000000..568a711a8 --- /dev/null +++ b/keyboards/ergodox/keymaps/win10_writers-block/config.h @@ -0,0 +1,36 @@ +#ifndef KEYBOARDS_ERGODOX_CONFIG_H_ +#define KEYBOARDS_ERGODOX_CONFIG_H_ + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 300 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +#ifdef SUBPROJECT_ez + #include "ez/config.h" +#endif +#ifdef SUBPROJECT_infinity + #include "infinity/config.h" +#endif + + +#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png new file mode 100644 index 000000000..d1cb1987c Binary files /dev/null and b/keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png differ diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png new file mode 100644 index 000000000..c2019da4e Binary files /dev/null and b/keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png differ diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png new file mode 100644 index 000000000..f866d3d55 Binary files /dev/null and b/keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png differ diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png new file mode 100644 index 000000000..6f49aae79 Binary files /dev/null and b/keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png differ diff --git a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c new file mode 100644 index 000000000..1821147eb --- /dev/null +++ b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c @@ -0,0 +1,323 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer - helpful for writing in Office-style word processors. +#define SYMB 1 // symbol layer - NumPad, etc. - same as Ergodox EZ default but no EEPROM or Version key +#define RIMW 2 // rimworld layer - made for the game RimWorld, by Tynan Sylvester | feel free to remap for your favorite game! +#define MDIA 3 // media layer - mouse and music - close to Ergodox EZ default media layer + +#define CO_PA M(0) // hold copy, tap paste + +#define W_CUT LCTL(KC_X) // C-x Cut +#define W_COPY LCTL(KC_C) // C-c Copy +#define W_PASTE LCTL(KC_V) // C-v Paste +#define W_UNDO LCTL(KC_Z) // C-z Undo +#define W_FIND LCTL(KC_F) // C-v Find +#define W_CAD LCTL(LALT(KC_DEL)) // one-tap ctrl-alt-del + + + +//Tap Dance Declarations +enum { + CAKEWARP, + CTRLALTMDIA, +}; + +void cake_count (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on (SYMB); //define double tap here + layer_off (MDIA); + } + else { + layer_off (SYMB); //define single tap or hold here + layer_off (MDIA); + } + if (state->count == 3) { + layer_on (RIMW); //define triple tap here + layer_off (MDIA); + } + else { + layer_off (RIMW); //define single tap or hold here + layer_off (MDIA); + reset_tap_dance (state); + } +} + +void dance_cad_mdia_fin (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_LCTL); + register_code (KC_LALT); + register_code (KC_DEL); + } else { + layer_on (MDIA); + } +} + +void dance_cad_mdia_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_DEL); + unregister_code (KC_LALT); + unregister_code (KC_LCTL); + } else { + ; + } +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // tap for Layer 0, tap twice to switch to symbol layer, and tap three times to switch to rimworld layer. + [CAKEWARP] = ACTION_TAP_DANCE_FN(cake_count) + // tap for ctrl-alt-del, tap twice for media layer + ,[CTRLALTMDIA] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cad_mdia_fin, dance_cad_mdia_reset) + // Other declarations would go here, separated by commas, if you have them +}; + +//In Layer declaration, add tap dance item in place of a key code + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer - TD(one_tap, two_taps, three_taps...) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F12/L1 | Q | W | E | R | T | {/[ | |TD(L0 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------| + * |Caps/Win| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| }/] | TD(ctrl|------+------+------+------+------+--------| + * |LShift/(|Z/Ctrl| X | C | V | B | | |altdel| N | M | , | . | / |RShift/)| + * `--------+------+------+------+------+-------------' |L3) |------+------+------+------+------+--------' + * | Undo | Cut |CopyPa| Meh | LGui | '------| | Enter| Left | Up | Down | Right | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Esc | VolUp| | F4 | Mute | + * ,------|------|------| |------+--------+------. + * | | | VolDn| | F5 | | | + * |Backsp|Delete|------| |------| Tab / |Space | + * |ace | | Find | | Alt | CTRL | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, +LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + GUI_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_RBRC, + W_UNDO, W_CUT, CO_PA, MEH_T(KC_NO), KC_LGUI, + KC_ESC, KC_VOLU, + KC_VOLD, + KC_BSPC, KC_DELETE, W_FIND, + // right hand + KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + TD(CAKEWARP), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + TD(CTRLALTMDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_F4, KC_MUTE, + KC_F5, + KC_RALT, CTL_T(KC_TAB), KC_SPC + ), + +/* Keymap 1: Symbol Layer | No EEPROM Or Version keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | xx | | xx | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | |TD(L0 | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| 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_NO, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: RimWorld Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | C | ,< | W | >. | R | | |TD(L0 | U | B | N | J | M | PGUP | + * |--------+------+------+------+------+------| F10 | |L1 L2)|------+------+------+------+------+--------| + * | I | F | A | S | D | 8 |------| |------| X | L | P | Y | H | ENTER | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | K | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PGDN | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | F | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |SPACE | C |------| |------| E |SPACE | + * | | | Q | | | | | + * `--------------------' `--------------------' + */ +// RIMWORLD +[RIMW] = KEYMAP( + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_C, KC_COMM, KC_W, KC_DOT, KC_R, KC_F10, + KC_I, KC_F, KC_A, KC_S, KC_D, KC_8, + KC_K, 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_C,KC_Q,KC_TRNS, + // right hand + KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TRNS, KC_U, KC_B, KC_N, KC_J, KC_M, KC_PGUP, + KC_X, KC_L, SFT_T(KC_P), KC_Y, KC_H, KC_ENT, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN, + KC_F, KC_LEFT, KC_UP, KC_DOWN,KC_RIGHT, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_E, KC_TRNS +), +/* Keymap 3: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | Lclk | Rclk |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// 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_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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +static uint16_t key_timer; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: { + if (record->event.pressed) { + key_timer = timer_read(); // if the key is being pressed, we start the timer. + } + else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). + if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap. + return MACRO( D(LCTL), T(C), U(LCTL), END ); + } + else { + return MACRO( D(LCTL), T(V), U(LCTL), END ); + } + } + break; + } + } + return MACRO_NONE; +}; + +// Anything you want to do once when the keyboard initializes. +// Tests LED function when the keyboard initializes. +void matrix_init_user(void) { + + _delay_ms(500); + ergodox_board_led_on(); + _delay_ms(200); + ergodox_right_led_1_on(); + _delay_ms(200); + ergodox_right_led_2_on(); + _delay_ms(200); + ergodox_right_led_3_on(); + _delay_ms(200); + ergodox_board_led_off(); + _delay_ms(200); + ergodox_right_led_1_off(); + _delay_ms(200); + ergodox_right_led_2_off(); + _delay_ms(200); + ergodox_right_led_3_off(); + +}; + + +// 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; + case 3: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md new file mode 100644 index 000000000..b9c3eb879 --- /dev/null +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -0,0 +1,111 @@ + + +Win10 Writer's Block ErgoDox - v1.0 + +======================= + +This is a QWERTY layout for QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10. + +I earn a living as a copywriter. I use my ErgoDox as a daily driver at my office. + +A gaming layer is unobtrusively built into this layout. I use that layer to play RimWorld. + +Feel free to modify the gaming layer to your personal taste. + +## Table of Contents + +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Symbol layer](#symbol-layer) + - [Gaming layer](#rimworld-layer) + - [Media layer](#media-layer) +* [Tools](#tools) + - [Layer notification](#layer-notification) +* [Building](#building) + - [Using on Windows](#using-on-windows) +* [License](#license) +* [Special Thanks](#special-thanks) + +# Layouts + +* TapDance will teleport you to the layer you want: +* One Tap for the Base layer +* Two Taps for the Symbol layer +* Three Taps for the Rimworld/Gaming layer + +* Where the "Meh" key is located on the Ergodox EZ default layout, I've changed it to another tap dance key: +* One Tap for CTRL-ALT-DEL +* Two Taps for the Media/Mouse layer + +## Base layer + +[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/8fd9bbdd3a23bbb5a8779de3624a3be1) + +This is a QWERTY layout with some quirks. + +* Enter is located on a key that won't cause as much thumb fatigue. +* Copy and Paste work from the same key. Just hold the key to copy and tap the key to paste! +* Undo, Find and Cut are also one-touch keys. +* F12 is where you would normally find TAB on standard layouts. Quickly save in Word, safely. +* You'll find bracket keys below the "6" key. + +* The Meh Key is a single-button CTRL+ALT+SHIFT modifier. + +* Space Cadet Shift: Tap L Shift for "(" and R Shift for ")" -- holding either shift works like a normal shift. +* Tap "Z" or Tab to use either normally. Hold them for CTRL. +* Tap Caps Lock to use it normally. Hold it for Win key combinations (Win+D to minimize all programs, etc). + +## Symbol layer + +[![Symbol layer](images/symbol-layer.png)](http://www.keyboard-layout-editor.com/#/gists/04eb6458b8b17882e472f64d482f12b4) + +Your standard Ergodox EZ symbol + numpad layout, minus the Version and EEPROM keys. + +* From the base layer, hold the F12 Key to temporarily access this layer (use for quick access to numpad) +* Release F12 to return to the base layer. + +## Rimworld layer + +[![Rimworld / Gaming Layer](images/rimworld-layer.png)](http://www.keyboard-layout-editor.com/#/gists/d53af8391e6e443ed0a98ccfbdb4eace) + +This layer was made to play RimWorld, a Sci-Fi Colony Survival Game by Tynan Sylvester and Ludeon Studios, available on Steam. + +* Have fun! + +## Media layer + +[![Media layer](images/media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/3209d09ed4bd997e4f49f28c6ada2ab3) + +This is the standard Ergodox EZ media layout with more options for mouseclick buttons. + +* In this layer, your "space" key changes into a back button for your browser. + +## LED states + +Your LEDs will change to indicate your layer. You'll know you are in the base layer if all LEDs are off. + +# Building + +To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/` + +[qmk]: https://github.com/jackhumbert/qmk_firmware + +``` +$ make keyboard=ergodox keymap=win10_writers-block +``` + +## Using on Windows + +This layout is tested in Windows 7 Pro and Windows 10 Home environments. + +# License + +GPL 3+ + +# Special Thanks + +* To algernon for his coding help. I'm a novice but I still made this work (and figured out tap dance) with his help. + +* To /r/MechanicalKeyboards for being an all-around great community. + +* To /u/profet23 for his amazing custom Ergodox boards. \ No newline at end of file -- cgit v1.2.3 From f2197611c7d57f01b95d268e919221f87407a4df Mon Sep 17 00:00:00 2001 From: h-parks Date: Wed, 19 Oct 2016 09:33:37 -0500 Subject: Win10 Writer's Block - An ErgoDox Keymap fix for compiling on infinity: replaced `_delay_ms()' with `wait_ms()' included "wait.h"--- keyboards/ergodox/keymaps/win10_writers-block/keymap.c | 17 +++++++++-------- keyboards/ergodox/keymaps/win10_writers-block/readme.md | 4 +++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c index 1821147eb..ea640ee96 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c +++ b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c @@ -2,6 +2,7 @@ #include "debug.h" #include "action_layer.h" #include "version.h" +#include "wait.h" #define BASE 0 // default layer - helpful for writing in Office-style word processors. #define SYMB 1 // symbol layer - NumPad, etc. - same as Ergodox EZ default but no EEPROM or Version key @@ -276,21 +277,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // Tests LED function when the keyboard initializes. void matrix_init_user(void) { - _delay_ms(500); + wait_ms(500); ergodox_board_led_on(); - _delay_ms(200); + wait_ms(200); ergodox_right_led_1_on(); - _delay_ms(200); + wait_ms(200); ergodox_right_led_2_on(); - _delay_ms(200); + wait_ms(200); ergodox_right_led_3_on(); - _delay_ms(200); + wait_ms(200); ergodox_board_led_off(); - _delay_ms(200); + wait_ms(200); ergodox_right_led_1_off(); - _delay_ms(200); + wait_ms(200); ergodox_right_led_2_off(); - _delay_ms(200); + wait_ms(200); ergodox_right_led_3_off(); }; diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md index b9c3eb879..66b1aaf40 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -6,7 +6,9 @@ Win10 Writer's Block ErgoDox - v1.0 This is a QWERTY layout for QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10. -I earn a living as a copywriter. I use my ErgoDox as a daily driver at my office. +Professional writers may find this layout useful -- copywriters, technical writers, novelists, etc. + +I use my ErgoDox with this keymap as a daily driver at my office. A gaming layer is unobtrusively built into this layout. I use that layer to play RimWorld. -- cgit v1.2.3