From 633da3bdb661a6da43ffd4e936736927e6d1ebda Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Sat, 1 Oct 2016 13:03:46 +0100 Subject: Made some simplifications leveraging the LALT(), LGUI(), and S() functions. --- keyboards/planck/keymaps/callum/keymap.c | 82 +++----------------------------- 1 file changed, 6 insertions(+), 76 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 82ba83f4e..411523125 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -21,14 +21,8 @@ enum planck_keycodes { MOVE = SAFE_RANGE, SYMB, FUNC, - CMDLEFT, - CMDRGHT, BELOW, - ABOVE, - DASH, - GBP, - VOLUP, - VOLDN + ABOVE }; // Fillers to make layering more clear @@ -67,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} @@ -85,8 +79,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH }, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP }, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -121,8 +115,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = { - {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP }, - {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN }, + {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(LALT(KC_VOLU))}, + {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(LALT(KC_VOLD))}, {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } @@ -159,26 +153,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case CMDLEFT: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_LEFT); - } else { - unregister_code(KC_LEFT); - unregister_code(KC_LGUI); - } - return false; - break; - case CMDRGHT: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_RGHT); - } else { - unregister_code(KC_RGHT); - unregister_code(KC_LGUI); - } - return false; - break; case BELOW: if (record->event.pressed) { register_code(KC_LGUI); @@ -203,50 +177,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case DASH: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_MINS); - } else { - unregister_code(KC_MINS); - unregister_code(KC_LALT); - } - return false; - break; - case GBP: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_3); - } else { - unregister_code(KC_3); - unregister_code(KC_LALT); - } - return false; - break; - case VOLUP: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_LSFT); - register_code(KC_VOLU); - } else { - unregister_code(KC_VOLU); - unregister_code(KC_LSFT); - unregister_code(KC_LALT); - } - return false; - break; - case VOLDN: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_LSFT); - register_code(KC_VOLD); - } else { - unregister_code(KC_VOLD); - unregister_code(KC_LSFT); - unregister_code(KC_LALT); - } - return false; - break; } return true; } -- cgit v1.2.3 From 8747c0786e7b583529d4033ea90aa91e49ae3a51 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 1 Oct 2016 18:28:33 +0200 Subject: - Updated dbroqua layout for HHKB keyboard --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 48 ++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c index ef43aae28..869e16d49 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -5,6 +5,7 @@ #define BASE 0 #define FN 1 +#define MOUSE 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE Level: Default Layer @@ -15,37 +16,58 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Left |Right| + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | * +-----------------------------------------------------------------------------------------+ - * | Gui | Alt | Space | AltGr | fn | + * | Gui | Alt | Space | AltGr | Menu| * `----------------------------------------------------------------´ */ [BASE] = KEYMAP( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LEFT, KC_RGHT, \ - KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(FN) + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \ + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE) ), - /* BASE Level: Default Layer + /* FN Layer * ,-----------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| * |-----------------------------------------------------------------------------------------+ - * | Caps | | | | | | | | | | | Up | | | + * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | * |-----------------------------------------------------------------------------------------+ - * | | Vol-| Vol+| Mute| | | |PrtSc| Home| PgUp| Left |Right| | + * | | Vol-| Vol+| Mute| | | | | Home| PgUp| Left |Right| | * |-----------------------------------------------------------------------------------------+ - * | | Prev| Play| Next| | | | | End |PgDwn| Down| Up | Down| + * | | Prev| Play| Next| | | | | End |PgDwn| Down| | | * +-----------------------------------------------------------------------------------------+ * | | | | | | * `----------------------------------------------------------------´ */ [FN] = KEYMAP( - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_UP, KC_DOWN, \ + KC_PWR, 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_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + /* MOUSE Layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | WUp | | | | | | | | Btn1| Up | Btn2| | + * |-----------------------------------------------------------------------------------------+ + * | | WLt | WDn | WRt | | | | | | | Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | Btn3| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | | | | + * `----------------------------------------------------------------´ + */ + [MOUSE] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \ + KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; -- cgit v1.2.3 From 6a090c5df7e52df084de975f070841af1138b5a4 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 1 Oct 2016 19:04:11 +0200 Subject: - Fixed key name in default layer definition --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c index 869e16d49..4e907acd8 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | * +-----------------------------------------------------------------------------------------+ - * | Gui | Alt | Space | AltGr | Menu| + * | Gui | Alt | Space | AltGr |Mouse| * `----------------------------------------------------------------´ */ [BASE] = KEYMAP( -- cgit v1.2.3 From a10e100bd5e8bad73e1b04f54639a4cec36e4b9e Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 2 Oct 2016 09:55:38 +0200 Subject: Add double arrow Unicode characters to FMU layer --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index 0eedecf3d..238971e81 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤ * │ │ ├ │ ┼ │ ┤ │ ✓ │ ✕ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │ * ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤ - * │ │ └ │ ┴ │ ┘ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ + * │ │ └ │ ┴ │ ┘ │ ↔ │ ⇔ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ * └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘ * │ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │ * └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘ @@ -157,7 +157,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, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS, KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715), - KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),UC(0x2194),UC(0x21D4),KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_MS_L, KC_MS_U, KC_BTN1, -- cgit v1.2.3 From c0c0c579ff00e8f11cbe201402d3e322090e1975 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 08:53:09 +0000 Subject: added gamenum handwired keyboard --- keyboards/gamenum/Makefile | 73 +++++++++++++ keyboards/gamenum/README.md | 92 ++++++++++++++++ keyboards/gamenum/config.h | 162 +++++++++++++++++++++++++++++ keyboards/gamenum/gamenum.c | 14 +++ keyboards/gamenum/gamenum.h | 21 ++++ keyboards/gamenum/keymaps/default/keymap.c | 68 ++++++++++++ 6 files changed, 430 insertions(+) create mode 100644 keyboards/gamenum/Makefile create mode 100644 keyboards/gamenum/README.md create mode 100644 keyboards/gamenum/config.h create mode 100644 keyboards/gamenum/gamenum.c create mode 100644 keyboards/gamenum/gamenum.h create mode 100644 keyboards/gamenum/keymaps/default/keymap.c (limited to 'keyboards') diff --git a/keyboards/gamenum/Makefile b/keyboards/gamenum/Makefile new file mode 100644 index 000000000..afb9372e1 --- /dev/null +++ b/keyboards/gamenum/Makefile @@ -0,0 +1,73 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/gamenum/README.md b/keyboards/gamenum/README.md new file mode 100644 index 000000000..b1839b9ef --- /dev/null +++ b/keyboards/gamenum/README.md @@ -0,0 +1,92 @@ +GameNum firmware +====================== +## Board overview + +The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. +The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. +The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. + +The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. + +## Build conciderations + +Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. +Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. +The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. ++ of the LED goes to the respective pins and can be joined together on the - into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. + +Schematic of the build is coming soon. + +## Adding more layers + +Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. + +Next thing to do is to add the actual layer for the keymap. + +``` +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +) +``` + +This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: +In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! + +Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. +The number that is at the end of the keycode corresponds with the code in the function. +`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. + +Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. +Look for this piece of code: + +``` + DDRD |= (1<<4); + PORTD &= ~(1<<4); +``` + +Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes low + PORTD |= (1<<4); //PD4 goes high + } + break; +``` + +This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. +Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. +Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/gamenum/config.h b/keyboards/gamenum/config.h new file mode 100644 index 000000000..6af876ab7 --- /dev/null +++ b/keyboards/gamenum/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Seth-Senpai +#define PRODUCT GameNum +#define DESCRIPTION Numpad with gamelayers + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN C6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/gamenum/gamenum.c b/keyboards/gamenum/gamenum.c new file mode 100644 index 000000000..8048194bb --- /dev/null +++ b/keyboards/gamenum/gamenum.c @@ -0,0 +1,14 @@ +#include "gamenum.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + DDRC |= (1<<6); + PORTC &= ~(1<<6); + + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + matrix_init_user(); + +} diff --git a/keyboards/gamenum/gamenum.h b/keyboards/gamenum/gamenum.h new file mode 100644 index 000000000..ea633b9bf --- /dev/null +++ b/keyboards/gamenum/gamenum.h @@ -0,0 +1,21 @@ +#ifndef GAMENUM_H +#define GAMENUM_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) \ +{ \ + { k00, k01, k02, k03}, \ + { k10, k11, k12, k13}, \ + { k20, k21, k22, KC_NO}, \ + { k30, k31, k32, KC_NO}, \ + { KC_NO, k41, k42, k43} \ +} + +#endif diff --git a/keyboards/gamenum/keymaps/default/keymap.c b/keyboards/gamenum/keymaps/default/keymap.c new file mode 100644 index 000000000..6950b741a --- /dev/null +++ b/keyboards/gamenum/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include "gamenum.h" +#include "action_layer.h" +#include "eeconfig.h" + + +#define _______ KC_TRNS + +#define DEF 0 +#define HDN 1 +#define OSY 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +), +[HDN] = KEYMAP( + KC_FN1, KC_1, KC_2, KC_3, \ + KC_Q, KC_W, KC_E, KC_R, \ + KC_A, KC_S, KC_D, \ + KC_Z, KC_X, KC_C, \ + KC_LSFT, KC_LALT, KC_SPC \ +), +[OSY] = KEYMAP( + KC_A, KC_Q, KC_1, KC_FN2, \ + KC_S, KC_W, KC_2, KC_LALT, \ + KC_D, KC_E, KC_3, \ + KC_F, KC_R, KC_4, \ + KC_SPC, KC_T, KC_TAB \ +) +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_SET(HDN, ON_PRESS), + [1] = ACTION_LAYER_SET(OSY, ON_PRESS), + [2] = ACTION_LAYER_SET(DEF, ON_PRESS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_FN0: + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + break; + case KC_FN1: + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + break; + case KC_FN2: + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3 From 468e8552072971c773ec166844d179089c544dc5 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 08:59:50 +0000 Subject: moved folder, update readme --- keyboards/gamenum/Makefile | 73 ---------- keyboards/gamenum/README.md | 92 ------------ keyboards/gamenum/config.h | 162 --------------------- keyboards/gamenum/gamenum.c | 14 -- keyboards/gamenum/gamenum.h | 21 --- keyboards/gamenum/keymaps/default/keymap.c | 68 --------- keyboards/handwired/gamenum/Makefile | 73 ++++++++++ keyboards/handwired/gamenum/README.md | 92 ++++++++++++ keyboards/handwired/gamenum/config.h | 162 +++++++++++++++++++++ keyboards/handwired/gamenum/gamenum.c | 14 ++ keyboards/handwired/gamenum/gamenum.h | 21 +++ .../handwired/gamenum/keymaps/default/keymap.c | 68 +++++++++ 12 files changed, 430 insertions(+), 430 deletions(-) delete mode 100644 keyboards/gamenum/Makefile delete mode 100644 keyboards/gamenum/README.md delete mode 100644 keyboards/gamenum/config.h delete mode 100644 keyboards/gamenum/gamenum.c delete mode 100644 keyboards/gamenum/gamenum.h delete mode 100644 keyboards/gamenum/keymaps/default/keymap.c create mode 100644 keyboards/handwired/gamenum/Makefile create mode 100644 keyboards/handwired/gamenum/README.md create mode 100644 keyboards/handwired/gamenum/config.h create mode 100644 keyboards/handwired/gamenum/gamenum.c create mode 100644 keyboards/handwired/gamenum/gamenum.h create mode 100644 keyboards/handwired/gamenum/keymaps/default/keymap.c (limited to 'keyboards') diff --git a/keyboards/gamenum/Makefile b/keyboards/gamenum/Makefile deleted file mode 100644 index afb9372e1..000000000 --- a/keyboards/gamenum/Makefile +++ /dev/null @@ -1,73 +0,0 @@ - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../Makefile -endif - - diff --git a/keyboards/gamenum/README.md b/keyboards/gamenum/README.md deleted file mode 100644 index b1839b9ef..000000000 --- a/keyboards/gamenum/README.md +++ /dev/null @@ -1,92 +0,0 @@ -GameNum firmware -====================== -## Board overview - -The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. -It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. -The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. -The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. - -The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. - -## Build conciderations - -Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. -Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. -The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. -+ of the LED goes to the respective pins and can be joined together on the - into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. - -Schematic of the build is coming soon. - -## Adding more layers - -Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. -Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. - -Next thing to do is to add the actual layer for the keymap. - -``` -[DEF] = KEYMAP( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ - KC_7, KC_8, KC_9, KC_PLUS, \ - KC_4, KC_5, KC_6, \ - KC_1, KC_2, KC_3, \ - KC_0, KC_DOT, KC_ENT \ -) -``` - -This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: -In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! - -Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. -The number that is at the end of the keycode corresponds with the code in the function. -`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. - -Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. -Look for this piece of code: - -``` - DDRD |= (1<<4); - PORTD &= ~(1<<4); -``` - -Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes low - PORTD |= (1<<4); //PD4 goes high - } - break; -``` - -This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. - - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. -Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. -Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. -Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. - -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/gamenum/config.h b/keyboards/gamenum/config.h deleted file mode 100644 index 6af876ab7..000000000 --- a/keyboards/gamenum/config.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x1234 -#define PRODUCT_ID 0x5678 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Seth-Senpai -#define PRODUCT GameNum -#define DESCRIPTION Numpad with gamelayers - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 4 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } -#define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -// #define BACKLIGHT_PIN C6 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/gamenum/gamenum.c b/keyboards/gamenum/gamenum.c deleted file mode 100644 index 8048194bb..000000000 --- a/keyboards/gamenum/gamenum.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "gamenum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - DDRC |= (1<<6); - PORTC &= ~(1<<6); - - DDRD |= (1<<4); - PORTD &= ~(1<<4); - - matrix_init_user(); - -} diff --git a/keyboards/gamenum/gamenum.h b/keyboards/gamenum/gamenum.h deleted file mode 100644 index ea633b9bf..000000000 --- a/keyboards/gamenum/gamenum.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef GAMENUM_H -#define GAMENUM_H - -#include "quantum.h" - -#define KEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, \ - k41, k42, k43 \ -) \ -{ \ - { k00, k01, k02, k03}, \ - { k10, k11, k12, k13}, \ - { k20, k21, k22, KC_NO}, \ - { k30, k31, k32, KC_NO}, \ - { KC_NO, k41, k42, k43} \ -} - -#endif diff --git a/keyboards/gamenum/keymaps/default/keymap.c b/keyboards/gamenum/keymaps/default/keymap.c deleted file mode 100644 index 6950b741a..000000000 --- a/keyboards/gamenum/keymaps/default/keymap.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "gamenum.h" -#include "action_layer.h" -#include "eeconfig.h" - - -#define _______ KC_TRNS - -#define DEF 0 -#define HDN 1 -#define OSY 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DEF] = KEYMAP( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ - KC_7, KC_8, KC_9, KC_PLUS, \ - KC_4, KC_5, KC_6, \ - KC_1, KC_2, KC_3, \ - KC_0, KC_DOT, KC_ENT \ -), -[HDN] = KEYMAP( - KC_FN1, KC_1, KC_2, KC_3, \ - KC_Q, KC_W, KC_E, KC_R, \ - KC_A, KC_S, KC_D, \ - KC_Z, KC_X, KC_C, \ - KC_LSFT, KC_LALT, KC_SPC \ -), -[OSY] = KEYMAP( - KC_A, KC_Q, KC_1, KC_FN2, \ - KC_S, KC_W, KC_2, KC_LALT, \ - KC_D, KC_E, KC_3, \ - KC_F, KC_R, KC_4, \ - KC_SPC, KC_T, KC_TAB \ -) -}; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_SET(HDN, ON_PRESS), - [1] = ACTION_LAYER_SET(OSY, ON_PRESS), - [2] = ACTION_LAYER_SET(DEF, ON_PRESS), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; - - -bool process_record_user (uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case KC_FN0: - if (record->event.pressed) { - PORTC |= (1 << 6); // PC6 goes high - } - break; - case KC_FN1: - if (record->event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes high - PORTD |= (1<<4); - } - break; - case KC_FN2: - if (record->event.pressed) { - PORTD &= ~(1 << 4); // PC6 goes high - } - break; - } - return true; -} \ No newline at end of file diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile new file mode 100644 index 000000000..afb9372e1 --- /dev/null +++ b/keyboards/handwired/gamenum/Makefile @@ -0,0 +1,73 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md new file mode 100644 index 000000000..22f67ee61 --- /dev/null +++ b/keyboards/handwired/gamenum/README.md @@ -0,0 +1,92 @@ +GameNum firmware +====================== +## Board overview + +The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. +The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. +The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. + +The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. + +## Build conciderations + +Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. +Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. +The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. +'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. + +Schematic of the build is coming soon. + +## Adding more layers + +Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. + +Next thing to do is to add the actual layer for the keymap. + +``` +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +) +``` + +This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: +In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! + +Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. +The number that is at the end of the keycode corresponds with the code in the function. +`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. + +Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. +Look for this piece of code: + +``` + DDRD |= (1<<4); + PORTD &= ~(1<<4); +``` + +Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes low + PORTD |= (1<<4); //PD4 goes high + } + break; +``` + +This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. +Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. +Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h new file mode 100644 index 000000000..6af876ab7 --- /dev/null +++ b/keyboards/handwired/gamenum/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Seth-Senpai +#define PRODUCT GameNum +#define DESCRIPTION Numpad with gamelayers + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN C6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/gamenum/gamenum.c b/keyboards/handwired/gamenum/gamenum.c new file mode 100644 index 000000000..8048194bb --- /dev/null +++ b/keyboards/handwired/gamenum/gamenum.c @@ -0,0 +1,14 @@ +#include "gamenum.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + DDRC |= (1<<6); + PORTC &= ~(1<<6); + + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + matrix_init_user(); + +} diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h new file mode 100644 index 000000000..ea633b9bf --- /dev/null +++ b/keyboards/handwired/gamenum/gamenum.h @@ -0,0 +1,21 @@ +#ifndef GAMENUM_H +#define GAMENUM_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) \ +{ \ + { k00, k01, k02, k03}, \ + { k10, k11, k12, k13}, \ + { k20, k21, k22, KC_NO}, \ + { k30, k31, k32, KC_NO}, \ + { KC_NO, k41, k42, k43} \ +} + +#endif diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c new file mode 100644 index 000000000..6950b741a --- /dev/null +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include "gamenum.h" +#include "action_layer.h" +#include "eeconfig.h" + + +#define _______ KC_TRNS + +#define DEF 0 +#define HDN 1 +#define OSY 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +), +[HDN] = KEYMAP( + KC_FN1, KC_1, KC_2, KC_3, \ + KC_Q, KC_W, KC_E, KC_R, \ + KC_A, KC_S, KC_D, \ + KC_Z, KC_X, KC_C, \ + KC_LSFT, KC_LALT, KC_SPC \ +), +[OSY] = KEYMAP( + KC_A, KC_Q, KC_1, KC_FN2, \ + KC_S, KC_W, KC_2, KC_LALT, \ + KC_D, KC_E, KC_3, \ + KC_F, KC_R, KC_4, \ + KC_SPC, KC_T, KC_TAB \ +) +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_SET(HDN, ON_PRESS), + [1] = ACTION_LAYER_SET(OSY, ON_PRESS), + [2] = ACTION_LAYER_SET(DEF, ON_PRESS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_FN0: + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + break; + case KC_FN1: + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + break; + case KC_FN2: + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3 From 0f06e94d5d8a07d0d896bf2cc72058ae11d17450 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 09:07:37 +0000 Subject: update readme --- keyboards/handwired/gamenum/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md index 22f67ee61..9e22ff2fc 100644 --- a/keyboards/handwired/gamenum/README.md +++ b/keyboards/handwired/gamenum/README.md @@ -2,14 +2,14 @@ GameNum firmware ====================== ## Board overview -The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited. It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. -## Build conciderations +## Build considerations Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. @@ -20,7 +20,7 @@ Schematic of the build is coming soon. ## Adding more layers -Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. Next thing to do is to add the actual layer for the keymap. @@ -50,9 +50,9 @@ Look for this piece of code: PORTD &= ~(1<<4); ``` -Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<] ``` Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` + + -- cgit v1.2.3 From 8dd69a1b05770be3131f6e5917e2552ec6579519 Mon Sep 17 00:00:00 2001 From: coderkun Date: Mon, 3 Oct 2016 16:36:21 +0200 Subject: Overwrite method hex_to_unicode() for make it compatible with Neo --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index 238971e81..b62b14449 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -290,3 +290,28 @@ void unicode_input_start (void) { unregister_code(KC_LSFT); unregister_code(KC_LCTL); }; + +// Override method to use NEO_A instead of KC_A +uint16_t hex_to_keycode(uint8_t hex) +{ + if (hex == 0x0) { + return KC_0; + } else if (hex < 0xA) { + return KC_1 + (hex - 0x1); + } else { + switch(hex) { + case 0xA: + return NEO_A; + case 0xB: + return NEO_B; + case 0xC: + return NEO_C; + case 0xD: + return NEO_D; + case 0xE: + return NEO_E; + case 0xF: + return NEO_F; + } + } +} -- cgit v1.2.3 From aa9c6e9f59c5e45c6ea71cd3aa8fb037e88c11b6 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 3 Oct 2016 19:20:00 +0200 Subject: ergodox: Update algernon's keymap to v1.8 ADORE ----- * Major rearrangements were made, to reduce pinky use, and to balance out the hand usage. Tools ----- * The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered. * The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned. Miscellaneous ------------- * Fixed the **Steno** toggle key. * My wife is now present on the keyboard too. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/NEWS.md | 145 +++++++++++++++++++++ .../keymaps/algernon/images/adore-layer.png | Bin 97225 -> 97089 bytes .../keymaps/algernon/images/steno-layer.png | Bin 69557 -> 64086 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 41 +++--- keyboards/ergodox/keymaps/algernon/readme.md | 133 +------------------ .../algernon/tools/heatmap-layout.ADORE.json | 27 ++-- .../ergodox/keymaps/algernon/tools/hid-commands | 12 ++ .../keymaps/algernon/tools/log-to-heatmap.py | 5 + .../ergodox/keymaps/algernon/tools/text-to-log.py | 24 ++-- 9 files changed, 212 insertions(+), 175 deletions(-) create mode 100644 keyboards/ergodox/keymaps/algernon/NEWS.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md new file mode 100644 index 000000000..6b95c1ef4 --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/NEWS.md @@ -0,0 +1,145 @@ +## v1.8 + +*2016-10-03* + +### ADORE + +* Major rearrangements were made, to reduce pinky use, and to balance out the hand usage. + +### Tools + +* The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered. +* The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned. + +### Miscellaneous + +* Fixed the [Steno](#steno-layer) toggle key. + +## v1.7 + +*2016-09-18* + +### Overall changes + +* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. +* The number/function key behavior was changed: function keys are now on the **Media**. +* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers. +* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. +* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. + +### ADORE + +* `Y` and `X` have been swapped again. + +### Media/Navigation layer + +* The function keys are now on this layer. +* Mouse keys have been removed. +* Media start/stop/prev/next have been removed. +* `Print screen` has been removed. +* There is only one screen lock key now. + +### Heatmap + +* Fixed a few issues in the finger-stats calculation. +* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. +* The heatmap tool will now colorize the stats by default. +* The periodic stats are now printed in a more compact format. + +### Tools + +* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. +* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. +* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. + +## v1.6 + +*2016-08-24* + +### Base layer changes + +* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. +* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. +* The `Apps` key has been replaced by `F12`. +* The `-`/`_` is no longer a tap-dance key. + +### ADORE layer changes + +* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. + +### Miscellaneous changes + +* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. +* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. +* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. + +### Heatmap + +* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. +* The heatmap generator received a lot of updates. + +## v1.5 + +*2016-08-12* + +* The **1HAND** layer has been removed. +* A `Delete` key is now available on the right thumb cluster. +* The [ADORE](#adore-layer) layer received a major update, see the layout image above. +* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. +* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). +* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. +* There is some experimental support for entering Unicode symbols. + +## v1.4 + +*2016-07-29* + +* When toggling the key logging on or off, the LEDs will do a little dance. +* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. +* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key. +* The `-`/`_` key was turned into a tap-dance key too. +* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. + +## v1.3 + +*2016-07-06* + +* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. +* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. +* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. +* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. + +## v1.2 + +*2016-06-22* + +* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). +* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. +* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. +* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. +* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. +* `LEAD v` types the firmware version, and the keymap version. +* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. +* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. + +## v1.1 + +*2016-06-14* + +* The keyboard starts in NKRO mode, bootmagic and other things are disabled. +* A [Steno](#steno-layer) layer was added, to be used with Plover. +* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. +* `LEAD y` types `\o/`. +* Some keys on the [Base](#base-layer) layer have been moved around: + - `?` moved to the left pinky, left of `Q`. + - `=` shifted one row down, but `F11` stayed where it was. + - `-` on the left half was replaced by `Tab`. + - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. + - `:` now inputs `;` when shifted. +* `ESC` cancels the **Hungarian** layer too, not just modifiers. + +## v1.0 + +*2016-05-26* + +Initial version. diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index b611fbc42..5f39010bb 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png and b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/steno-layer.png b/keyboards/ergodox/keymaps/algernon/images/steno-layer.png index fe3c03c93..9a2ba55ef 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/steno-layer.png and b/keyboards/ergodox/keymaps/algernon/images/steno-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 248a0ed30..48d63fb0b 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -160,11 +160,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------. ,-----------------------------------------------------. * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ | + * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | | + * | | Z | Q | ' | , | . | | | pane | B | K | V | Y | J | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [ADORE] = KEYMAP( // left hand KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 -,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) +,KC_BSLS ,KC_X ,KC_W ,KC_C ,KC_H ,KC_F ,TD(CT_LBP) ,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U ,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) @@ -190,9 +190,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) - ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS + ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL - ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO + ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL @@ -386,7 +386,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 6: Steno for Plover * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | BASE | | | | | | | | | + * | | | | | | | | | | | | | | | BASE | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | # | # | # | # | # | # | | # | # | # | # | # | # | # | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -407,7 +407,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [PLVR] = KEYMAP( // left hand -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, @@ -417,7 +417,7 @@ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, PV_A, PV_O, KC_NO, // right hand - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, @@ -617,6 +617,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code (KC_LGUI); if (record->tap.count && !record->tap.interrupted) { if (record->tap.count >= 2) { + uprintf("CMD:appsel_start\n"); layer_on (APPSEL); set_oneshot_layer (APPSEL, ONESHOT_START); } @@ -695,15 +696,15 @@ void matrix_init_user(void) { LEADER_EXTERNS(); -static void ang_tap (uint8_t code, ...) { - uint8_t kc = code; +static void ang_tap (uint16_t code, ...) { + uint16_t kc = code; va_list ap; va_start(ap, code); do { - register_code(kc); - unregister_code(kc); + register_code16(kc); + unregister_code16(kc); wait_ms(50); kc = va_arg(ap, int); } while (kc != 0); @@ -866,6 +867,17 @@ void matrix_scan_user(void) { leading = false; leader_end (); + SEQ_ONE_KEY (KC_C) { + ang_tap (LSFT(KC_C), KC_S, KC_I, KC_L, KC_L, KC_RALT, KC_QUOT, KC_A, KC_M, KC_A, KC_S, + KC_S, KC_Z, KC_O, KC_N, KC_Y, KC_K, KC_RALT, KC_QUOT, KC_A, KC_M, 0); + } + + SEQ_ONE_KEY (KC_G) { + ang_tap (LSFT(KC_G), KC_E, KC_J, KC_G, KC_RALT, KC_EQL, KC_O, + KC_RALT, KC_EQL, KC_O, + KC_RALT, KC_EQL, KC_O, 0); + } + #if KEYLOGGER_ENABLE SEQ_ONE_KEY (KC_D) { ergodox_led_all_on(); @@ -875,11 +887,6 @@ void matrix_scan_user(void) { } #endif - SEQ_ONE_KEY (KC_Q) { - register_code16 (LCTL(KC_1)); - unregister_code16 (LCTL(KC_1)); - } - SEQ_ONE_KEY (KC_T) { time_travel = !time_travel; } diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index f15b67652..822ca3650 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -27,7 +27,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs] - [Unicode Symbol Input](#unicode-symbol-input) * [Building](#building) - [Using on Windows](#using-on-windows) -* [Changelog](#changelog) +* [Changelog](https://github.com/algernon/ergodox-layout/blob/master/NEWS.md#readme) * [License](#license) # Layouts @@ -145,137 +145,6 @@ $ make keyboard=ergodox keymap=algernon The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line. -# Changelog - -## v1.7 - -*2016-09-18* - -### Overall changes - -* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. -* The number/function key behavior was changed: function keys are now on the **Media**. -* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers. -* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. -* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. - -### ADORE - -* `Y` and `X` have been swapped again. - -### Media/Navigation layer - -* The function keys are now on this layer. -* Mouse keys have been removed. -* Media start/stop/prev/next have been removed. -* `Print screen` has been removed. -* There is only one screen lock key now. - -### Heatmap - -* Fixed a few issues in the finger-stats calculation. -* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. -* The heatmap tool will now colorize the stats by default. -* The periodic stats are now printed in a more compact format. - -### Tools - -* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. -* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. -* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. - -## v1.6 - -*2016-08-24* - -### Base layer changes - -* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. -* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. -* The `Apps` key has been replaced by `F12`. -* The `-`/`_` is no longer a tap-dance key. - -### ADORE layer changes - -* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. - -### Miscellaneous changes - -* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. -* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. -* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. - -### Heatmap - -* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. -* The heatmap generator received a lot of updates. - -## v1.5 - -*2016-08-12* - -* The **1HAND** layer has been removed. -* A `Delete` key is now available on the right thumb cluster. -* The [ADORE](#adore-layer) layer received a major update, see the layout image above. -* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. -* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). -* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. -* There is some experimental support for entering Unicode symbols. - -## v1.4 - -*2016-07-29* - -* When toggling the key logging on or off, the LEDs will do a little dance. -* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. -* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key. -* The `-`/`_` key was turned into a tap-dance key too. -* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. - -## v1.3 - -*2016-07-06* - -* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. -* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. -* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. -* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. - -## v1.2 - -*2016-06-22* - -* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). -* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. -* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. -* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. -* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. -* `LEAD v` types the firmware version, and the keymap version. -* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. -* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. - -## v1.1 - -*2016-06-14* - -* The keyboard starts in NKRO mode, bootmagic and other things are disabled. -* A [Steno](#steno-layer) layer was added, to be used with Plover. -* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. -* `LEAD y` types `\o/`. -* Some keys on the [Base](#base-layer) layer have been moved around: - - `?` moved to the left pinky, left of `Q`. - - `=` shifted one row down, but `F11` stayed where it was. - - `-` on the left half was replaced by `Tab`. - - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. - - `:` now inputs `;` when shifted. -* `ESC` cancels the **Hungarian** layer too, not just modifiers. - -## v1.0 - -*2016-05-26* - -Initial version. - # License The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version. diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json index 502d1e6ea..a34edcf87 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -111,11 +111,11 @@ "x": 3.5, "a": 6 }, - "G", + "C", { "x": 10.5 }, - "C" + "L" ], [ { @@ -128,11 +128,11 @@ "x": 1, "a": 6 }, - "L", + "H", { "x": 8.5 }, - "H", + "G", { "x": 1 }, @@ -143,7 +143,7 @@ "y": -0.875, "x": 5.5 }, - "M", + "F", { "a": 4, "fa": [0, 0, 0], @@ -158,7 +158,7 @@ { "a": 6 }, - "F" + "M" ], [ { @@ -167,7 +167,7 @@ "a": 4, "w": 1.5 }, - "\n\n~\n`", + "\n\n|\n\\", { "a": 6, "f": 3 @@ -175,14 +175,14 @@ "X", { "x": 14.5, - "a": 6 + "a": 4 }, - "Y", + "/\n?", { "a": 4, "w": 1.5 }, - "|\n\\" + "~\n`" ], [ { @@ -312,7 +312,7 @@ { "x": 1 }, - "J" + "Y" ], [ { @@ -342,10 +342,9 @@ }, "Z", { - "x": 14.5, - "a": 4 + "x": 14.5 }, - "?\n/", + "J", { "f": 9, "g": true, diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands index f3b83cf6d..2a6710be4 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands +++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands @@ -1,6 +1,8 @@ #!/bin/bash set -e +LAST_APPSEL_START=0 + cmd_wm () { WIN="$(xdotool getactivewindow)" wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz @@ -34,6 +36,16 @@ cmd_appsel_chrome () { _cmd_appsel chromium } +cmd_appsel_start () { + APPSEL_START=$(date +%s) + if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then + return + fi + LAST_APPSEL_START=$APPSEL_START + notify-send -t 1000 "Please select an application!" -c device -u low \ + -i /usr/share/icons/Adwaita/24x24/devices/video-display.png +} + cmd_help () { cat < + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* prevent the modifiers from being stuck, sacrificing some memory */ +#define PREVENT_STUCK_MODIFIERS + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c new file mode 100644 index 000000000..80c4a516c --- /dev/null +++ b/keyboards/planck/keymaps/vifon/keymap.c @@ -0,0 +1,187 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif +#include "timer.h" +#include + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum userlayer { + _QW = 0, + _CM, + _PP, + _PPG, + _NM, + _LW, + _RS, + _DL, + _DYN, +}; + +enum planck_keycodes { + KM_LW = SAFE_RANGE, + KM_RS, + KM_SHLK, /* ShiftLock */ + KM_RST, /* Reset */ + KM_NUM, /* Numeric layer */ + KM_SLP, /* Sleep 250 ms */ + KM_PPLR, /* Pure Pro layer */ + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = { /* Qwerty */ + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN0 }, + {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL} +}, +[_CM] = { /* Colemak */ + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN0 }, + {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL} +}, +[_PP] = { /* Pure Pro */ + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_UP, KC_RCTL}, + {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT} +}, +[_PPG] = { /* Pure Pro: Gaming */ + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______}, + {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______}, +}, +[_NM] = { /* Numeric */ + {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, KC_FN0 }, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} +}, +[_LW]= { /* LOWER */ + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_ESC, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KM_NUM, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), KM_SLP, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_ENT }, + {_______, BL_TOGG, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, +[_RS]= { /* RAISE */ + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL }, + {KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), KM_PPLR, KM_RST, KC_ENT }, + {_______, BL_STEP, _______, _______, _______, KC_BTN2, KC_BTN2, _______, KC_MPLY, KC_VOLD, KC_VOLU, _______} +}, +[_DL]= { /* DUAL */ + {_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, _______}, + {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ACL0, KC_ACL2}, + {_______, _______, KC_BTN2, KC_BTN3, KC_BTN1, KC_WWW_BACK, KC_WWW_FORWARD, KC_MUTE, _______, _______, _______, _______}, + {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______} +}, +[_DYN]= { /* special */ + {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS}, + {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK}, + {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, +}; + +#undef _______ + +const uint16_t PROGMEM fn_actions[] = { + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t key_timer; + + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + switch (keycode) { + case KM_LW: + if (record->event.pressed) { + layer_on(_LW); + } else { + layer_off(_LW); + } + update_tri_layer(_LW, _RS, _DL); + return false; + break; + case KM_RS: + if (record->event.pressed) { + layer_on(_RS); + } else { + layer_off(_RS); + } + update_tri_layer(_LW, _RS, _DL); + return false; + break; + case KM_SHLK: + register_code(KC_LSFT); + break; + case KM_RST: + if (record->event.pressed) { + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) >= 500) { + clear_keyboard(); + backlight_toggle(); + _delay_ms(250); + backlight_toggle(); + bootloader_jump(); + } + } + break; + case KM_PPLR: + if (record->event.pressed) { + key_timer = timer_read(); + } else { + if (timer_elapsed(key_timer) >= 250) { + default_layer_set((1UL << _PP) | (1UL << _PPG)); + backlight_toggle(); + _delay_ms(100); + backlight_toggle(); + } else { + default_layer_set(1UL << _PP); + } + } + break; + case KM_NUM: + layer_on(_NM); + break; + case KM_SLP: + if (record->event.pressed) { + _delay_ms(250); + } + break; + } + + + if (record->event.pressed + && IS_LAYER_ON(_NM) + && keymap_key_to_keycode(_NM, record->event.key) == KC_TRNS) { + + layer_off(_NM); + } + + return true; +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +} -- cgit v1.2.3 From f284bc6af9995453fc7be2e94ae134bc42b90204 Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Sun, 9 Oct 2016 11:36:52 -0400 Subject: Switched to momentary Also updated the style of these lines slightly to match the style of the default keymap --- keyboards/ergodox/keymaps/j3rn/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/j3rn/keymap.c b/keyboards/ergodox/keymaps/j3rn/keymap.c index e6f6cf44e..d913ea4a5 100644 --- a/keyboards/ergodox/keymaps/j3rn/keymap.c +++ b/keyboards/ergodox/keymaps/j3rn/keymap.c @@ -36,21 +36,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, CTL_T(KC_ESC), 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), - KC_FN1, KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + MO(SYMB), KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_HOME, KC_END, - KC_SPC, KC_LGUI, KC_FN2, + KC_SPC,KC_LGUI,MO(MDIA), // right hand KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB), - KC_PGUP, CTL_T(KC_ESC), + KC_PGUP, CTL_T(KC_ESC), KC_PGDN, - KC_FN1, KC_TAB, KC_ENT + MO(SYMB),KC_TAB, KC_ENT ), /* Keymap 1: Symbol Layer * -- cgit v1.2.3 From 0ae07ae64d3549d34c021f70b4a9877e5cd9ced9 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:11:52 +0300 Subject: Tune the snake and knight effect parameters for Cluecard --- keyboards/cluecard/keymaps/rgb_effects/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h index 441db52d9..e88847df4 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/config.h +++ b/keyboards/cluecard/keymaps/rgb_effects/config.h @@ -5,5 +5,8 @@ // place overrides here #define RGBLIGHT_TIMER +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 #endif -- cgit v1.2.3 From 02c9a992157d15c4988b9dc46cfa2f76bfea655c Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:27:11 +0300 Subject: Tune snake and knight intervals for Cluecard --- keyboards/cluecard/keymaps/rgb_effects/keymap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c index 3b6855825..74c95ce8a 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/keymap.c +++ b/keyboards/cluecard/keymaps/rgb_effects/keymap.c @@ -10,6 +10,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85}; +const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85}; + void matrix_init_user(void) { } -- cgit v1.2.3 From db4dce731216cb6cdac65cb528329fd0caca5aa3 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:37:47 +0300 Subject: Update the Cluecard readme files --- keyboards/cluecard/keymaps/default/readme.md | 4 ++++ keyboards/cluecard/keymaps/rgb_effects/readme.md | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/cluecard/keymaps/default/readme.md b/keyboards/cluecard/keymaps/default/readme.md index 9e3b97bea..fa4e8ccad 100644 --- a/keyboards/cluecard/keymaps/default/readme.md +++ b/keyboards/cluecard/keymaps/default/readme.md @@ -1 +1,5 @@ # The default keymap for cluecard + +Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. +So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness +buttons. You can of course also turn them on and off with the on/off button. diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md index fa710b464..949cac394 100644 --- a/keyboards/cluecard/keymaps/rgb_effects/readme.md +++ b/keyboards/cluecard/keymaps/rgb_effects/readme.md @@ -1,3 +1,7 @@ # RGB effect test keymap for cluecard -This keymap has audio disabled, and the RGB mode button does not go through the different effects +This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each +effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check +the `rgblight.c` file. + +The hue, saturation and brightness buttons will work depending on which effect is active. -- cgit v1.2.3 From e95c1e3f2c5137b114aa947f875c52e4a5c74b5d Mon Sep 17 00:00:00 2001 From: Nathan Johnson Date: Sat, 8 Oct 2016 13:20:36 -0500 Subject: Adding whiskey_tango_foxtrot_capslock ergodox keymap --- .../osx_whiskey_tango_foxtrot_capslock/keymap.c | 231 +++++++++++++++++++++ .../osx_whiskey_tango_foxtrot_capslock.png | Bin 0 -> 185064 bytes .../osx_whiskey_tango_foxtrot_capslock/readme.md | 38 ++++ 3 files changed, 269 insertions(+) create mode 100644 keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c create mode 100644 keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png create mode 100644 keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c new file mode 100644 index 000000000..98d2836ab --- /dev/null +++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c @@ -0,0 +1,231 @@ +/* + * This is built out of frustration with OSX / Sierra caps lock delay. + * Fake it till you make it! + */ + +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "timer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define BLINK_BASE 150U // timer threshold for blinking on MDIA layer + +typedef enum onoff_t {OFF, ON} onoff; + +#define caps_led_on ergodox_right_led_2_on +#define caps_led_off ergodox_right_led_2_off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | ` | 7 | 8 | 9 | 0 | - | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsL | A | S | D | F | G |------| |------| H | J | K | L | ; | " | + * |--------+------+------+------+------+------| ~L1 | | ~L1 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Ctrl | Opt | Cmd | Left | Right| | Down | Up | Ctrl | Cmd | Opt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | L1 | | Alt | Ctrl ] + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * |Backsp| Del |------| |------| Enter | Spc | + * | | | End | | PgDn | | | + * `--------------------' `----------------------' + */ + + [BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC, + M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G), + KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), KC_FN0, + KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT, + KC_TRNS, KC_FN1, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + // right hand + KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS, + M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT, + KC_FN0, M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT, + KC_RALT, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L0 | L2 | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS + [SYMB] = KEYMAP( + // left hand + KC_GRV ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_FN3, KC_FN2, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 2: Media and tenkey + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BOOTL | | Mute | Vol- | Vol+ | F14 | F15 | | | | NumLk| / | * | - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| | | |------+-----+-------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | Enter| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | Enter| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L1 | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + // MEDIA AND TENKEY + [MDIA] = KEYMAP( + KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, KC_F15, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, + KC_FN4, KC_NO, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_NO, KC_NO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, + KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NO, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, + KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_NO, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_NO, + KC_NO, KC_NO, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + ACTION_LAYER_MOMENTARY(SYMB), // FN0 - Momentary Layer 1 (Symbols) + ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols) + ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media) + ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols) + ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia) + ACTION_LAYER_MOMENTARY(MDIA) // FN5 - Momentary Layer 2 (Mdia) +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + static onoff caps_state = OFF; + switch(id) { + case KC_CAPS: + if (record->event.pressed) { + // Toggle caps state; + if (caps_state == OFF) { + // Turn it on then! + caps_led_on(); + caps_state = ON; + } else { + caps_led_off(); + caps_state = OFF; + } + } + break; + default: + if (record->event.pressed) { + bool shifted = false; + if (caps_state == ON && get_mods() == 0) { + register_code(KC_LSFT); + shifted = true; + } + register_code(id); + if(shifted) { + unregister_code(KC_LSFT); + } + } else { + unregister_code(id); + } + 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); + + static onoff board_led_state = OFF; + static uint16_t dt = 0; + static uint8_t oldlayer = 0; + + if(oldlayer != layer) { + // Layer was just toggled. + if(layer == BASE) { + ergodox_board_led_off(); + board_led_state = OFF; + } else { + ergodox_board_led_on(); + board_led_state = ON; + } + } else if (layer >= MDIA) { + // We need to do blinking. + if(timer_elapsed(dt) > BLINK_BASE) { + // toggle + dt = timer_read(); + if(board_led_state == OFF) { + ergodox_board_led_on(); + board_led_state = ON; + } else { + ergodox_board_led_off(); + board_led_state = OFF; + } + } + } + oldlayer = layer; +} diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png new file mode 100644 index 000000000..8d49e5e61 Binary files /dev/null and b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png differ diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md new file mode 100644 index 000000000..618db6ff4 --- /dev/null +++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md @@ -0,0 +1,38 @@ +# The extra special ergodox build for MacOS Sierra caps lock users + +###Do you +- Hate the OSX / MacOS caps lock delay? +- Have an ergodox? + +###Then this might just be for you! + +[This](http://apple.stackexchange.com/questions/81234/how-to-remove-caps-lock-delay-on-apple-macbook-pro-aluminum-keyboard) +and [this](http://sleepycow.org/2014/07/removing-the-caps-lock-delay-on-a-macbook/) +are good workarounds for the caps lock delay, however none of these +work on Sierra. This abomination of a keymap simulates capslock to the best +of its abilities. +This means that it keeps track of caps lock state internally rather than +sending a caps lock keypress to the OS. It is smart enough to check for +modifiers, such as Control being held down, and stop it with the hanky panky +and just send on the key event unmolested even if FakeCaps is enabled. And +since the macro isn't even registered on the non-alphas, it will not affect +them regardless. Only in the event that FakeCaps is enabled and an alpha key +is pressed will it sneak in a shift keydown before the alpha keydown and +immediately afterward sneaks in a shift keyup. Generally this works well, +however there is one known issue: + +- Holding down a key will only have the first character in caps. For instance, + with caps lock on, if you hold down the 'a' key, you get: + + ``` + Aaaaaaaaaaaaaaaaaa + ``` + +I have only tested this on an original Ergodox with a Teensy 2.0. + +####Some other small tweaks + - Layer 0 board light is off + - Layer 1 board light is on solid + - Layer 2 board light blinks at speed controlled by BLINK_BASE + +![osx whiskey tango foxtrot](osx_whiskey_tango_foxtrot_capslock.png) -- cgit v1.2.3 From 932705706edc22774d89fb94ebad9ffe690a270c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 10 Oct 2016 01:34:34 +0700 Subject: Add example keymap --- keyboards/planck/keymaps/priyadi/Makefile | 26 ++ keyboards/planck/keymaps/priyadi/keymap.c | 417 +++++++++++++++++++++++++++++ keyboards/planck/keymaps/priyadi/readme.md | 1 + 3 files changed, 444 insertions(+) create mode 100644 keyboards/planck/keymaps/priyadi/Makefile create mode 100644 keyboards/planck/keymaps/priyadi/keymap.c create mode 100644 keyboards/planck/keymaps/priyadi/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile new file mode 100644 index 000000000..aa211d2f0 --- /dev/null +++ b/keyboards/planck/keymaps/priyadi/Makefile @@ -0,0 +1,26 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes # Unicode map +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c new file mode 100644 index 000000000..dd8652d34 --- /dev/null +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -0,0 +1,417 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" +#include "process_unicode.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _WORKMAN 2 +#define _PUNC 9 +#define _NUM 10 +#define _FUNC 11 +#define _EMOJI 12 +#define _ADJUST 16 + +enum planck_keycodes { + // layouts + QWERTY = SAFE_RANGE, + COLEMAK, + WORKMAN, + + // layer switchers + PUNC, + NUM, + FUNC, + EMOJI, + + // os switchers + LINUX, + WIN, + OSX, +}; + +// Fillers to make layering clearer +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// unicode map +enum unicode_name { + GRIN, // grinning face 😊 + TJOY, // tears of joy 😂 + SMILE, // grining face with smiling eyes 😁 + HEART, // heart ❤ + EYERT, // smiling face with heart shaped eyes 😍 + CRY, // crying face 😭 + SMEYE, // smiling face with smiling eyes 😊 + UNAMU, // unamused 😒 + KISS, // kiss 😘 + HART2, // two hearts 💕 + WEARY, // weary 😩 + OKHND, // ok hand sign 👌 + PENSV, // pensive 😔 + SMIRK, // smirk 😏 + RECYC, // recycle ♻ + WINK, // wink 😉 + THMUP, // thumb up 👍 + THMDN, // thumb down 👎 + PRAY, // pray 🙏 + PHEW, // relieved 😌 + MUSIC, // musical notes + FLUSH, // flushed 😳 + CELEB, // celebration 🙌 + CRY2, // crying face 😢 + COOL, // smile with sunglasses 😎 + NOEVS, // see no evil + NOEVH, // hear no evil + NOEVK, // speak no evil + POO, // pile of poo + EYES, // eyes + VIC, // victory hand + BHART, // broken heart + SLEEP, // sleeping face + SMIL2, // smiling face with open mouth & sweat + HUNRD, // 100 + CONFU, // confused + TONGU, // face with tongue & winking eye + DISAP, // disappointed + YUMMY, // face savoring delicious food + CLAP, // hand clapping + FEAR, // face screaming in fear + HORNS, // smiling face with horns + HALO, // smiling face with halo + BYE, // waving hand + SUN, // sun + MOON, // moon + SKULL, // skull +}; + +const uint32_t PROGMEM unicode_map[] = { + [GRIN] = 0x1F600, + [TJOY] = 0x1F602, + [SMILE] = 0x1F601, + [HEART] = 0x2764, + [EYERT] = 0x1f60d, + [CRY] = 0x1f62d, + [SMEYE] = 0x1F60A, + [UNAMU] = 0x1F612, + [KISS] = 0x1F618, + [HART2] = 0x1F495, + [WEARY] = 0x1F629, + [OKHND] = 0x1F44C, + [PENSV] = 0x1F614, + [SMIRK] = 0x1F60F, + [RECYC] = 0x267B, + [WINK] = 0x1F609, + [THMUP] = 0x1F44D, + [THMDN] = 0x1F44E, + [PRAY] = 0x1F64F, + [PHEW] = 0x1F60C, + [MUSIC] = 0x1F3B6, + [FLUSH] = 0x1F633, + [CELEB] = 0x1F64C, + [CRY2] = 0x1F622, + [COOL] = 0x1F60E, + [NOEVS] = 0x1F648, + [NOEVH] = 0x1F649, + [NOEVK] = 0x1F64A, + [POO] = 0x1F4A9, + [EYES] = 0x1F440, + [VIC] = 0x270C, + [BHART] = 0x1F494, + [SLEEP] = 0x1F634, + [SMIL2] = 0x1F605, + [HUNRD] = 0x1F4AF, + [CONFU] = 0x1F615, + [TONGU] = 0x1F61C, + [DISAP] = 0x1F61E, + [YUMMY] = 0x1F60B, + [CLAP] = 0x1F44F, + [FEAR] = 0x1F631, + [HORNS] = 0x1F608, + [HALO] = 0x1F607, + [BYE] = 0x1F44B, + [SUN] = 0x2600, + [MOON] = 0x1F314, + [SKULL] = 0x1F480, +}; + +// keymaps + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} +}, + +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_WORKMAN] = { + {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT }, + {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} +}, + +/* Punc + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | _ | + | { | } | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | \ | - | = | [ | ] | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | < | > | | + * `-----------------------------------------------------------------------------------' + */ +[_PUNC] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_GRV, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO}, + {_______, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT}, + {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, KC_LABK, KC_RABK, _______} +}, + +/* Num + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | @ | A | B | C | [ | ] | 4 | 5 | 6 | : |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | D | E | F | & | # | 1 | 2 | 3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | x | | | | 0 | , | . | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUM] = { + {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_COLN, KC_BSLS}, + {_______, _______, S(KC_D), S(KC_E), S(KC_F), KC_AMPR, KC_HASH, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, KC_X, _______, _______, KC_SPC, KC_SPC, KC_0, KC_COMM,KC_KP_DOT,_______, _______} +}, + +/* Func + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | | Left | Down | Right| PgDn | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | | | | Home | End | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |Print | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = { + {_______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_BSPC}, + {_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______}, + {_______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_HOME, KC_END, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,KC_PSCREEN} +}, + +/* Emoji + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_EMOJI] = { + {X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW)}, + {X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS)}, + {X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH)}, + { X(POO), X(EYES),X(HUNRD),X(TONGU),X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} +}, + +/* Adjust + * ,-----------------------------------------------------------------------------------. + * | | |Linux | Win | OSX | | |Qwerty|Colemk|Workmm| | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, _______, LINUX, WIN, OSX, _______, _______, QWERTY, COLEMAK, WORKMAN, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_workman[][2] = SONG(DVORAK_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_workman, false, 0); + #endif + persistant_default_layer_set(1UL<<_WORKMAN); + } + return false; + break; + case PUNC: + if (record->event.pressed) { + layer_on(_PUNC); + update_tri_layer(_PUNC, _EMOJI, _ADJUST); + } else { + layer_off(_PUNC); + update_tri_layer(_PUNC, _EMOJI, _ADJUST); + } + return false; + break; + case EMOJI: + if (record->event.pressed) { + layer_on(_EMOJI); + update_tri_layer(_PUNC, _EMOJI, _ADJUST); + } else { + layer_off(_EMOJI); + update_tri_layer(_PUNC, _EMOJI, _ADJUST); + } + return false; + break; + case NUM: + if (record->event.pressed) { + layer_on(_NUM); + } else { + layer_off(_NUM); + } + return false; + break; + case FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + } else { + layer_off(_FUNC); + } + return false; + break; + case LINUX: + set_unicode_input_mode(UC_LNX); + return false; + break; + case WIN: + set_unicode_input_mode(UC_WIN); + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + set_unicode_input_mode(UC_LNX); +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/priyadi/readme.md b/keyboards/planck/keymaps/priyadi/readme.md new file mode 100644 index 000000000..de2f25e53 --- /dev/null +++ b/keyboards/planck/keymaps/priyadi/readme.md @@ -0,0 +1 @@ +# Priyadi's Planck Layout \ No newline at end of file -- cgit v1.2.3 From 2855de5f0fdc6767b57877687b614687fdafa64c Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Tue, 20 Sep 2016 11:38:45 +0200 Subject: init keymap --- keyboards/ergodox/keymaps/pvinis/Makefile | 9 + keyboards/ergodox/keymaps/pvinis/keymap.c | 429 ++++++++++++++++++++++++++++++ 2 files changed, 438 insertions(+) create mode 100644 keyboards/ergodox/keymaps/pvinis/Makefile create mode 100644 keyboards/ergodox/keymaps/pvinis/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/Makefile b/keyboards/ergodox/keymaps/pvinis/Makefile new file mode 100644 index 000000000..7ceb51ce4 --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/Makefile @@ -0,0 +1,9 @@ +CONSOLE_ENABLE = no # for debugging + +SLEEP_LED_ENABLE = no # no led blinking while sleeping +NKRO_ENABLE = yes # disable for windows +TAP_DANCE_ENABLE = yes # tap-tap-tap + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c new file mode 100644 index 000000000..fce78772a --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c @@ -0,0 +1,429 @@ +// pvinis' ergodox keymap + +#include "ergodox.h" +#include "mousekey.h" + +// easier name for left ctrl-alt-gui +#define ALLM(kc) LCAG(kc) + +// layers +enum { + BASE = 0, + BEGIN, + QWERTY, + CARPALX, + SYSCTL, +}; + +// extra keys +enum { + NONE = 0, + + // mouse + MS_UL, // up left + MS_UR, // up right + MS_DL, // down left + MS_DR, // down right + + // tap dance + TD_FLSH, // flash keyboard +}; + +// application selection +// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon +#define AP_SLCK ALLM(KC_S) +#define AP_XCOD ALLM(KC_X) + +// keymaps +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * the base of the keyboard. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |4x FLASH| | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |BEGIN |QWERTY| |SYSCTL| | + * ,------|------|------| |------+--------+------. + * | | |CARPAL| |Slack | | | + * |Backsp|LShift|------| |------| Enter |Space | + * | | |SYSCTL| |Xcode | | | + * `--------------------' `----------------------' + */ +[BASE] = KEYMAP( + TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,TG(BEGIN) ,TG(QWERTY) + ,TG(CARPALX) + ,KC_BSPC ,KC_LSFT ,TG(SYSCTL) + + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,TG(SYSCTL) ,KC_NO + ,AP_SLCK + ,AP_XCOD ,KC_ENT ,KC_SPC +), + +/* BEGIN + * a beginner's keymap i currently use. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | + * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | ` | Cmd | | Cmd | | | | | ' | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[BEGIN] = KEYMAP( + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 +,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC +,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G +,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN +,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL + ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS + ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT + ,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT + ,KC_UP ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), + +/* QWERTY + * the default qwerty keymap. not really used, but i'll keep it here for now. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | S | D | F | G |------| |------| H | J | K | L | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[QWERTY] = KEYMAP( + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS +,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS +,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G +,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS + ,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS + ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS + ,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), + +/* CARPALX + * the keymap i would like to transition to. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | D | S | T | N | R |------| |------| I | A | E | O | H | | + * |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------| + * | | Z | X | C | V | J | | | | K | P | , | . | / | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Up | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[CARPALX] = KEYMAP( + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS +,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS +,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R +,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS + ,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS + ,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS + ,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), + + +/* SYSCTL + * a keymap to control my system. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | Mute |VolDn |VolUp | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | |MsUpL | MsUp |MsUpR | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | Lock | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | |MsDnL | MsDn | | | Sleep | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | Power| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | |MidClk| + * ,------|------|------| |------+------+------. + * | | | | | |Left |Right | + * | | |------| |------| Click| Click| + * | | | | | | | | + * `--------------------' `--------------------' + */ +[SYSCTL] = KEYMAP( + KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO + + /*,KC_POP*/,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO + /*,KC_PTRN*/,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LCTL(LSFT(KC_PWR)) + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_SLEP + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO +), + +/* TEMPLATE + * keymap template with transparent and non-transparent keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +/* +[TEMPLATE] = KEYMAP( + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS +,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + + ,KC_TRNS ,KC_TRNS + ,KC_TRNS + ,KC_TRNS ,KC_TRNS ,KC_TRNS +), +[TEMPLATE] = KEYMAP( + KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO +), +*/ +}; + +// keyboard initialization +void matrix_init_user() { + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set(i); + _delay_ms(5); + } + _delay_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set(i); + _delay_ms(10); + } + ergodox_led_all_off(); +} + +// extra keys +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + + // mouse + case MS_UL: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_LEFT); + } + break; + case MS_UR: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_RIGHT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_RIGHT); + } + break; + case MS_DL: + if (record->event.pressed) { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_LEFT); + } + break; + case MS_DR: + if (record->event.pressed) { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_RIGHT); + } else { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_RIGHT); + } + break; + } + return MACRO_NONE; +} + +// tap dances + +// flash keyboard on 4x tap, with leds +void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_1_on(); + break; + case 4: + ergodox_right_led_3_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_1_off(); + break; + } +} + +void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 4) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), +}; -- cgit v1.2.3 From bcc0fa5c81e2a1725379c86b095bd627fb89d29d Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Thu, 22 Sep 2016 11:12:27 +0200 Subject: add messenger --- keyboards/ergodox/keymaps/pvinis/keymap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c index fce78772a..8e1611454 100644 --- a/keyboards/ergodox/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c @@ -33,6 +33,7 @@ enum { // this is sending ctrl-alt-gui-, and this is picked up by hammerspoon #define AP_SLCK ALLM(KC_S) #define AP_XCOD ALLM(KC_X) +#define AP_MSGR ALLM(KC_M) // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -55,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,------|------|------| |------+--------+------. * | | |CARPAL| |Slack | | | * |Backsp|LShift|------| |------| Enter |Space | - * | | |SYSCTL| |Xcode | | | + * | | |SYSCTL| |Msngr | | | * `--------------------' `----------------------' */ [BASE] = KEYMAP( @@ -77,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,TG(SYSCTL) ,KC_NO ,AP_SLCK - ,AP_XCOD ,KC_ENT ,KC_SPC + ,AP_MSGR ,KC_ENT ,KC_SPC ), /* BEGIN -- cgit v1.2.3 From 538cdda78ec2e79a965205d0df974dfa5855c68e Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Thu, 22 Sep 2016 11:38:17 +0200 Subject: use wait_ms instead of _delay_ms --- keyboards/ergodox/keymaps/pvinis/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c index 8e1611454..df906201a 100644 --- a/keyboards/ergodox/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c @@ -331,12 +331,12 @@ void matrix_init_user() { ergodox_led_all_on(); for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { ergodox_led_all_set(i); - _delay_ms(5); + wait_ms(5); } - _delay_ms(1000); + wait_ms(1000); for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { ergodox_led_all_set(i); - _delay_ms(10); + wait_ms(10); } ergodox_led_all_off(); } @@ -402,9 +402,9 @@ void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { break; case 4: ergodox_right_led_3_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_2_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_1_off(); break; } @@ -419,9 +419,9 @@ void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { ergodox_right_led_1_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_2_off(); - _delay_ms(50); + wait_ms(50); ergodox_right_led_3_off(); } -- cgit v1.2.3 From 0853227edecf256a398347fb292a9fda74f242cb Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Tue, 11 Oct 2016 10:32:34 +0200 Subject: add readme --- keyboards/ergodox/keymaps/pvinis/Changelog.md | 7 +++ keyboards/ergodox/keymaps/pvinis/Readme.md | 65 +++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 keyboards/ergodox/keymaps/pvinis/Changelog.md create mode 100644 keyboards/ergodox/keymaps/pvinis/Readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/pvinis/Changelog.md b/keyboards/ergodox/keymaps/pvinis/Changelog.md new file mode 100644 index 000000000..e5816200b --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/Changelog.md @@ -0,0 +1,7 @@ +## v0.3 + +*2016-10-11* + +### Starting point + +* The starting point of this keymap. A beginner layout, and a couple placeholders. diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md new file mode 100644 index 000000000..2a4a0c8f3 --- /dev/null +++ b/keyboards/ergodox/keymaps/pvinis/Readme.md @@ -0,0 +1,65 @@ +pvinis' keymap +============== + +This is a getting-used-to keymap for the [ErgoDox EZ][ez]. It's very much a work in progress. + +[ez]: https://ergodox-ez.com/ + +## Table of Contents + +* [Todo](#todo) +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Beginner layer](#beginner-layer) + - [QWERTY layer](#qwerty-layer) + - [CARPALX layer](#carpalx-layer) + - [System Control layer](#system-control-layer) + - [Template layers](#template-layers) +* [Building](#building) + +# Todo + +- [ ] Generate images from keymap +- [ ] Implement algernon's heatmap +- [ ] Implement `KC_POP` + +# Layouts + +## Base layer + +This is the base layer that contains the common buttons of all keymaps. Right now, it has the top left button as a `flash` button when it's tapped 4 times, and the two thumb islands. The islands contain the `space` and `enter` keys on the right, the `backspace` and `shift` on the left, and all the 1x1 keys are just layer switches. +Every time I connect the keyboard, I press the `BEGIN` layer switch, and then start typing. +Recently, I added a few application "shortcuts", that basically call `ctrl`+`alt`+`cmd`+``, and `` is `S` for Slack, `X` for Xcode, `M` for Messenger. Using [Hammerspoon][hammerspoon], I show/hide the application. + +[hammerspoon]: http://www.hammerspoon.org/ + +## Beginner layer + +This is a basic keymap I use right now until I'm comfortable typing on the Ergodox. Currently uses a QWERTY layout, and the `([{}])` on the middle keys. Not a perfect layout, and its going to go away at some point, but for now thats my daily driver. + +## QWERTY layer + +This is basically the same as the `BEGIN` layer, but it might go away. I'm not using it, but I should have a QWERTY layout on the keyboard, in case someone else wants to try it out, or if I completely forget how keyboards work! At some point, this and the `BEGIN` layer will become one. + +## CARPALX layer + +This is here as a placeholder. I want to transition to [Carpalx QGMLWY][carpalx] or [White][white] at some point. They both look very interesting and more comfortable to type on, but after I'm confident with typing on the Ergodox. + +[carpalx]: http://mkweb.bcgsc.ca/carpalx/?full_optimization +[white]: https://github.com/mw8/white_keyboard_layout + +## System Control layer + +This one is a layer that, in time, will have controls like mouse movement, volume up/down, mute, sleep, restart, shutdown, etc. + +## Template layers + +I have two commented out layers that are just templates, so I can easily create a new layer. + +# Building + +``` +$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis +$ make +``` -- cgit v1.2.3 From e27a754b70434de88a37c4a572e4ca5f7730ff58 Mon Sep 17 00:00:00 2001 From: Jack & Erez Date: Wed, 12 Oct 2016 22:18:27 -0400 Subject: [Jack & Erez] Simplifies and documents TO --- keyboards/ergodox/keymaps/dave/keymap.c | 12 ++++++------ quantum/keymap.h | 5 ++++- readme.md | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dave/keymap.c b/keyboards/ergodox/keymaps/dave/keymap.c index 32c70097b..23c4e0490 100644 --- a/keyboards/ergodox/keymaps/dave/keymap.c +++ b/keyboards/ergodox/keymaps/dave/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H, CTL_T(KC_GRV),KC_NUBS,KC_NO, KC_NO, KC_LALT, KC_PSCREEN, KC_PSCREEN, - TO(PROG, ON_PRESS), + TO(PROG), KC_SPC, MO(NAVI), KC_LGUI, // right hand KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_RALT,KC_LBRC,KC_RBRC,KC_NO, CTL_T(KC_QUOT), MT(0x5, KC_NO), MT(0x5, KC_NO), - TO(PROG, ON_PRESS), + TO(PROG), KC_RGUI, MO(PROG), KC_SPC ), @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - TO(NAVI, ON_PRESS), + TO(NAVI), KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_EQUAL, @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_TRNS, KC_TRNS, KC_TRNS, - TO(NAVI, ON_PRESS), + TO(NAVI), KC_TRNS, KC_TRNS, KC_TRNS ), @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, - TO(BASE, ON_PRESS), + TO(BASE), KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - TO(BASE, ON_PRESS), + TO(BASE), KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/quantum/keymap.h b/quantum/keymap.h index 4b2192cb2..85c090972 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -296,7 +296,10 @@ enum quantum_keycodes { // ON_PRESS = 1 // ON_RELEASE = 2 // Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. -#define TO(layer, when) (layer | QK_TO | (when << 0x4)) +// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own +// keycode modeled after the old version, kept below for this. +/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */ +#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4)) // Momentary switch layer - 256 layer max #define MO(layer) (layer | QK_MOMENTARY) diff --git a/readme.md b/readme.md index f20ab41b1..80f0a3ab2 100644 --- a/readme.md +++ b/readme.md @@ -379,6 +379,8 @@ Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - `TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. +`TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). + ### Fun with modifier keys -- 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 (limited to 'keyboards') 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 f9d8cf35f614eb82351b3e5125472ad8c77b1ffa Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 16 Oct 2016 08:01:50 +0200 Subject: ergodox: Update algernon's keymap to v1.9 Overall changes =============== * `F12` was replaced by an `Fx` key, that activate the **Media** layer as a one-shot layer, and also `Alt` as a one-shot modifier. Base layer changes ================== * The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap. Miscellaneous ============= * `π` can now be entered with UCIS. * `🐁` can now be entered with UCIS. Tools ===== * The `tools/layer-notify` tool was removed, it was an example, which I don't use. `tools/hid-commands` -------------------- * Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty. * Will attempt to re-program the keyboard when receiving a `reflash` command. * No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs. * The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/NEWS.md | 62 +++++-- .../keymaps/algernon/images/adore-layer.png | Bin 97089 -> 97357 bytes .../ergodox/keymaps/algernon/images/base-layer.png | Bin 102142 -> 102318 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 192 ++++++++++++++------- keyboards/ergodox/keymaps/algernon/readme.md | 8 +- .../algernon/tools/heatmap-layout.ADORE.json | 2 +- .../algernon/tools/heatmap-layout.Dvorak.json | 2 +- .../ergodox/keymaps/algernon/tools/hid-commands | 14 +- .../ergodox/keymaps/algernon/tools/layer-notify | 12 -- 9 files changed, 189 insertions(+), 103 deletions(-) delete mode 100755 keyboards/ergodox/keymaps/algernon/tools/layer-notify (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md index 6b95c1ef4..e11998998 100644 --- a/keyboards/ergodox/keymaps/algernon/NEWS.md +++ b/keyboards/ergodox/keymaps/algernon/NEWS.md @@ -1,3 +1,33 @@ + + +## v1.9 + +*2016-10-16* + +### Overall changes + +* `F12` was replaced by an `Fx` key, that activate the **Media** layer as a one-shot layer, and also `Alt` as a one-shot modifier. + +### Base layer changes + +* The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap. + +### Miscellaneous + +* `π` can now be entered with UCIS. +* `🐁` can now be entered with UCIS. + +### Tools + +* The `tools/layer-notify` tool was removed, it was an example, which I don't use. + +#### `tools/hid-commands` + +* Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty. +* Will attempt to re-program the keyboard when receiving a `reflash` command. +* No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs. +* The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice. + ## v1.8 *2016-10-03* @@ -13,7 +43,7 @@ ### Miscellaneous -* Fixed the [Steno](#steno-layer) toggle key. +* Fixed the **Steno** toggle key. ## v1.7 @@ -21,9 +51,9 @@ ### Overall changes -* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. +* The number row has been completely rearranged on both the **Base** and the **ADORE** layers. * The number/function key behavior was changed: function keys are now on the **Media**. -* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers. +* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers. * The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. * A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. @@ -59,13 +89,13 @@ ### Base layer changes * The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. -* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. +* The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`. * The `Apps` key has been replaced by `F12`. * The `-`/`_` is no longer a tap-dance key. ### ADORE layer changes -* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. +* Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations. ### Miscellaneous changes @@ -84,9 +114,9 @@ * The **1HAND** layer has been removed. * A `Delete` key is now available on the right thumb cluster. -* The [ADORE](#adore-layer) layer received a major update, see the layout image above. -* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. -* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). +* The **ADORE** layer received a major update, see the layout image above. +* It is now possible to enable automatic logging for the **ADORE** layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. +* The `~` key and the `Media Next/Prev` key have been swapped on the **Base** layer. * On the **ARROW** layer, `Backspace` has been replaced by `Enter`. * There is some experimental support for entering Unicode symbols. @@ -104,33 +134,33 @@ *2016-07-06* -* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. -* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. -* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. +* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a *heatmap* out of the logs. +* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the **Base** layer for an image that shows where arrows are. +* The **experimental** layer has been redone, and is now called **ADORE**, and as such, can be enabled by `LEAD a` now. * Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. ## v1.2 *2016-06-22* -* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). +* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with certain operating systems. * The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. -* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. +* The `=` and `\` keys were swapped, `=` moved to the home row, on both the **Base** and the **experimental** layers. * The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. * The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. * `LEAD v` types the firmware version, and the keymap version. * On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. -* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. +* The **Steno** layer gained a few more `#` and `*` keys, to make it easier on my fingers. ## v1.1 *2016-06-14* * The keyboard starts in NKRO mode, bootmagic and other things are disabled. -* A [Steno](#steno-layer) layer was added, to be used with Plover. +* A **Steno** layer was added, to be used with Plover. * An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. * `LEAD y` types `\o/`. -* Some keys on the [Base](#base-layer) layer have been moved around: +* Some keys on the **Base** layer have been moved around: - `?` moved to the left pinky, left of `Q`. - `=` shifted one row down, but `F11` stayed where it was. - `-` on the left half was replaced by `Tab`. diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index 5f39010bb..f6c64ca64 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png and b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png index 2a981a470..5bd0611f6 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/base-layer.png and b/keyboards/ergodox/keymaps/algernon/images/base-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 48d63fb0b..bad240337 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -64,6 +64,9 @@ enum { A_8, A_9, A_0, + + // Fx + Fx, }; /* Fn keys */ @@ -86,6 +89,7 @@ enum { CT_RBP, CT_TMUX, CT_TPS, + CT_SR, }; /* States & timers */ @@ -103,6 +107,7 @@ bool log_enable = false; #endif bool time_travel = false; +bool skip_leds = false; static uint8_t is_adore = 0; @@ -113,13 +118,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Base Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | + * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| - * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop | + * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop/Reset| * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' @@ -144,10 +149,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) + ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL - ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP + ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,TD(CT_SR) ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL @@ -158,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 1: Adore layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | + * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| @@ -189,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) + ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO @@ -342,7 +347,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 5: Navigation & Media layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | | + * | | F9 | F7 | F5 | F3 | F1 |ScrLCK| | | F10 | F2 | F4 | F6 | F8 | | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * | | | | | | | | | | | | | | | | * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| @@ -362,7 +367,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [NMDIA] = KEYMAP( // left hand - KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO + KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,LGUI(KC_L) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -372,7 +377,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_NO ,KC_NO ,KC_TRNS // right hand - ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO + ,KC_TRNS ,KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -611,6 +616,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) toggle_steno(record->event.pressed); break; + /* Fx */ + case Fx: + if (record->event.pressed) { + set_oneshot_mods (MOD_LALT); + layer_on (NMDIA); + set_oneshot_layer (NMDIA, ONESHOT_START); + } else { + clear_oneshot_layer_state (ONESHOT_PRESSED); + } + break; + /* GUI & AppSel */ case A_GUI: if (record->event.pressed) { @@ -780,6 +796,56 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u unregister_code(kc); } +static void +_td_sr_each (qk_tap_dance_state_t *state, void *user_data) { + skip_leds = true; + + switch (state->count) { + case 1: + ergodox_right_led_3_on (); + break; + case 2: + ergodox_right_led_2_on (); + break; + case 3: + ergodox_right_led_1_on (); + break; + case 4: + ergodox_right_led_3_off (); + wait_ms (50); + ergodox_right_led_2_off (); + wait_ms (50); + ergodox_right_led_1_off (); + break; + } +} + +static void +_td_sr_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_MSTP); + } + if (state->count >= 4) { + uprintf("CMD:reflash\n"); + wait_ms (1000); + reset_keyboard (); + reset_tap_dance (state); + } +} + +static void +_td_sr_reset (qk_tap_dance_state_t *state, void *user_data) { + ergodox_right_led_1_off (); + wait_ms (50); + ergodox_right_led_2_off (); + wait_ms (50); + ergodox_right_led_3_off (); + + if (state->count == 1) { + unregister_code (KC_MSTP); + } +} + qk_tap_dance_action_t tap_dance_actions[] = { [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) ,[CT_TA] = { @@ -790,77 +856,75 @@ qk_tap_dance_action_t tap_dance_actions[] = { ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished) ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select) + ,[CT_SR] = ACTION_TAP_DANCE_FN_ADVANCED (_td_sr_each, _td_sr_finished, _td_sr_reset) }; // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - static uint32_t prev_layer_state; uint8_t layer = biton32(layer_state); bool is_arrow = false; - static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"}; - - if (layer_state != prev_layer_state) { - prev_layer_state = layer_state; - if (layer_lookup[layer]) - uprintf("LAYER: %s\n", layer_lookup[layer]); - } - if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) unregister_code (KC_LGUI); - if (layer == HUN) { - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - } else if (layer == NMDIA) { - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - } else if (layer == PLVR) { - ergodox_right_led_1_on (); - ergodox_right_led_2_on (); - ergodox_right_led_3_on (); - } else if (layer == ADORE) { - ergodox_right_led_1_on (); - ergodox_right_led_2_on (); - ergodox_right_led_3_on (); - - ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + if (!skip_leds) { + if (layer == HUN) { + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == NMDIA) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + } else if (layer == PLVR) { + ergodox_right_led_1_on (); + ergodox_right_led_2_on (); + ergodox_right_led_3_on (); + } else if (layer == ADORE) { + ergodox_right_led_1_on (); + ergodox_right_led_2_on (); + ergodox_right_led_3_on (); + + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + } } if (layer_state & (1UL << ARRW)) { - ergodox_right_led_1_on (); - ergodox_right_led_3_on (); + if (!skip_leds) { + ergodox_right_led_1_on (); + ergodox_right_led_3_on (); + } is_arrow = true; } - if (keyboard_report->mods & MOD_BIT(KC_LSFT) || - ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_1_set (LED_BRIGHTNESS_HI); - ergodox_right_led_1_on (); - } else { - ergodox_right_led_1_set (LED_BRIGHTNESS_LO); - if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) - ergodox_right_led_1_off (); - } + if (!skip_leds) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + ergodox_right_led_1_set (LED_BRIGHTNESS_HI); + ergodox_right_led_1_on (); + } else { + ergodox_right_led_1_set (LED_BRIGHTNESS_LO); + if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) + ergodox_right_led_1_off (); + } - if (keyboard_report->mods & MOD_BIT(KC_LALT) || - ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_2_set (LED_BRIGHTNESS_HI); - ergodox_right_led_2_on (); - } else { - ergodox_right_led_2_set (LED_BRIGHTNESS_LO); - if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE) - ergodox_right_led_2_off (); - } + if (keyboard_report->mods & MOD_BIT(KC_LALT) || + ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { + ergodox_right_led_2_set (LED_BRIGHTNESS_HI); + ergodox_right_led_2_on (); + } else { + ergodox_right_led_2_set (LED_BRIGHTNESS_LO); + if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE) + ergodox_right_led_2_off (); + } - if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || - ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_3_set (LED_BRIGHTNESS_HI); - ergodox_right_led_3_on (); - } else { - ergodox_right_led_3_set (LED_BRIGHTNESS_LO); - if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) - ergodox_right_led_3_off (); + if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || + ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { + ergodox_right_led_3_set (LED_BRIGHTNESS_HI); + ergodox_right_led_3_on (); + } else { + ergodox_right_led_3_set (LED_BRIGHTNESS_LO); + if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) + ergodox_right_led_3_off (); + } } LEADER_DICTIONARY() { @@ -974,7 +1038,9 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE UCIS_SYM("snowman", 0x2603), UCIS_SYM("coffee", 0x2615), UCIS_SYM("heart", 0x2764), - UCIS_SYM("bolt", 0x26a1) + UCIS_SYM("bolt", 0x26a1), + UCIS_SYM("pi", 0x03c0), + UCIS_SYM("mouse", 0x1f401) ); bool process_record_user (uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 822ca3650..015bd7cd3 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -43,6 +43,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest * The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. * The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. +* The **Fx** key is one-shot, and activates the **Media** layer, along with a one-shot `Alt`. * When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap. * Tapping the `:` key once yields `:`, tapping it twice yields `;`. * Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`. @@ -93,12 +94,7 @@ Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes. -The currently supported symbols are: - -- `snowman`: ☃ -- `kiss`: 😙 -- `rofl`: 🤣 -- `poop`: 💩 +For the list of supported symbols, please see the source. This is an experimental feature, and may or may not work reliably. diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json index a34edcf87..e09efecc4 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -65,7 +65,7 @@ "x": 4.5, "f": 3 }, - "F12", + "Fx", { "a": 4, "f": 3, diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json index 5b4ca06c3..1e53281c5 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json @@ -65,7 +65,7 @@ "x": 4.5, "f": 3 }, - "F12", + "Fx", { "a": 4, "f": 3, diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands index 2a6710be4..a29d38f41 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands +++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands @@ -16,7 +16,7 @@ _cmd_appsel () { } cmd_appsel_music () { - wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true + wmctrl -x -a rhythmbox || wmctrl -x -a spotify || wmctrl -x -a kodi || true xdotool key Escape } @@ -25,7 +25,7 @@ cmd_appsel_slack () { } cmd_appsel_emacs () { - _cmd_appsel emacs24 + _cmd_appsel emacs } cmd_appsel_term () { @@ -37,6 +37,10 @@ cmd_appsel_chrome () { } cmd_appsel_start () { + if [ ! -z "${DISABLE_APPSEL_START}" ]; then + return + fi + APPSEL_START=$(date +%s) if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then return @@ -46,6 +50,10 @@ cmd_appsel_start () { -i /usr/share/icons/Adwaita/24x24/devices/video-display.png } +cmd_reflash () { + teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true +} + cmd_help () { cat < 124212 bytes 3 files changed, 230 insertions(+) create mode 100644 keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c create mode 100644 keyboards/ergodox/keymaps/dvorak-hebrew/readme.md create mode 100644 keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c b/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c new file mode 100644 index 000000000..f3dc8c387 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c @@ -0,0 +1,225 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define HEB 1 // Hebrew-Dvorak +#define NUM 2 // symbols +#define NAV 3 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A | + * `----------------------------------' `------------------------------------' + * ,-------------. ,-------------. +* | DEL | WIN+D| | END | HOME | + * ,------|------|------| |------+--------+------. + * | | | SUPER| | PgUp | | | + * | BACK | CTRL |------| |------| Enter |SPACE | + * | SPACE| | ALT | | PgDn | | | + * `--------------------' `----------------------' + */ +[BASE] = KEYMAP( // layer 0 : default + // left hand + TG(HEB), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSFT), + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(NUM), + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, TG(NAV), + MO(NUM), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(NAV), + KC_DEL, KC_TRNS, + KC_LGUI, + KC_BSPC, KC_LCTL, KC_LALT, + // right hand + KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LBRC, KC_RBRC, KC_BSLS, LCTL(KC_Z), LCTL(KC_A), + KC_END, KC_HOME, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ), +/* Keymap 1: Hebrew Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A | + * `----------------------------------' `------------------------------------' + * ,-------------. ,-------------. +* | DEL | WIN+D| | END | HOME | + * ,------|------|------| |------+--------+------. + * | | | SUPER| | PgUp | | | + * | BACK | CTRL |------| |------| Enter |SPACE | + * | SPACE| | ALT | | PgDn | | | + * `--------------------' `----------------------' + */ +[HEB] = KEYMAP( // layer 0 : default + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_W, KC_QUOT, KC_SLSH, KC_R, KC_T, KC_TRNS, + KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_Y, KC_U, KC_E, KC_O, KC_P, KC_TRNS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_MPLY, + KC_TRNS, KC_N, KC_M, KC_COMM, KC_DOT, KC_I, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + /* Keymap 2: Numpad Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | NMLK | P/ | P* | P- | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | 7 | 8 | 9 | P+ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | P+ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | ENTER| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | ENTER| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUM] = KEYMAP( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TRNS, + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, + KC_P0, KC_P0, KC_DOT, KC_PENT, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 3: Arrows and Mouse Navigation Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | MUTE | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | F11 | | VOL | | | UP | | | | + * |--------+------+------+------+------+------| | | + |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | LEFT | DOWN | RIGHT| | | + * |--------+------+------+------+------+------| F12 | | VOL |------+------+------+------+------+--------| + * | | | | | | | | | - | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Lclk | Rclk | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | PL/PS| | + * ,------|------|------| |------+------+------. + * | | | | | NEXT | | | + * | | |------| |------| | | + * | | | | | PREV | | | + * `--------------------' `--------------------' + */ +[NAV] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_F11, + 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_F12, + 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_MUTE, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_VOLU, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, + KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPLY, KC_TRNS, + KC_MNXT, + KC_MPRV, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(NAV) // 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; + case 3: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md new file mode 100644 index 000000000..18c99dcfd --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md @@ -0,0 +1,5 @@ +#Dvorak-Hebrew + +*This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play. +*The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems. +*these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use 'hebrew-hw-dvorak' as os layout. diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png b/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png new file mode 100644 index 000000000..904391f22 Binary files /dev/null and b/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png differ -- cgit v1.2.3 From 31193b9cffb25464c4fe4dbaf0dd8ee1dfa0a191 Mon Sep 17 00:00:00 2001 From: 20lives Date: Tue, 18 Oct 2016 22:33:42 +0300 Subject: Update readme.md --- keyboards/ergodox/keymaps/dvorak-hebrew/readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md index 18c99dcfd..edb52d6ad 100644 --- a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md +++ b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md @@ -1,5 +1,7 @@ #Dvorak-Hebrew *This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play. + *The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems. -*these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use 'hebrew-hw-dvorak' as os layout. + +these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout. -- cgit v1.2.3 From 48eb5112b5972472ce8da735a50b9631029af001 Mon Sep 17 00:00:00 2001 From: 20lives Date: Tue, 18 Oct 2016 22:35:05 +0300 Subject: Update readme.md --- keyboards/ergodox/keymaps/dvorak-hebrew/readme.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md index edb52d6ad..9f0b45371 100644 --- a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md +++ b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md @@ -1,7 +1,9 @@ #Dvorak-Hebrew -*This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play. +* This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play. -*The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems. +* The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems. -these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout. +* these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout. + +![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png?raw=true) -- 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 (limited to 'keyboards') 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 (limited to 'keyboards') 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(-) (limited to 'keyboards') 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 826417bfc001377719c9034fe273d1596ba62c9c Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 18 Oct 2016 16:45:45 -0500 Subject: Updating Vision keyboard files --- keyboards/vision_division/keymaps/default/Makefile | 4 +- keyboards/vision_division/keymaps/default/keymap.c | 211 +++++++++++---------- 2 files changed, 116 insertions(+), 99 deletions(-) (limited to 'keyboards') diff --git a/keyboards/vision_division/keymaps/default/Makefile b/keyboards/vision_division/keymaps/default/Makefile index 5a930e85e..28060947a 100644 --- a/keyboards/vision_division/keymaps/default/Makefile +++ b/keyboards/vision_division/keymaps/default/Makefile @@ -2,7 +2,7 @@ # 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) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -18,4 +18,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 64118abdc..8622ee521 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -121,6 +121,7 @@ enum keyboard_macros { #define M_CP_CT M(MACRO_COPY_CUT) +#define M_COPY KC_FN1 #define SC_UNDO LCTL(KC_Z) #define SC_REDO LCTL(KC_Y) @@ -145,31 +146,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LAYER = LAYER_QWERTY .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | FN | PRINT | SCR LK | PAUSE | | F1 | F2 | F3 | F4 | XXXXXX | F5 | F6 | F7 | F8 | XXXXXX | F9 | F10 | F11 | F12 | | VOL DN | MUTE | VOL UP | BACKLT | + | VOL DN | MUTE | VOL UP | BACKLT | | F1 | F2 | F3 | F4 | XXXXXX | F5 | F6 | F7 | F8 | XXXXXX | F9 | F10 | F11 | F12 | | PRINT | SCR LK | PAUSE | FN | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | M1 | INS | HOME | PG UP | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | NUM LK | KP / | KP * | KP - | + | NUM LK | KP / | KP * | KP - | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | INS | HOME | PG UP | M1 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | M2 | DEL | END | PG DN | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | KP 7 | KP 8 | KP 9 | KP + | + | KP 7 | KP 8 | KP 9 | KP + | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | DEL | END | PG DN | M2 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | M3 | UL | UP | UR | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | KP 4 | KP 5 | KP 6 | KP + | + | KP 4 | KP 5 | KP 6 | KP + | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | CP/CT | UNDO | PASTE | M3 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | M4 | LEFT | CP/CT | RIGHT | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | KP 1 | KP 2 | KP 3 | KP Ent | + | KP 1 | KP 2 | KP 3 | KP Ent | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | XXXXXX | UP | XXXXXX | M4 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | M5 | DL | DOWN | DR | | LCTRL | XXXXXX | XXXXXX | LWIN | LALT | LOWER | SPACE . SPACE | UPPER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | KP 0 | KP , | KP . | KP Ent | + | KP 0 | KP , | KP . | KP Ent | | LCTRL | XXXXXX | LWIN | XXXXXX | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | LEFT | DOWN | RIGHT | M5 | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_QWERTY, \ - M_HELP , KC_PSCR, KC_SLCK, KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_MUTE, KC_VOLU, M_BACKL, \ - M_M1 , KC_INS , KC_HOME, KC_PGUP, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - M_M2 , KC_DEL , KC_END , KC_PGDN, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, \ - M_M3 , M_UL , KC_UP , M_UR , KC_CAPS, KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, \ - M_M4 , KC_LEFT, M_CP_CT, KC_RGHT, KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, \ - M_M5 , M_DL , KC_DOWN, M_DR , KC_LCTL, XXXXXXX, XXXXXXX, KC_LGUI, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT \ + KC_VOLD, KC_MUTE, KC_VOLU, M_BACKL, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, M_HELP , \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_INS , KC_HOME, KC_PGUP, M_M1 , \ + KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_DEL , KC_END , KC_PGDN, M_M2 , \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_CAPS, KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , M_CP_CT, SC_UNDO, SC_PSTE, M_M3 , \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, XXXXXXX, KC_UP , XXXXXXX, M_M4 , \ + KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT, KC_LCTL, XXXXXXX, KC_LGUI, XXXXXXX, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, M_M5 \ ), /* LAYER = LAYER_LOWER .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | MUTE A | ______ | ______ | + | ______ | MUTE A | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | @@ -180,20 +181,20 @@ KEYMAP(LAYER_QWERTY, \ |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| | ______ | ______ | ______ | ______ | | ______ | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ | ______ | | ______ | ______ | ______ | ______ | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | XXXXXX | XXXXXX | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | XXXXXX | ______ | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | XXXXXX | ______ | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_LOWER, \ - _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, M_MUTEA, _______, _______, \ + _______, M_MUTEA, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ \ ), /* LAYER = LAYER_UPPER .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | MUTE A | ______ | ______ | + | ______ | MUTE A | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | @@ -204,44 +205,44 @@ KEYMAP(LAYER_LOWER, \ |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| | ______ | ______ | ______ | ______ | | ______ | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP Ent | ______ | ______ | | ______ | ______ | ______ | ______ | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | XXXXXX | XXXXXX | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP Ent | XXXXXX | ______ | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP Ent | XXXXXX | ______ | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_UPPER, \ - _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, M_MUTEA, _______, _______, \ + _______, M_MUTEA, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, XXXXXXX, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, XXXXXXX, _______, _______, _______, _______, _______ \ ), /* LAYER = LAYER_MOUSE .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | MS BT1 | MS AC0 | MS WHU | MS AC2 | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | MS AC0 | MS WHU | MS AC2 | MS BT1 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | MS BT2 | MS WHL | MS WHD | MS WHU | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | MS WHL | MS WHD | MS WHU | MS BT2 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | MS BT3 | MS UL | MS U | MS UR | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | o | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | o | MS BT1 | MS BT2 | MS BT3 | MS BT3 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | MS BT4 | MS L | MS BT1 | MS R | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | XXXXXX | MS U | XXXXXX | MS BT4 | |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | MS BT5 | MS DL | MS D | MS DR | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | ______ | ______ | ______ | ______ | ______ | ______ | | MS L | MS D | MS R | MS BT5 | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_MOUSE, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_BTN1, KC_ACL0, KC_WH_U, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_BTN3, M_MS_UL, KC_MS_U, M_MS_UR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_BTN4, KC_MS_L, KC_BTN1, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_BTN5, M_MS_DL, KC_MS_D, M_MS_DR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_WH_U, KC_ACL2, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN3, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_MS_U, XXXXXXX, KC_BTN4, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5 \ ), /* LAYER = LAYER_ADJUST .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | HELP 1 | HELP 2 | HELP 3 | HELP 4 | XXXXXX | HELP 5 | HELP 6 | HELP 7 | HELP 8 | XXXXXX | HELP 9 | HELP 0 | XXXXXX | XXXXXX | | VOICE- | AUDIO | VOICE+ | MUSIC | + | VOICE- | AUDIO | VOICE+ | MUSIC | | HELP 1 | HELP 2 | HELP 3 | HELP 4 | XXXXXX | HELP 5 | HELP 6 | HELP 7 | HELP 8 | XXXXXX | HELP 9 | HELP 0 | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | @@ -256,14 +257,13 @@ KEYMAP(LAYER_MOUSE, \ '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' */ KEYMAP(LAYER_ADJUST, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, XXXXXXX, M_HELP5, M_HELP6, M_HELP7, M_HELP8, XXXXXXX, M_HELP9, M_HELP0, XXXXXXX, XXXXXXX, MUV_DE , AU_TOG , MUV_IN , MU_TOG , \ + MUV_DE , AU_TOG , MUV_IN , MU_TOG , M_HELP1, M_HELP2, M_HELP3, M_HELP4, XXXXXXX, M_HELP5, M_HELP6, M_HELP7, M_HELP8, XXXXXXX, M_HELP9, M_HELP0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ ), - }; #ifdef AUDIO_ENABLE @@ -296,6 +296,7 @@ void persistant_default_layer_set(uint16_t default_layer) const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [1] = ACTION_MACRO_TAP(MACRO_COPY_CUT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -305,68 +306,84 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) switch(id) { - case MACRO_HELP_1: - if (record->event.pressed) - { - uprint("H1"); - } - break; - - case MACRO_HELP_2: - if (record->event.pressed) - { - uprint("H2"); - } - break; - - case MACRO_HELP_3: - if (record->event.pressed) - { - uprint("H3"); - } - break; - - case MACRO_HELP_4: - if (record->event.pressed) - { - uprint("H4"); - } - break; - - case MACRO_HELP_5: - if (record->event.pressed) - { - uprint("H5"); - } - break; - - case MACRO_HELP_6: - if (record->event.pressed) - { - uprint("H6"); - } - break; - - case MACRO_HELP_7: - if (record->event.pressed) - { - uprint("H7"); - } - break; - - case MACRO_HELP_8: - if (record->event.pressed) - { - uprint("H8"); - } - break; - - case MACRO_HELP_9: - if (record->event.pressed) - { - uprint("H9"); - } - break; + case MACRO_COPY_CUT: + if (record->event.pressed) { + register_code(KC_LCTL); + if (record->tap.count == 1) { + register_code(KC_C); + unregister_code(KC_C); + } + else if (record->tap.count == 2) { + register_code(KC_X); + unregister_code(KC_X); + } + unregister_code(KC_LCTL); + } + break; + + + // case MACRO_HELP_1: + // if (record->event.pressed) + // { + // uprint("H1"); + // } + // break; + + // case MACRO_HELP_2: + // if (record->event.pressed) + // { + // uprint("H2"); + // } + // break; + + // case MACRO_HELP_3: + // if (record->event.pressed) + // { + // uprint("H3"); + // } + // break; + + // case MACRO_HELP_4: + // if (record->event.pressed) + // { + // uprint("H4"); + // } + // break; + + // case MACRO_HELP_5: + // if (record->event.pressed) + // { + // uprint("H5"); + // } + // break; + + // case MACRO_HELP_6: + // if (record->event.pressed) + // { + // uprint("H6"); + // } + // break; + + // case MACRO_HELP_7: + // if (record->event.pressed) + // { + // uprint("H7"); + // } + // break; + + // case MACRO_HELP_8: + // if (record->event.pressed) + // { + // uprint("H8"); + // } + // break; + + // case MACRO_HELP_9: + // if (record->event.pressed) + // { + // uprint("H9"); + // } + // break; case MACRO_BREATH_TOGGLE: if (record->event.pressed) @@ -566,12 +583,12 @@ void led_set_user(uint8_t usb_led) void startup_user() { _delay_ms(10); // gets rid of tick - PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO); + // PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_my_goodbye, false, STACCATO); + // PLAY_NOTE_ARRAY(tone_my_goodbye, false, STACCATO); _delay_ms(2000); stop_all_notes(); } -- 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 (limited to 'keyboards') 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(-) (limited to 'keyboards') 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 From 65c1127b4906d7ea691529ebf779b57039622b65 Mon Sep 17 00:00:00 2001 From: twentylives Date: Wed, 19 Oct 2016 20:23:10 +0300 Subject: update pics and readme --- keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c | 225 --------------------- keyboards/ergodox/keymaps/dvorak-hebrew/readme.md | 9 - .../ergodox/keymaps/dvorak-hebrew/twentylives.png | Bin 124212 -> 0 bytes .../twentylives_dvorak_with_hebrew/keymap.c | 213 +++++++++++++++++++ .../twentylives_dvorak_with_hebrew/keymap.png | Bin 0 -> 119825 bytes .../twentylives_dvorak_with_hebrew/keymap2.png | Bin 0 -> 292705 bytes .../twentylives_dvorak_with_hebrew/readme.md | 10 + 7 files changed, 223 insertions(+), 234 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c delete mode 100644 keyboards/ergodox/keymaps/dvorak-hebrew/readme.md delete mode 100644 keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png create mode 100644 keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c create mode 100644 keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png create mode 100644 keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png create mode 100644 keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c b/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c deleted file mode 100644 index f3dc8c387..000000000 --- a/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.c +++ /dev/null @@ -1,225 +0,0 @@ -#include "ergodox_ez.h" -#include "debug.h" -#include "action_layer.h" - -#define BASE 0 // default layer -#define HEB 1 // Hebrew-Dvorak -#define NUM 2 // symbols -#define NAV 3 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic Dvorak layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - | - * |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------| - * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A | - * `----------------------------------' `------------------------------------' - * ,-------------. ,-------------. -* | DEL | WIN+D| | END | HOME | - * ,------|------|------| |------+--------+------. - * | | | SUPER| | PgUp | | | - * | BACK | CTRL |------| |------| Enter |SPACE | - * | SPACE| | ALT | | PgDn | | | - * `--------------------' `----------------------' - */ -[BASE] = KEYMAP( // layer 0 : default - // left hand - TG(HEB), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSFT), - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(NUM), - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, TG(NAV), - MO(NUM), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(NAV), - KC_DEL, KC_TRNS, - KC_LGUI, - KC_BSPC, KC_LCTL, KC_LALT, - // right hand - KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, - KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LBRC, KC_RBRC, KC_BSLS, LCTL(KC_Z), LCTL(KC_A), - KC_END, KC_HOME, - KC_PGUP, - KC_PGDN, KC_ENT, KC_SPC - ), -/* Keymap 1: Hebrew Dvorak layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - | - * |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------| - * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A | - * `----------------------------------' `------------------------------------' - * ,-------------. ,-------------. -* | DEL | WIN+D| | END | HOME | - * ,------|------|------| |------+--------+------. - * | | | SUPER| | PgUp | | | - * | BACK | CTRL |------| |------| Enter |SPACE | - * | SPACE| | ALT | | PgDn | | | - * `--------------------' `----------------------' - */ -[HEB] = KEYMAP( // layer 0 : default - // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_W, KC_QUOT, KC_SLSH, KC_R, KC_T, KC_TRNS, - KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_Y, KC_U, KC_E, KC_O, KC_P, KC_TRNS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_MPLY, - KC_TRNS, KC_N, KC_M, KC_COMM, KC_DOT, KC_I, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS - ), - /* Keymap 2: Numpad Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | NMLK | P/ | P* | P- | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | 7 | 8 | 9 | P+ | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | 4 | 5 | 6 | P+ | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | 1 | 2 | 3 | ENTER| | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | 0 | 0 | . | ENTER| | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[NUM] = KEYMAP( - // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TRNS, - KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, - KC_P0, KC_P0, KC_DOT, KC_PENT, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 3: Arrows and Mouse Navigation Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | MUTE | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | F11 | | VOL | | | UP | | | | - * |--------+------+------+------+------+------| | | + |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | LEFT | DOWN | RIGHT| | | - * |--------+------+------+------+------+------| F12 | | VOL |------+------+------+------+------+--------| - * | | | | | | | | | - | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | Lclk | Rclk | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | PL/PS| | - * ,------|------|------| |------+------+------. - * | | | | | NEXT | | | - * | | |------| |------| | | - * | | | | | PREV | | | - * `--------------------' `--------------------' - */ -[NAV] = KEYMAP( - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_F11, - 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_F12, - 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_MUTE, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, - KC_VOLU, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, - KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, - KC_MPLY, KC_TRNS, - KC_MNXT, - KC_MPRV, KC_TRNS, KC_TRNS -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(NAV) // 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; - case 3: - ergodox_right_led_3_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md b/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md deleted file mode 100644 index 9f0b45371..000000000 --- a/keyboards/ergodox/keymaps/dvorak-hebrew/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -#Dvorak-Hebrew - -* This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play. - -* The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems. - -* these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout. - -![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png?raw=true) diff --git a/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png b/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png deleted file mode 100644 index 904391f22..000000000 Binary files a/keyboards/ergodox/keymaps/dvorak-hebrew/twentylives.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c new file mode 100644 index 000000000..ae0e9c87e --- /dev/null +++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c @@ -0,0 +1,213 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Keymap 0: Basic Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A | + * `----------------------------------' `------------------------------------' + * ,-------------. ,-------------. +* | DEL | | | END | HOME | + * ,------|------|------| |------+--------+------. + * | | | SUPER| | PgUp | | | + * | BACK | CTRL |------| |------| Enter |SPACE | + * | SPACE| | ALT | | PgDn | | | + * `--------------------' `----------------------' + */ +[0] = KEYMAP( + TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT), + KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3), + KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2), + MO(3), KC_COPY, KC_CUT, KC_PASTE, MO(2), + KC_DELETE, KC_TRNS, + KC_LGUI, + KC_BSPACE,CTL_T(KC_NO),KC_LALT, + + KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSHIFT, + KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_UNDO, LCTL(KC_A), + KC_END, KC_HOME, + KC_PGUP, + KC_PGDOWN, KC_ENTER, KC_SPACE +), + + /* Keymap 1: Hebrew layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[1] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_W, KC_QUOTE, KC_SLASH, KC_R, KC_T, KC_TRNS, + KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_Y, KC_U, KC_E, KC_O, KC_P, KC_TRNS, + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_TRNS, + KC_TRNS, KC_N, KC_M, KC_COMMA, KC_DOT, KC_I, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Arrows ,Mouse Navigation and F Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | F11 | | | UP | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | LEFT | DOWN | RIGHT| | | + * |--------+------+------+------+------+------| | | F12 |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Lclk | Rclk | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[2] = KEYMAP( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_F11, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, + KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MS_BTN1, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + + /* Keymap 3: Numpad Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | NMLK | P/ | P* | P- | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | 7 | 8 | 9 | P+ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | 4 | 5 | 6 | P+ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | 1 | 2 | 3 | ENTER| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . | ENTER| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[3] = KEYMAP( + // Left Hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // Right Hand + KC_TRNS, KC_TRNS, KC_LOCKING_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, + KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_ENTER, KC_TRNS, + KC_KP_0, KC_KP_0, KC_KP_DOT, KC_ENTER, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(1) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +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(); + default: + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png new file mode 100644 index 000000000..82c81dcae Binary files /dev/null and b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png differ diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png new file mode 100644 index 000000000..ec8e7494d Binary files /dev/null and b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png differ diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md new file mode 100644 index 000000000..071472fd4 --- /dev/null +++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md @@ -0,0 +1,10 @@ +#Dvorak-Hebrew + +* This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play. + +* The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems. + +* these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout. + +![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.png) +![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/dvorak-hebrew/keymap2.png) -- cgit v1.2.3 From 464af700eb8c5cc8dd72f36767cc2c0b975a9284 Mon Sep 17 00:00:00 2001 From: 20lives Date: Wed, 19 Oct 2016 20:26:58 +0300 Subject: fix readme --- keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md index 071472fd4..99b8182f5 100644 --- a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md +++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md @@ -6,5 +6,5 @@ * these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout. -![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/dvorak-hebrew/keymap.png) -![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/dvorak-hebrew/keymap2.png) +![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png) +![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png) -- cgit v1.2.3 From 7090c99adfef29863b0c114c55003c4b7fa77a6a Mon Sep 17 00:00:00 2001 From: twentylives Date: Thu, 20 Oct 2016 11:07:14 +0300 Subject: fixed base layer = key --- keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c index ae0e9c87e..720714c98 100644 --- a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c +++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, KC_BSPACE,CTL_T(KC_NO),KC_LALT, - KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSHIFT, -- cgit v1.2.3 From 8727976a1a6d0a1e6749f093828b23265c59a39a Mon Sep 17 00:00:00 2001 From: twentylives Date: Fri, 21 Oct 2016 12:13:44 +0300 Subject: fixed copy-cut-paste buttons --- .../ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c index 720714c98..c9dc43c56 100644 --- a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c +++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c @@ -28,11 +28,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `----------------------' */ [0] = KEYMAP( - TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT), - KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3), - KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2), - MO(3), KC_COPY, KC_CUT, KC_PASTE, MO(2), + TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT), + KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3), + KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2), + MO(3), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(2), KC_DELETE, KC_TRNS, KC_LGUI, KC_BSPACE,CTL_T(KC_NO),KC_LALT, -- cgit v1.2.3 From 5fa44c594f8d1ad9dbfe93060a3370fc971d93dd Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 22 Oct 2016 18:47:51 +0700 Subject: Update priyadi's keymap for Planck; added readme --- keyboards/planck/keymaps/priyadi/keymap.c | 142 +++++++++++++++++------------ keyboards/planck/keymaps/priyadi/readme.md | 12 ++- 2 files changed, 97 insertions(+), 57 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index dd8652d34..4b20f71f2 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -5,24 +5,24 @@ #include "action_layer.h" #ifdef AUDIO_ENABLE #include "audio.h" + #include "musical_notes.h" #endif #include "eeconfig.h" #include "process_unicode.h" +#include "quantum.h" extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _WORKMAN 2 -#define _PUNC 9 -#define _NUM 10 -#define _FUNC 11 -#define _EMOJI 12 -#define _ADJUST 16 +enum layers { + _QWERTY, + _COLEMAK, + _WORKMAN, + _PUNC, + _NUM, + _FUNC, + _EMOJI, + _GUI, +}; enum planck_keycodes { // layouts @@ -35,6 +35,7 @@ enum planck_keycodes { NUM, FUNC, EMOJI, + GUI, // os switchers LINUX, @@ -43,10 +44,12 @@ enum planck_keycodes { }; // Fillers to make layering clearer + #define _______ KC_TRNS #define XXXXXXX KC_NO // unicode map + enum unicode_name { GRIN, // grinning face 😊 TJOY, // tears of joy 😂 @@ -147,6 +150,18 @@ const uint32_t PROGMEM unicode_map[] = { [SKULL] = 0x1F480, }; + +// hybrid shift - = +// #undef KC_LSFT +// #define KC_LSFT MT(MOD_LSFT, KC_MINS) +// #undef KC_RSFT +// #define KC_RSFT MT(MOD_LSFT, KC_EQL) + + +// hybrid right-gui & scroll lock (mapped to Compose in OS) +#undef KC_RCTL +#define KC_RCTL MT(MOD_LCTL, KC_SLCK) + // keymaps const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -189,11 +204,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Workman * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O |Enter | + * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | * `-----------------------------------------------------------------------------------' @@ -207,56 +222,56 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Punc * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ` | | | | | | | | _ | + | { | } | " | + * | | | \ | - | = | < | > | ( | ) | ' | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | \ | - | = | [ | ] | ' | + * | | | | | _ | + | { | } | [ | ] | " | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | < | > | | + * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_PUNC] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_GRV, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO}, - {_______, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT}, - {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, KC_LABK, KC_RABK, _______} + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV }, + {XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* Num * ,-----------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | @ | A | B | C | [ | ] | 4 | 5 | 6 | : |Enter | + * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | D | E | F | & | # | 1 | 2 | 3 | | | + * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | x | | | | 0 | , | . | | | + * | | | | x | | | 0 | , | . | + | - | * `-----------------------------------------------------------------------------------' */ [_NUM] = { - {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_COLN, KC_BSLS}, - {_______, _______, S(KC_D), S(KC_E), S(KC_F), KC_AMPR, KC_HASH, KC_1, KC_2, KC_3, _______, _______}, - {_______, _______, KC_X, _______, _______, KC_SPC, KC_SPC, KC_0, KC_COMM,KC_KP_DOT,_______, _______} + {KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT}, + {KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR}, + {_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS} }, /* Func * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Bksp | + * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | | | Left | Down | Right| PgDn | | + * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F9 | F10 | F11 | F12 | | | | Home | End | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | |Print | + * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_FUNC] = { - {_______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_BSPC}, - {_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______}, - {_______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_HOME, KC_END, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,KC_PSCREEN} + {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL}, + {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS}, + {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* Emoji @@ -274,27 +289,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW)}, {X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS)}, {X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH)}, - { X(POO), X(EYES),X(HUNRD),X(TONGU),X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} + { X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)} }, -/* Adjust +/* GUI * ,-----------------------------------------------------------------------------------. - * | | |Linux | Win | OSX | | |Qwerty|Colemk|Workmm| | | + * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | + * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | Win | | Prev | Play | Next | | | | | | |Colmak| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | OSX | | | | | BL- | BL+ | | | | |Workmn| * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, _______, LINUX, WIN, OSX, _______, _______, QWERTY, COLEMAK, WORKMAN, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} - +[_GUI] = { + {_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______}, + { LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY}, + { WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK}, + { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN} +}, }; @@ -304,6 +318,10 @@ float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_workman[][2] = SONG(DVORAK_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); +float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -312,6 +330,9 @@ void persistant_default_layer_set(uint16_t default_layer) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // faux clicky + if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); + switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -343,20 +364,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case PUNC: if (record->event.pressed) { layer_on(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _ADJUST); + update_tri_layer(_PUNC, _EMOJI, _GUI); } else { layer_off(_PUNC); - update_tri_layer(_PUNC, _EMOJI, _ADJUST); + update_tri_layer(_PUNC, _EMOJI, _GUI); } return false; break; case EMOJI: if (record->event.pressed) { layer_on(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _ADJUST); + update_tri_layer(_PUNC, _EMOJI, _GUI); } else { layer_off(_EMOJI); - update_tri_layer(_PUNC, _EMOJI, _ADJUST); + update_tri_layer(_PUNC, _EMOJI, _GUI); } return false; break; @@ -378,14 +399,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case LINUX: set_unicode_input_mode(UC_LNX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_linux, false, 0); + #endif return false; break; case WIN: set_unicode_input_mode(UC_WIN); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_windows, false, 0); + #endif return false; break; case OSX: set_unicode_input_mode(UC_OSX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_osx, false, 0); + #endif return false; break; } diff --git a/keyboards/planck/keymaps/priyadi/readme.md b/keyboards/planck/keymaps/priyadi/readme.md index de2f25e53..99bdd9d9b 100644 --- a/keyboards/planck/keymaps/priyadi/readme.md +++ b/keyboards/planck/keymaps/priyadi/readme.md @@ -1 +1,11 @@ -# Priyadi's Planck Layout \ No newline at end of file +# Priyadi's Planck Layout + +Features: + +- Supports QWERTY, Colemak and Workman layouts. +- Cursor and nav cluster on home row. +- Hybrid number row and numpad, located on home row. +- Number layer supports hexadecimal input. +- Left and right side modifiers. +- Emoji layer. An entire layer filled with common emojis. +- Faux-clickey (poor man's replacement for Cherry blue switches) \ No newline at end of file -- cgit v1.2.3 From 53a2bf92159e76ed44b675b1c97f20b782679e7f Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 22 Oct 2016 22:22:34 +0800 Subject: added dvorak programmer layout --- .gitignore | 3 +- .../ergodox/keymaps/dvorak_programmer/keymap.c | 380 +++++++++++++++++++++ 2 files changed, 382 insertions(+), 1 deletion(-) create mode 100644 keyboards/ergodox/keymaps/dvorak_programmer/keymap.c (limited to 'keyboards') diff --git a/.gitignore b/.gitignore index 1abaeb217..f66a961fd 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ CMakeLists.txt .browse.VC.db* *.stackdump util/Win_Check_Output.txt -.vscode \ No newline at end of file +.vscode +.stfolder diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c new file mode 100644 index 000000000..82182df0d --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -0,0 +1,380 @@ + +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" +#include "action_code.h" + +#define BASE 0 // default layer +#define SHELL_NAV 1 +#define KEY_NAV 3 // key navigation layer +#define KEY_SEL 4 // key selection layer +#define NUMBER 5 // number layer +#define SYMBOL 6 +#define BRACKETS 7 +#define SHORTCUTS 8 + +// macros +#define MC_COPY_LINE 0 +#define MC_CUT_LINE 1 +#define MC_PASTE_LINE 2 +#define MC_NEW_SEARCH_TAB 3 +#define SCREEN_TAB_LEFT 4 +#define SCREEN_TAB_RIGHT 5 +#define SCREEN_NEW_TAB 6 +#define SWITCH_NDS 7 +#define SCREEN_COPY_MODE 8 +#define SCREEN_PASTE 9 +#define OPEN_CLOSE_PAREN 10 +#define OPEN_CLOSE_BRACKET 11 +#define OPEN_CLOSE_CURLY 12 +#define OPEN_CLOSE_SINGLE_QUOTE 13 +#define OPEN_CLOSE_DOUBLE_QUOTE 14 +#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15 +#define SEMICOLON_NEWLINE 16 + + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer + [2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer + [3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot + [4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot + [5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// base layer +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, + KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), + // thumb cluster + MO(BRACKETS), RCTL(KC_S), + RCTL(KC_DEL), + KC_BSPC,RCTL(KC_BSPC),KC_DEL, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, + KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_FN3, + // lower keys - browser tab control + RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), RCTL(KC_K), RCTL(KC_W), + // thumb cluster + LALT(KC_LEFT), LALT(KC_RIGHT), + KC_END, + KC_CAPSLOCK,KC_ENT, KC_SPC + ), + + +// shell navigation layer +[SHELL_NAV] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + LALT(KC_D), + KC_TRNS,RCTL(KC_W),KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R), + LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT), + RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), HYPR(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), + // bottom row + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + + +// key navigation layer +[KEY_NAV] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_PGDN, KC_HOME, KC_UP, KC_END, KC_PGUP, M(MC_COPY_LINE), + RCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, RCTL(KC_RIGHT), M(MC_CUT_LINE), + KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE), + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +// key selection layer +[KEY_SEL] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RSFT(KC_PGUP), RSFT(KC_PGDN), RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), M(MC_COPY_LINE), + RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), M(MC_CUT_LINE), + RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE), + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +// number layer +[NUMBER] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS, + KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_COLN, KC_TRNS, + // bottom row + KC_0, KC_DOT, KC_COMMA, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + + +[SYMBOL] = KEYMAP( + // left hand + KC_NO,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS,KC_TRNS, M(OPEN_CLOSE_PAREN), KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, M(OPEN_CLOSE_BRACKET), KC_LBRC, KC_RBRC, M(OPEN_CLOSE_DOUBLE_QUOTE), + KC_TRNS,M(SEMICOLON_NEWLINE),M(OPEN_CLOSE_CURLY), KC_LCBR, KC_RCBR, M(OPEN_CLOSE_SINGLE_QUOTE),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_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS, + KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS, + KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +[BRACKETS] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, M(OPEN_CLOSE_PAREN), KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, + M(OPEN_CLOSE_BRACKET), KC_LBRC, KC_RBRC, M(OPEN_CLOSE_DOUBLE_QUOTE), KC_TRNS, KC_TRNS, + KC_TRNS, M(OPEN_CLOSE_CURLY), KC_LCBR, KC_RCBR, M(OPEN_CLOSE_SINGLE_QUOTE), KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + + +[SHORTCUTS] = KEYMAP( + // left hand + KC_NO, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), HYPR(KC_F6), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_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 + HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12), M(SWITCH_NDS), + KC_TRNS, HYPR(KC_A), HYPR(KC_B), HYPR(KC_C), HYPR(KC_D), HYPR(KC_E), HYPR(KC_F), + HYPR(KC_G), HYPR(KC_H), HYPR(KC_I), HYPR(KC_J), HYPR(KC_K), HYPR(KC_L), + KC_TRNS, HYPR(KC_M), HYPR(KC_N), HYPR(KC_O), HYPR(KC_P), HYPR(KC_Q), HYPR(KC_R), + RCTL(KC_LBRC), RCTL(KC_RBRC),KC_TRNS, LCTL(LGUI(KC_LEFT)), LCTL(LGUI(KC_RIGHT)), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + + +}; + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case MC_COPY_LINE: + if (record->event.pressed) { + return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(C), U(LCTL), END); + } + break; + case MC_CUT_LINE: + if (record->event.pressed) { + return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(X), U(LCTL), END); + } + break; + case MC_PASTE_LINE: + if (record->event.pressed) { + return MACRO( T(END), T(ENTER), D(LCTL), T(V), U(LCTL), END); + } + break; + case MC_NEW_SEARCH_TAB: + if (record->event.pressed) { + return MACRO( D(LCTL), T(T), T(K), U(LCTL), END); + } + break; + case SCREEN_TAB_LEFT: + if (record->event.pressed) { + return MACRO( D(LCTL), T(A), U(LCTL), T(P), END); + } + break; + case SCREEN_TAB_RIGHT: + if (record->event.pressed) { + return MACRO( D(LCTL), T(A), U(LCTL), T(N), END); + } + break; + case SCREEN_NEW_TAB: + if (record->event.pressed) { + return MACRO( D(LCTL), T(A), U(LCTL), T(C), END); + } + break; + case SCREEN_COPY_MODE: + if (record->event.pressed) { + return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END); + } + break; + case SCREEN_PASTE: + if (record->event.pressed) { + return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END); + } + break; + case SWITCH_NDS: + if (record->event.pressed) { + return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END); + } + break; + case OPEN_CLOSE_PAREN: + if (record->event.pressed) { + return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END); + } + break; + case OPEN_CLOSE_BRACKET: + if (record->event.pressed) { + return MACRO( T(LBRC), T(RBRC), T(LEFT), END); + } + break; + case OPEN_CLOSE_CURLY: + if (record->event.pressed) { + return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END); + } + break; + case OPEN_CLOSE_SINGLE_QUOTE: + if (record->event.pressed) { + return MACRO( T(QUOT), T(QUOT), T(LEFT), END); + } + break; + case OPEN_CLOSE_DOUBLE_QUOTE: + if (record->event.pressed) { + return MACRO( D(LSFT), T(QUOT), T(QUOT), U(LSFT), T(LEFT), END); + } + break; + case SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND: + if (record->event.pressed) { + return MACRO( T(UP), T(HOME), D(LALT), T(D), U(LALT), END); + } + break; + case SEMICOLON_NEWLINE: + if (record->event.pressed) { + return MACRO( T(END), T(SCLN), T(ENTER), END); + } + break; + + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + + return; +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + return MACRO( T(END), T(ENTER), END); + } + break; } return MACRO_NONE; -- cgit v1.2.3 From 14ac397d5db1758b5dda87571415754f9c267987 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sun, 23 Oct 2016 00:47:58 +0800 Subject: add up/down keys on thumb clusters --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index ef22b7096..0539374f8 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -73,8 +73,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), RCTL(KC_K), RCTL(KC_W), // thumb cluster M(SEMICOLON_NEWLINE), M(END_NEWLINE), - KC_TRNS, - KC_TRNS,KC_ENT, KC_SPC + KC_UP, + KC_DOWN,KC_ENT, KC_SPC ), -- cgit v1.2.3 From a625c2201ab24d0417583c55694555353021d204 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sat, 22 Oct 2016 21:29:11 +0200 Subject: Update readme to reflect changes --- keyboards/preonic/keymaps/jacwib/readme.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md index 066031235..3d1423348 100644 --- a/keyboards/preonic/keymaps/jacwib/readme.md +++ b/keyboards/preonic/keymaps/jacwib/readme.md @@ -1,3 +1,9 @@ # Jacwib's preonic keymap. Designed for use with a swedish language. + +Version 1.1: + +Added PgUp and PgDn keys. + +Also added "Mac mode". Unsure if it even works. Might however be able to test soon. -- cgit v1.2.3 From 83b214988525bc30011d2ef0158a5a10534c2158 Mon Sep 17 00:00:00 2001 From: jacwib Date: Sat, 22 Oct 2016 21:29:47 +0200 Subject: Update keymap to reflect 1.1 changes. --- keyboards/preonic/keymaps/jacwib/keymap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index cf441bf30..9f64b9065 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | |VolDwn| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | |Bspc | | | | | | + * | | | | | | |Bspc | | |PgDn |PgUp | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = { @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)}, {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______} + {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______} }, /* Raise @@ -76,11 +76,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | |Mouse^| | | | |ScrlUp| | | ^ | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | " | + * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | > | | | | | | |ScrlDown| : | ; | _ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | |Bspc | | | | | | | + * | | | | | |Bspc | | | | PgDn | PgUp | | * `-----------------------------------------------------------------------------------' */ [_RAISE] = { @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC}, {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT}, {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS}, - {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______} + {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______} }, /* Adjust (Lower + Raise) @@ -97,18 +97,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | Reset| | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | |Rsft | + * | | | | | | | | | | | |Rshift| * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |MusOn |MusOff| | | | | | | | | Reset| + * | |MusOn |MusOff| | | | |NrmMode|MacMode| | | Reset| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT}, - {_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET }, + {_______, MU_ON, MU_OFF, _______, _______, _______, _______, AG_SWAP, AG_NORM, _______, _______, RESET }, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } -- cgit v1.2.3 From dbcbd8ee3c699b37e0326a58c28503ee156c63cf Mon Sep 17 00:00:00 2001 From: jacwib Date: Sat, 22 Oct 2016 21:32:39 +0200 Subject: Update readme to reflect 1.1 changes. --- keyboards/preonic/keymaps/jacwib/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md index 3d1423348..229fa061d 100644 --- a/keyboards/preonic/keymaps/jacwib/readme.md +++ b/keyboards/preonic/keymaps/jacwib/readme.md @@ -6,4 +6,4 @@ Version 1.1: Added PgUp and PgDn keys. -Also added "Mac mode". Unsure if it even works. Might however be able to test soon. +Also added "Mac mode". Unsure if it works. Will test asap. -- cgit v1.2.3 From 919caaccb75981ebdbba9630b4d850804ffd8fa0 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sun, 23 Oct 2016 11:44:16 +0800 Subject: adding readme --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 keyboards/ergodox/keymaps/dvorak_programmer/README.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md new file mode 100644 index 000000000..a4580fe06 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -0,0 +1,15 @@ +Dvorak Programmer Layout +======================== + +This is a dvorak-only layout. The overall philosophy is that the left hand contains a number of layer-switching shortcuts, and the right hand key codes vary based on the layer selected. + +Layers +------ + +* BASE: this is where you type. +* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. +* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. +* KEY_SEL: same as above, but every movement shift-selects. +* NUMBER: keypad layer. +* SYMBOL: all the symbols as well as brackets at the bottom. +* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. -- cgit v1.2.3 From c6f6172fd5dd70b7d82a1c4e0fd2fe1b55571e0c Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 23 Oct 2016 19:35:06 +0700 Subject: Use WinCompose unicode input method instead of HexNumpad --- keyboards/planck/keymaps/priyadi/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 4b20f71f2..6e7f4e735 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -405,7 +405,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; case WIN: - set_unicode_input_mode(UC_WIN); + set_unicode_input_mode(UC_WINC); #ifdef AUDIO_ENABLE PLAY_NOTE_ARRAY(tone_windows, false, 0); #endif -- cgit v1.2.3 From b7611d5037629334183dbab34b39bc35d157316f Mon Sep 17 00:00:00 2001 From: jacwib Date: Sun, 23 Oct 2016 15:57:36 +0200 Subject: 1.2 update --- keyboards/preonic/keymaps/jacwib/config.h | 1 + keyboards/preonic/keymaps/jacwib/keymap.c | 116 ++++++++++++++++++++++++----- keyboards/preonic/keymaps/jacwib/readme.md | 8 +- 3 files changed, 105 insertions(+), 20 deletions(-) (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/jacwib/config.h b/keyboards/preonic/keymaps/jacwib/config.h index 23e9e0ed2..b98883120 100644 --- a/keyboards/preonic/keymaps/jacwib/config.h +++ b/keyboards/preonic/keymaps/jacwib/config.h @@ -4,5 +4,6 @@ #include "../../config.h" #define FORCE_NKRO 1 +#define PREVENT_STUCK_MODIFIERS #endif diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 9f64b9065..72ccc86cd 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -13,13 +13,18 @@ #define _QWERTY 0 #define _LOWER 3 #define _RAISE 4 +#define _MQWERTY 5 +#define _MLOWER 8 +#define _MRAISE 9 #define _ADJUST 16 enum preonic_keycodes { QWERTY = SAFE_RANGE, LOWER, RAISE, - BACKLIT + MQWERTY, + MLOWER, + MRAISE }; // Fillers to make layering more clear @@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| < | Z | X | C | V | B | N | M | . | , | - | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | + * | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { @@ -46,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM }, {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH}, {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS}, - {KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower @@ -91,6 +96,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______} }, +/* Mac Qwerty + * ,-----------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Å | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| < | Z | X | C | V | B | N | M | . | , | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_MQWERTY] = { + {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC}, + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM }, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH}, + {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS}, + {KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Mac Lower + * ,-----------------------------------------------------------------------------------. + * | | @ | £ | $ | | | { | [ | ] | } | \ | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | |VolUp | | | ~ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |LastS |PauseP|NextS | | * | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | |VolDwn| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | |Bspc | | |PgDn |PgUp | | + * `-----------------------------------------------------------------------------------' + */ +[_MLOWER] = { + {_______, NO_AT, NO_PND, NO_DLR, _______, _______, LSFT(LALT(KC_8)), NO_LBRC, NO_RBRC, LSFT(LALT(KC_9)), LSFT(LALT(KC_7)), KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, + {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)}, + {_______, NO_LBRC, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______} +}, + +/* Mac Raise + * ,-----------------------------------------------------------------------------------. + * | ! | " | # | ¤ | % | & | / | ( | ) | = | ? | Ins | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Mouse^| | | | |ScrlUp| | | ^ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | > | | | | | | |ScrlDown| : | ; | _ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | |Bspc | | | | PgDn | PgUp | | + * `-----------------------------------------------------------------------------------' + */ +[_MRAISE] = { + {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS}, + {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC}, + {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT}, + {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS}, + {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______} +}, + /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -108,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT}, - {_______, MU_ON, MU_OFF, _______, _______, _______, _______, AG_SWAP, AG_NORM, _______, _______, RESET }, + {_______, MU_ON, MU_OFF, _______, _______, _______, _______, TO(0), TO(5), _______, _______, RESET }, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -117,14 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef AUDIO_ENABLE float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} + {NOTE_D5, 8}, + {NOTE_E6, 8}, + {NOTE_D6, 8}, + {NOTE_E5, 8} }; -float tone_qwerty[][2] = SONG(QWERTY_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); @@ -139,9 +205,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif persistant_default_layer_set(1UL<<_QWERTY); } return false; @@ -166,14 +229,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case BACKLIT: + case MQWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_MQWERTY); + } + return false; + break; + case MLOWER: + if (record->event.pressed) { + layer_on(_MLOWER); + update_tri_layer(_MLOWER, _MRAISE, _ADJUST); + } else { + layer_off(_MLOWER); + update_tri_layer(_MLOWER, _MRAISE, _ADJUST); + } + return false; + break; + case MRAISE: if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif + layer_on(_MRAISE); + update_tri_layer(_MLOWER, _MRAISE, _ADJUST); } else { - unregister_code(KC_RSFT); + layer_off(_MRAISE); + update_tri_layer(_MLOWER, _MRAISE, _ADJUST); } return false; break; diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md index 229fa061d..8658d6cdd 100644 --- a/keyboards/preonic/keymaps/jacwib/readme.md +++ b/keyboards/preonic/keymaps/jacwib/readme.md @@ -6,4 +6,10 @@ Version 1.1: Added PgUp and PgDn keys. -Also added "Mac mode". Unsure if it works. Will test asap. +Also added "Mac mode". Unsure if it even works. Might however be able to test soon. + +Version 1.2: + +Changed around alt and super keys. + +Made "Mac mode" function, and tested it! (It works) -- cgit v1.2.3 From 17170ba76d3c94edcf1ab263520238fdb0384774 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 23 Oct 2016 23:00:43 -0500 Subject: Fixed some large keyboard bugs Fixed some bugs relating to keyboards with more than 16 columns. Also added the ability to mask off keyboard matrix bits. --- keyboards/vision_division/config.h | 2 ++ keyboards/vision_division/keymaps/default/keymap.c | 11 +++++++ quantum/matrix.c | 37 +++++++++++++++++++--- readme.md | 1 + tmk_core/common/command.c | 6 ++-- 5 files changed, 50 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index 1f8466a54..93c960671 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -33,6 +33,8 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 +#define MATRIX_MASKED + /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 8622ee521..3282761c0 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -142,6 +142,17 @@ enum keyboard_macros { #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX +const matrix_row_t matrix_mask[MATRIX_ROWS] = +{ +// 1098765432109876543210987654321 + 0b0000000001111111101111011111111, + 0b0000000001111111111111111111111, + 0b0000000001111111111111111111111, + 0b0000000001111111111111111111111, + 0b0000000001010111111111111111111, + 0b0000000001111101111111101011111, +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LAYER = LAYER_QWERTY diff --git a/quantum/matrix.c b/quantum/matrix.c index 3174e0739..ac81794e5 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -26,6 +26,10 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" +#ifdef MATRIX_MASKED +extern const matrix_row_t matrix_mask[]; +#endif + /* Set 0 if debouncing isn't needed */ #ifndef DEBOUNCING_DELAY @@ -218,15 +222,34 @@ bool matrix_is_on(uint8_t row, uint8_t col) inline matrix_row_t matrix_get_row(uint8_t row) { + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else return matrix[row]; +#endif } void matrix_print(void) { +#if (MATRIX_COLS <= 8) + print("\nr/c 01234567\n"); +#elif (MATRIX_COLS <= 16) print("\nr/c 0123456789ABCDEF\n"); +#elif (MATRIX_COLS <= 32) + print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n"); +#endif + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { phex(row); print(": "); - pbin_reverse16(matrix_get_row(row)); +#if (MATRIX_COLS <= 8) + print_bin_reverse8(matrix_get_row(row)); +#elif (MATRIX_COLS <= 16) + print_bin_reverse16(matrix_get_row(row)); +#elif (MATRIX_COLS <= 32) + print_bin_reverse32(matrix_get_row(row)); +#endif print("\n"); } } @@ -235,7 +258,13 @@ uint8_t matrix_key_count(void) { uint8_t count = 0; for (uint8_t i = 0; i < MATRIX_ROWS; i++) { +#if (MATRIX_COLS <= 8) + count += bitpop(matrix[i]); +#elif (MATRIX_COLS <= 16) count += bitpop16(matrix[i]); +#elif (MATRIX_COLS <= 32) + count += bitpop32(matrix[i]); +#endif } return count; } @@ -259,7 +288,7 @@ static matrix_row_t read_cols(void) matrix_row_t result = 0; #if DIODE_DIRECTION == COL2ROW - for(int x = 0; x < MATRIX_COLS; x++) { + for(int x = 0; x < MATRIX_COLS; x++) { int pin = col_pins[x]; #else for(int x = 0; x < MATRIX_ROWS; x++) { @@ -273,10 +302,10 @@ static matrix_row_t read_cols(void) static void unselect_rows(void) { #if DIODE_DIRECTION == COL2ROW - for(int x = 0; x < MATRIX_ROWS; x++) { + for(int x = 0; x < MATRIX_ROWS; x++) { int pin = row_pins[x]; #else - for(int x = 0; x < MATRIX_COLS; x++) { + for(int x = 0; x < MATRIX_COLS; x++) { int pin = col_pins[x]; #endif _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); diff --git a/readme.md b/readme.md index 62d479ff1..c460933a7 100644 --- a/readme.md +++ b/readme.md @@ -241,6 +241,7 @@ You can also add extra options at the end of the make command line, after the ta * `make COLOR=false` - turns off color output * `make SILENT=true` - turns off output besides errors/warnings * `make VERBOSE=true` - outputs all of the gcc stuff (not interesting, unless you need to debug) +* `make EXTRAFLAGS=-E` - Preprocess the code without doing any compiling (useful if you are trying to debug #define commands) The make command itself also has some additional options, type `make --help` for more information. The most useful is probably `-jx`, which specifies that you want to compile using more than one CPU, the `x` represents the number of CPUs that you want to use. Setting that can greatly reduce the compile times, especially if you are compiling many keyboards/keymaps. I usually set it to one less than the number of CPUs that I have, so that I have some left for doing other things while it's compiling. Note that not all operating systems and make versions supports that option. diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index f3e1bf623..5f29bc0b4 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -379,11 +379,11 @@ static bool command_common(uint8_t code) debug_enable = !debug_enable; if (debug_enable) { print("\ndebug: on\n"); - debug_matrix = true; - debug_keyboard = true; - debug_mouse = true; } else { print("\ndebug: off\n"); + debug_matrix = false; + debug_keyboard = false; + debug_mouse = false; } break; -- cgit v1.2.3 From ef8f6180272c3e112f97a6beb9dd90bece3c2131 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 23 Oct 2016 23:03:26 -0500 Subject: Fixing Line Terminations --- .../ergodox/keymaps/win10_writers-block/config.h | 72 +-- .../ergodox/keymaps/win10_writers-block/keymap.c | 648 ++++++++++----------- .../ergodox/keymaps/win10_writers-block/readme.md | 224 +++---- 3 files changed, 472 insertions(+), 472 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/win10_writers-block/config.h b/keyboards/ergodox/keymaps/win10_writers-block/config.h index 568a711a8..43259db08 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/config.h +++ b/keyboards/ergodox/keymaps/win10_writers-block/config.h @@ -1,36 +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_ */ +#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/keymap.c b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c index ea640ee96..3106b3374 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c +++ b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c @@ -1,324 +1,324 @@ -#include "ergodox.h" -#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 -#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) { - - wait_ms(500); - ergodox_board_led_on(); - wait_ms(200); - ergodox_right_led_1_on(); - wait_ms(200); - ergodox_right_led_2_on(); - wait_ms(200); - ergodox_right_led_3_on(); - wait_ms(200); - ergodox_board_led_off(); - wait_ms(200); - ergodox_right_led_1_off(); - wait_ms(200); - ergodox_right_led_2_off(); - wait_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; - } - -}; +#include "ergodox.h" +#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 +#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) { + + wait_ms(500); + ergodox_board_led_on(); + wait_ms(200); + ergodox_right_led_1_on(); + wait_ms(200); + ergodox_right_led_2_on(); + wait_ms(200); + ergodox_right_led_3_on(); + wait_ms(200); + ergodox_board_led_off(); + wait_ms(200); + ergodox_right_led_1_off(); + wait_ms(200); + ergodox_right_led_2_off(); + wait_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 index 66b1aaf40..e51e3c48f 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -1,113 +1,113 @@ - - -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. - -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. - -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. - + + +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. + +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. + +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 7550abbb7ff542dccd983c02254c9cbde2e2a3e2 Mon Sep 17 00:00:00 2001 From: Yin Shanyang Date: Mon, 24 Oct 2016 15:36:24 +0800 Subject: added notes on using Arduino Pro Micro 3.3V with Let’s Split --- keyboards/lets_split/readme.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'keyboards') diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 73fdb0f78..6e296737a 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -100,3 +100,16 @@ half to a computer by USB the keyboard will use QWERTY and Colemak when the right half is connected. +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` -- cgit v1.2.3 From c0a9fa8eead5fd8eb622bb5cb22f9c71a577921d Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 25 Oct 2016 11:37:09 +0100 Subject: switched to standard volume keys --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index c89b485a4..dbefa4a5f 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -115,8 +115,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FUNC] = { - {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(LALT(KC_VOLU))}, - {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(LALT(KC_VOLD))}, + {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU}, + {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD}, {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, S(LCTL(KC_POWER)), XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } -- cgit v1.2.3 From 6bbb0b030eb6be3157503929213e302cc9bc10af Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 25 Oct 2016 11:51:32 +0100 Subject: replace lock key with general power key --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index dbefa4a5f..4d0151710 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | Lock | | | | | + * | | F21 | F22 | F23 | F24 | | | Power| | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNC] = { {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU}, {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD}, - {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, S(LCTL(KC_POWER)), XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } -- cgit v1.2.3 From 22cb73fad312e42f595582f9629105348e7b4bd3 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 4 Oct 2016 08:19:44 -0700 Subject: add alphadox layouts to atreus and ergodox --- keyboards/atreus/keymaps/alphadox/config.h | 80 ++++++++++++++++++++ keyboards/atreus/keymaps/alphadox/keymap.c | 50 +++++++++++++ keyboards/ergodox/keymaps/alphadox/Makefile | 17 +++++ keyboards/ergodox/keymaps/alphadox/config.h | 9 +++ keyboards/ergodox/keymaps/alphadox/keymap.c | 112 ++++++++++++++++++++++++++++ 5 files changed, 268 insertions(+) create mode 100644 keyboards/atreus/keymaps/alphadox/config.h create mode 100644 keyboards/atreus/keymaps/alphadox/keymap.c create mode 100644 keyboards/ergodox/keymaps/alphadox/Makefile create mode 100644 keyboards/ergodox/keymaps/alphadox/config.h create mode 100644 keyboards/ergodox/keymaps/alphadox/keymap.c (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h new file mode 100644 index 000000000..df56849b0 --- /dev/null +++ b/keyboards/atreus/keymaps/alphadox/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Arbitrary Definitions +#define PRODUCT Planckeus +#define DESCRIPTION q.m.k. keyboard firmware for Planckeus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/alphadox/keymap.c new file mode 100644 index 000000000..b776ab400 --- /dev/null +++ b/keyboards/atreus/keymaps/alphadox/keymap.c @@ -0,0 +1,50 @@ +#include "atreus.h" + +#define BASE 0 +#define SYMB 1 +#define ETC 2 + +enum macro_id { + TEENSY, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = KEYMAP( + KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, + LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT) +), + +[SYMB] = KEYMAP( + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, + KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS +), + +[ETC] = KEYMAP( + RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, + LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, + KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case TEENSY: + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/alphadox/Makefile b/keyboards/ergodox/keymaps/alphadox/Makefile new file mode 100644 index 000000000..633499d00 --- /dev/null +++ b/keyboards/ergodox/keymaps/alphadox/Makefile @@ -0,0 +1,17 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/alphadox/config.h b/keyboards/ergodox/keymaps/alphadox/config.h new file mode 100644 index 000000000..89807d84a --- /dev/null +++ b/keyboards/ergodox/keymaps/alphadox/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define FORCE_NKRO +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/ergodox/keymaps/alphadox/keymap.c b/keyboards/ergodox/keymaps/alphadox/keymap.c new file mode 100644 index 000000000..b2f7ccb47 --- /dev/null +++ b/keyboards/ergodox/keymaps/alphadox/keymap.c @@ -0,0 +1,112 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define ETC 2 // etc + +enum macro_id { + TEENSY, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP, + CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, + KC_GRV, KC_DEL, KC_DEL, KC_LALT, GUI_T(KC_TAB), + KC_NO, KC_NO, + KC_NO, + LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO, + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS, + KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, + KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT), + KC_NO, KC_NO, + KC_NO, + KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC) +), + +[SYMB] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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_BSLS, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS, + KC_TILD, KC_AMPR, KC_AMPR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_NO, + KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_NO, + KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS, + KC_0, KC_NO, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +[ETC] = KEYMAP( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS, + KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, KC_NO, + KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO, + KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case TEENSY: + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + break; + } + return MACRO_NONE; +}; + +void matrix_init_user(void) { +}; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + break; + } +}; -- cgit v1.2.3 From e2916f8ab1460b8a22c75aea632d7533d56670bb Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 19 Oct 2016 07:45:30 -0700 Subject: [ergodox][alphadox] undefine tapping_term, ignore_mod_tap_interrupt --- keyboards/ergodox/keymaps/alphadox/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/alphadox/config.h b/keyboards/ergodox/keymaps/alphadox/config.h index 89807d84a..deb218dc0 100644 --- a/keyboards/ergodox/keymaps/alphadox/config.h +++ b/keyboards/ergodox/keymaps/alphadox/config.h @@ -6,4 +6,7 @@ #define FORCE_NKRO #define PREVENT_STUCK_MODIFIERS +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + #endif -- cgit v1.2.3 From 427ea7a8892b60b11e8f6aae2e21b82608ab0071 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 20 Oct 2016 08:00:36 -0700 Subject: [alphadox] remove tmk reset code --- keyboards/atreus/keymaps/alphadox/keymap.c | 5 ----- keyboards/ergodox/keymaps/alphadox/keymap.c | 5 ----- 2 files changed, 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/alphadox/keymap.c index b776ab400..b8ec0e032 100644 --- a/keyboards/atreus/keymaps/alphadox/keymap.c +++ b/keyboards/atreus/keymaps/alphadox/keymap.c @@ -39,11 +39,6 @@ const uint16_t PROGMEM fn_actions[] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case TEENSY: - clear_keyboard(); - print("\n\nJump to bootloader... "); - _delay_ms(250); - bootloader_jump(); // should not return - print("not supported.\n"); break; } return MACRO_NONE; diff --git a/keyboards/ergodox/keymaps/alphadox/keymap.c b/keyboards/ergodox/keymaps/alphadox/keymap.c index b2f7ccb47..731e62c0c 100644 --- a/keyboards/ergodox/keymaps/alphadox/keymap.c +++ b/keyboards/ergodox/keymaps/alphadox/keymap.c @@ -79,11 +79,6 @@ const uint16_t PROGMEM fn_actions[] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case TEENSY: - clear_keyboard(); - print("\n\nJump to bootloader... "); - _delay_ms(250); - bootloader_jump(); // should not return - print("not supported.\n"); break; } return MACRO_NONE; -- cgit v1.2.3 From 055247f35da4fb6c2e8c944292210240cd2d6ec5 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Wed, 26 Oct 2016 21:00:58 +0800 Subject: re-introduce brackets layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 0539374f8..5100115a6 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -11,7 +11,8 @@ #define KEY_SEL 4 // key selection layer #define NUMBER 5 // number layer #define SYMBOL 6 -#define SHORTCUTS 7 +#define BRACKETS 7 +#define SHORTCUTS 8 // macros #define MC_COPY_LINE 0 @@ -56,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(BRACKETS,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -205,6 +206,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), +[BRACKETS] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, M(OPEN_CLOSE_BRACKET),M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_CURLY),KC_TRNS,KC_TRNS, + KC_TRNS, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + [SHORTCUTS] = KEYMAP( // left hand KC_NO, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), HYPR(KC_F6), -- cgit v1.2.3 From 2082c6f11076dd8232aea65ed178dea27d3a4109 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 26 Oct 2016 22:24:26 +0200 Subject: - Fixed typo in gh60/dbroqua layout --- keyboards/kc60/keymaps/dbroqua/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index 1b645ea93..8b5efd0ce 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | | | | | | | | Psc | | | | | | * |-----------------------------------------------------------------------------------------+ - * | | Led | Led-| Led+| | Mute| Vol+| Vol-| | | | Play | | + * | | Led | Led+| Led-| | Mute| Vol+| Vol-| | | | Play | | * |-----------------------------------------------------------------------------------------+ * | | | | | | Prev | Stop | Next | * `-----------------------------------------------------------------------------------------' -- cgit v1.2.3 From 508eddf8ba8548d3f71e1c09a404839beb49f45c Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 28 Oct 2016 14:21:38 -0500 Subject: Fixing Debounce - WIP --- keyboards/vision_division/config.h | 2 +- quantum/matrix.c | 246 ++++++++++++++++++++++++------------- tmk_core/common/matrix.h | 10 ++ 3 files changed, 174 insertions(+), 84 deletions(-) (limited to 'keyboards') diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index 93c960671..5798d91ad 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -31,7 +31,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCING_DELAY 0 #define MATRIX_MASKED diff --git a/quantum/matrix.c b/quantum/matrix.c index ac81794e5..a7dab0987 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -26,6 +26,33 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#if (MATRIX_ROWS <= 8) +# define COL_SHIFTER ((uint8_t)1) +#elif (MATRIX_ROWS <= 16) +# define COL_SHIFTER ((uint16_t)1) +#elif (MATRIX_ROWS <= 32) +# define COL_SHIFTER ((uint32_t)1) +#endif + + + #ifdef MATRIX_MASKED extern const matrix_row_t matrix_mask[]; #endif @@ -42,24 +69,28 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -#if DIODE_DIRECTION == ROW2COL - static matrix_row_t matrix_reversed[MATRIX_COLS]; - static matrix_row_t matrix_reversed_debouncing[MATRIX_COLS]; +#if DIODE_DIRECTION == COL2ROW + static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +#else // ROW2COL + static matrix_col_t matrix_transposed[MATRIX_COLS]; + static matrix_col_t matrix_transposed_debouncing[MATRIX_COLS]; #endif -#if MATRIX_COLS > 16 - #define SHIFTER 1UL -#else - #define SHIFTER 1 +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static matrix_row_t read_cols(void); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#else // ROW2COL + static void init_rows(void); + static matrix_col_t read_rows(void); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); #endif -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - __attribute__ ((weak)) void matrix_init_quantum(void) { matrix_init_kb(); @@ -99,7 +130,7 @@ uint8_t matrix_cols(void) { } // void matrix_power_up(void) { -// #if DIODE_DIRECTION == COL2ROW +// #if (DIODE_DIRECTION == COL2ROW) // for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { // /* DDRxn */ // _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); @@ -123,13 +154,15 @@ uint8_t matrix_cols(void) { // } void matrix_init(void) { + // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - #ifdef __AVR_ATmega32U4__ + #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__)) MCUCR |= _BV(JTD); MCUCR |= _BV(JTD); #endif // initialize row and col +#if (DIODE_DIRECTION == COL2ROW) unselect_rows(); init_cols(); @@ -139,25 +172,43 @@ void matrix_init(void) { matrix_debouncing[i] = 0; } +#else // ROW2COL + unselect_cols(); + init_rows(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_COLS; i++) { + matrix_transposed_debouncing[i] = 0; + } +#endif + matrix_init_quantum(); } uint8_t matrix_scan(void) { -#if DIODE_DIRECTION == COL2ROW +#if (DIODE_DIRECTION == COL2ROW) + + // Set row, read cols + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); wait_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; + matrix_row_t current_row = read_cols(); + if (matrix_debouncing[i] != current_row) { + matrix_debouncing[i] = current_row; if (debouncing) { debug("bounce!: "); debug_hex(debouncing); debug("\n"); } debouncing = DEBOUNCING_DELAY; } - unselect_rows(); + unselect_row(i); } if (debouncing) { @@ -169,19 +220,23 @@ uint8_t matrix_scan(void) } } } -#else + +#else // ROW2COL + + // Set col, read rows + for (uint8_t i = 0; i < MATRIX_COLS; i++) { - select_row(i); + select_col(i); wait_us(30); // without this wait read unstable value. - matrix_row_t rows = read_cols(); - if (matrix_reversed_debouncing[i] != rows) { - matrix_reversed_debouncing[i] = rows; + matrix_col_t current_col = read_rows(); + if (matrix_transposed_debouncing[i] != current_col) { + matrix_transposed_debouncing[i] = current_col; if (debouncing) { debug("bounce!: "); debug_hex(debouncing); debug("\n"); } debouncing = DEBOUNCING_DELAY; } - unselect_rows(); + unselect_col(i); } if (debouncing) { @@ -189,17 +244,20 @@ uint8_t matrix_scan(void) wait_ms(1); } else { for (uint8_t i = 0; i < MATRIX_COLS; i++) { - matrix_reversed[i] = matrix_reversed_debouncing[i]; + matrix_transposed[i] = matrix_transposed_debouncing[i]; } } } + + // Untranspose matrix for (uint8_t y = 0; y < MATRIX_ROWS; y++) { matrix_row_t row = 0; for (uint8_t x = 0; x < MATRIX_COLS; x++) { - row |= ((matrix_reversed[x] & (1<> y) << x; + row |= ((matrix_transposed[x] & (1<> y) << x; } matrix[y] = row; } + #endif matrix_scan_quantum(); @@ -233,23 +291,11 @@ matrix_row_t matrix_get_row(uint8_t row) void matrix_print(void) { -#if (MATRIX_COLS <= 8) - print("\nr/c 01234567\n"); -#elif (MATRIX_COLS <= 16) - print("\nr/c 0123456789ABCDEF\n"); -#elif (MATRIX_COLS <= 32) - print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n"); -#endif + print_matrix_header(); for (uint8_t row = 0; row < MATRIX_ROWS; row++) { phex(row); print(": "); -#if (MATRIX_COLS <= 8) - print_bin_reverse8(matrix_get_row(row)); -#elif (MATRIX_COLS <= 16) - print_bin_reverse16(matrix_get_row(row)); -#elif (MATRIX_COLS <= 32) - print_bin_reverse32(matrix_get_row(row)); -#endif + print_matrix_row(row); print("\n"); } } @@ -258,28 +304,21 @@ uint8_t matrix_key_count(void) { uint8_t count = 0; for (uint8_t i = 0; i < MATRIX_ROWS; i++) { -#if (MATRIX_COLS <= 8) - count += bitpop(matrix[i]); -#elif (MATRIX_COLS <= 16) - count += bitpop16(matrix[i]); -#elif (MATRIX_COLS <= 32) - count += bitpop32(matrix[i]); -#endif + count += matrix_bitpop(i); } return count; } + + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void) { -#if DIODE_DIRECTION == COL2ROW - for(int x = 0; x < MATRIX_COLS; x++) { - int pin = col_pins[x]; -#else - for(int x = 0; x < MATRIX_ROWS; x++) { - int pin = row_pins[x]; -#endif - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } @@ -287,40 +326,81 @@ static matrix_row_t read_cols(void) { matrix_row_t result = 0; -#if DIODE_DIRECTION == COL2ROW - for(int x = 0; x < MATRIX_COLS; x++) { - int pin = col_pins[x]; -#else - for(int x = 0; x < MATRIX_ROWS; x++) { - int pin = row_pins[x]; -#endif - result |= (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)) ? 0 : (SHIFTER << x); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + result |= (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)) ? 0 : (ROW_SHIFTER << x); } + return result; } +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + static void unselect_rows(void) { -#if DIODE_DIRECTION == COL2ROW - for(int x = 0; x < MATRIX_ROWS; x++) { - int pin = row_pins[x]; -#else - for(int x = 0; x < MATRIX_COLS; x++) { - int pin = col_pins[x]; -#endif - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static void select_row(uint8_t row) +#else // ROW2COL + +static void init_rows(void) { + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} -#if DIODE_DIRECTION == COL2ROW - int pin = row_pins[row]; -#else - int pin = col_pins[row]; -#endif - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); +static matrix_col_t read_rows(void) +{ + matrix_col_t result = 0; + + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = row_pins[x]; + result |= (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)) ? 0 : (COL_SHIFTER << x); + } + + return result; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index cee3593ee..84e066c67 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h @@ -31,6 +31,16 @@ typedef uint32_t matrix_row_t; #error "MATRIX_COLS: invalid value" #endif +#if (MATRIX_ROWS <= 8) +typedef uint8_t matrix_col_t; +#elif (MATRIX_ROWS <= 16) +typedef uint16_t matrix_col_t; +#elif (MATRIX_ROWS <= 32) +typedef uint32_t matrix_col_t; +#else +#error "MATRIX_COLS: invalid value" +#endif + #define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<>1); -- cgit v1.2.3 From 1d766c596e8e457db3f5d7cdba1d3323d98439f9 Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Sun, 6 Nov 2016 13:48:20 -0500 Subject: Removed the control action when holding z or / --- keyboards/ergodox/keymaps/j3rn/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/j3rn/keymap.c b/keyboards/ergodox/keymaps/j3rn/keymap.c index d913ea4a5..2069f26ae 100644 --- a/keyboards/ergodox/keymaps/j3rn/keymap.c +++ b/keyboards/ergodox/keymaps/j3rn/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | ~L1 | Alt |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | * `----------------------------------' `----------------------------------' @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, CTL_T(KC_ESC), 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), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), MO(SYMB), KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_HOME, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB), KC_PGUP, CTL_T(KC_ESC), -- cgit v1.2.3 From 6e27f6fbde47804035d508eb84690ed7ee9acee7 Mon Sep 17 00:00:00 2001 From: climbalima Date: Thu, 10 Nov 2016 18:19:13 -0500 Subject: Changes to be committed: new file: keyboards/lets_splitv2/Makefile new file: keyboards/lets_splitv2/config.h new file: keyboards/lets_splitv2/i2c.c new file: keyboards/lets_splitv2/i2c.h new file: keyboards/lets_splitv2/imgs/split-keyboard-i2c-schematic.png new file: keyboards/lets_splitv2/imgs/split-keyboard-serial-schematic.png new file: keyboards/lets_splitv2/keymaps/default/keymap.c new file: keyboards/lets_splitv2/lets_split.c new file: keyboards/lets_splitv2/lets_split.h new file: keyboards/lets_splitv2/matrix.c new file: keyboards/lets_splitv2/pro_micro.h new file: keyboards/lets_splitv2/readme.md new file: keyboards/lets_splitv2/serial.c new file: keyboards/lets_splitv2/serial.h new file: keyboards/lets_splitv2/split_util.c new file: keyboards/lets_splitv2/split_util.h new file: keyboards/maxipad/Makefile new file: keyboards/maxipad/config.h new file: keyboards/maxipad/keymaps/default/Makefile new file: keyboards/maxipad/keymaps/default/config.h new file: keyboards/maxipad/keymaps/default/keymap.c new file: keyboards/maxipad/keymaps/default/readme.md new file: keyboards/maxipad/maxipad.c new file: keyboards/maxipad/maxipad.h new file: keyboards/maxipad/readme.md --- keyboards/lets_split/Makefile | 2 +- keyboards/lets_split/config.h | 6 +- keyboards/lets_split/keymaps/default/keymap.c | 65 +--- keyboards/lets_split/lets_split.h | 8 +- keyboards/lets_splitv2/Makefile | 78 +++++ keyboards/lets_splitv2/config.h | 98 ++++++ keyboards/lets_splitv2/i2c.c | 159 +++++++++ keyboards/lets_splitv2/i2c.h | 31 ++ .../imgs/split-keyboard-i2c-schematic.png | Bin 0 -> 26565 bytes .../imgs/split-keyboard-serial-schematic.png | Bin 0 -> 19487 bytes keyboards/lets_splitv2/keymaps/default/keymap.c | 159 +++++++++ keyboards/lets_splitv2/lets_split.c | 30 ++ keyboards/lets_splitv2/lets_split.h | 25 ++ keyboards/lets_splitv2/matrix.c | 311 ++++++++++++++++++ keyboards/lets_splitv2/pro_micro.h | 362 +++++++++++++++++++++ keyboards/lets_splitv2/readme.md | 102 ++++++ keyboards/lets_splitv2/serial.c | 225 +++++++++++++ keyboards/lets_splitv2/serial.h | 26 ++ keyboards/lets_splitv2/split_util.c | 76 +++++ keyboards/lets_splitv2/split_util.h | 22 ++ keyboards/maxipad/Makefile | 75 +++++ keyboards/maxipad/config.h | 162 +++++++++ keyboards/maxipad/keymaps/default/Makefile | 21 ++ keyboards/maxipad/keymaps/default/config.h | 8 + keyboards/maxipad/keymaps/default/keymap.c | 54 +++ keyboards/maxipad/keymaps/default/readme.md | 1 + keyboards/maxipad/maxipad.c | 28 ++ keyboards/maxipad/maxipad.h | 25 ++ keyboards/maxipad/readme.md | 28 ++ 29 files changed, 2119 insertions(+), 68 deletions(-) create mode 100644 keyboards/lets_splitv2/Makefile create mode 100644 keyboards/lets_splitv2/config.h create mode 100644 keyboards/lets_splitv2/i2c.c create mode 100644 keyboards/lets_splitv2/i2c.h create mode 100644 keyboards/lets_splitv2/imgs/split-keyboard-i2c-schematic.png create mode 100644 keyboards/lets_splitv2/imgs/split-keyboard-serial-schematic.png create mode 100644 keyboards/lets_splitv2/keymaps/default/keymap.c create mode 100644 keyboards/lets_splitv2/lets_split.c create mode 100644 keyboards/lets_splitv2/lets_split.h create mode 100644 keyboards/lets_splitv2/matrix.c create mode 100644 keyboards/lets_splitv2/pro_micro.h create mode 100644 keyboards/lets_splitv2/readme.md create mode 100644 keyboards/lets_splitv2/serial.c create mode 100644 keyboards/lets_splitv2/serial.h create mode 100644 keyboards/lets_splitv2/split_util.c create mode 100644 keyboards/lets_splitv2/split_util.h create mode 100644 keyboards/maxipad/Makefile create mode 100644 keyboards/maxipad/config.h create mode 100644 keyboards/maxipad/keymaps/default/Makefile create mode 100644 keyboards/maxipad/keymaps/default/config.h create mode 100644 keyboards/maxipad/keymaps/default/keymap.c create mode 100644 keyboards/maxipad/keymaps/default/readme.md create mode 100644 keyboards/maxipad/maxipad.c create mode 100644 keyboards/maxipad/maxipad.h create mode 100644 keyboards/maxipad/readme.md (limited to 'keyboards') diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile index b9f07636b..982cfc591 100644 --- a/keyboards/lets_split/Makefile +++ b/keyboards/lets_split/Makefile @@ -67,7 +67,7 @@ AUDIO_ENABLE ?= yes # Audio output on port C6 UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - +USE_I2C ?= yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 6f90997ab..bf618704c 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -25,7 +25,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split +#define PRODUCT Lets Split v2 #define DESCRIPTION A split keyboard for the cheap makers /* key matrix size */ @@ -34,8 +34,8 @@ along with this program. If not, see . #define MATRIX_COLS 6 // wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index 0d2d94b67..8c8466ebd 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c @@ -42,64 +42,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_LSFT, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ [_LOWER] = KEYMAP( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise @@ -117,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) @@ -131,14 +84,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - }; #ifdef AUDIO_ENABLE diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index fe7ae0767..04844ed63 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -6,10 +6,10 @@ void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ diff --git a/keyboards/lets_splitv2/Makefile b/keyboards/lets_splitv2/Makefile new file mode 100644 index 000000000..982cfc591 --- /dev/null +++ b/keyboards/lets_splitv2/Makefile @@ -0,0 +1,78 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= 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 ?= yes # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +USE_I2C ?= yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +ifndef QUANTUM_DIR + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_splitv2/config.h b/keyboards/lets_splitv2/config.h new file mode 100644 index 000000000..bf618704c --- /dev/null +++ b/keyboards/lets_splitv2/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split v2 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#define ws2812_pin PD1 +#define RGBLED_NUM 28 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif \ No newline at end of file diff --git a/keyboards/lets_splitv2/i2c.c b/keyboards/lets_splitv2/i2c.c new file mode 100644 index 000000000..c72789403 --- /dev/null +++ b/keyboards/lets_splitv2/i2c.c @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 100000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + +#endif diff --git a/keyboards/lets_splitv2/imgs/split-keyboard-i2c-schematic.png b/keyboards/lets_splitv2/imgs/split-keyboard-i2c-schematic.png new file mode 100644 index 000000000..888294718 Binary files /dev/null and b/keyboards/lets_splitv2/imgs/split-keyboard-i2c-schematic.png differ diff --git a/keyboards/lets_splitv2/imgs/split-keyboard-serial-schematic.png b/keyboards/lets_splitv2/imgs/split-keyboard-serial-schematic.png new file mode 100644 index 000000000..7621d38ed Binary files /dev/null and b/keyboards/lets_splitv2/imgs/split-keyboard-serial-schematic.png differ diff --git a/keyboards/lets_splitv2/keymaps/default/keymap.c b/keyboards/lets_splitv2/keymaps/default/keymap.c new file mode 100644 index 000000000..8c8466ebd --- /dev/null +++ b/keyboards/lets_splitv2/keymaps/default/keymap.c @@ -0,0 +1,159 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_LSFT, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/lets_splitv2/lets_split.c b/keyboards/lets_splitv2/lets_split.c new file mode 100644 index 000000000..574c116a7 --- /dev/null +++ b/keyboards/lets_splitv2/lets_split.c @@ -0,0 +1,30 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} diff --git a/keyboards/lets_splitv2/lets_split.h b/keyboards/lets_splitv2/lets_split.h new file mode 100644 index 000000000..04844ed63 --- /dev/null +++ b/keyboards/lets_splitv2/lets_split.h @@ -0,0 +1,25 @@ +#ifndef LETS_SPLIT_H +#define LETS_SPLIT_H + +#include "quantum.h" + +void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/lets_splitv2/matrix.c b/keyboards/lets_splitv2/matrix.c new file mode 100644 index 000000000..1d768c59b --- /dev/null +++ b/keyboards/lets_splitv2/matrix.c @@ -0,0 +1,311 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "i2c.h" +#include "serial.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#ifndef USE_I2C +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int ret = _matrix_scan(); + + + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + + matrix_scan_quantum(); + + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/lets_splitv2/pro_micro.h b/keyboards/lets_splitv2/pro_micro.h new file mode 100644 index 000000000..09e219b7b --- /dev/null +++ b/keyboards/lets_splitv2/pro_micro.h @@ -0,0 +1,362 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +// Workaround for wrong definitions in "iom32u4.h". +// This should be fixed in the AVR toolchain. +#undef UHCON +#undef UHINT +#undef UHIEN +#undef UHADDR +#undef UHFNUM +#undef UHFNUML +#undef UHFNUMH +#undef UHFLEN +#undef UPINRQX +#undef UPINTX +#undef UPNUM +#undef UPRST +#undef UPCONX +#undef UPCFG0X +#undef UPCFG1X +#undef UPSTAX +#undef UPCFG2X +#undef UPIENX +#undef UPDATX +#undef TCCR2A +#undef WGM20 +#undef WGM21 +#undef COM2B0 +#undef COM2B1 +#undef COM2A0 +#undef COM2A1 +#undef TCCR2B +#undef CS20 +#undef CS21 +#undef CS22 +#undef WGM22 +#undef FOC2B +#undef FOC2A +#undef TCNT2 +#undef TCNT2_0 +#undef TCNT2_1 +#undef TCNT2_2 +#undef TCNT2_3 +#undef TCNT2_4 +#undef TCNT2_5 +#undef TCNT2_6 +#undef TCNT2_7 +#undef OCR2A +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 +#undef OCR2B +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 + +#define NUM_DIGITAL_PINS 30 +#define NUM_ANALOG_INPUTS 12 + +#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) +#define TXLED0 PORTD |= (1<<5) +#define TXLED1 PORTD &= ~(1<<5) +#define RXLED0 PORTB |= (1<<0) +#define RXLED1 PORTB &= ~(1<<0) + +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; +#define LED_BUILTIN 13 + +// Map SPI port to 'new' pins D14..D17 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; + +// Mapping of analog pins as digital I/O +// A6-A11 share with digital pins +static const uint8_t A0 = 18; +static const uint8_t A1 = 19; +static const uint8_t A2 = 20; +static const uint8_t A3 = 21; +static const uint8_t A4 = 22; +static const uint8_t A5 = 23; +static const uint8_t A6 = 24; // D4 +static const uint8_t A7 = 25; // D6 +static const uint8_t A8 = 26; // D8 +static const uint8_t A9 = 27; // D9 +static const uint8_t A10 = 28; // D10 +static const uint8_t A11 = 29; // D12 + +#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) +#define digitalPinToPCICRbit(p) 0 +#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) +#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) + +// __AVR_ATmega32U4__ has an unusual mapping of pins to channels +extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; +#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) + +#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) + +#ifdef ARDUINO_MAIN + +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA32U4 / ARDUINO LEONARDO +// +// D0 PD2 RXD1/INT2 +// D1 PD3 TXD1/INT3 +// D2 PD1 SDA SDA/INT1 +// D3# PD0 PWM8/SCL OC0B/SCL/INT0 +// D4 A6 PD4 ADC8 +// D5# PC6 ??? OC3A/#OC4A +// D6# A7 PD7 FastPWM #OC4D/ADC10 +// D7 PE6 INT6/AIN0 +// +// D8 A8 PB4 ADC11/PCINT4 +// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 +// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 +// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 +// D12 A11 PD6 T1/#OC4D/ADC9 +// D13# PC7 PWM10 CLK0/OC4A +// +// A0 D18 PF7 ADC7 +// A1 D19 PF6 ADC6 +// A2 D20 PF5 ADC5 +// A3 D21 PF4 ADC4 +// A4 D22 PF1 ADC1 +// A5 D23 PF0 ADC0 +// +// New pins D14..D17 to map SPI port to digital pins +// +// MISO D14 PB3 MISO,PCINT3 +// SCK D15 PB1 SCK,PCINT1 +// MOSI D16 PB2 MOSI,PCINT2 +// SS D17 PB0 RXLED,SS/PCINT0 +// +// Connected LEDs on board for TX and RX +// TXLED D24 PD5 XCK1 +// RXLED D17 PB0 +// HWB PE2 HWB + +// these arrays map port names (e.g. port B) to the +// appropriate addresses for various functions (e.g. reading +// and writing) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &DDRB, + (uint16_t) &DDRC, + (uint16_t) &DDRD, + (uint16_t) &DDRE, + (uint16_t) &DDRF, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PORTB, + (uint16_t) &PORTC, + (uint16_t) &PORTD, + (uint16_t) &PORTE, + (uint16_t) &PORTF, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PINB, + (uint16_t) &PINC, + (uint16_t) &PIND, + (uint16_t) &PINE, + (uint16_t) &PINF, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + PD, // D0 - PD2 + PD, // D1 - PD3 + PD, // D2 - PD1 + PD, // D3 - PD0 + PD, // D4 - PD4 + PC, // D5 - PC6 + PD, // D6 - PD7 + PE, // D7 - PE6 + + PB, // D8 - PB4 + PB, // D9 - PB5 + PB, // D10 - PB6 + PB, // D11 - PB7 + PD, // D12 - PD6 + PC, // D13 - PC7 + + PB, // D14 - MISO - PB3 + PB, // D15 - SCK - PB1 + PB, // D16 - MOSI - PB2 + PB, // D17 - SS - PB0 + + PF, // D18 - A0 - PF7 + PF, // D19 - A1 - PF6 + PF, // D20 - A2 - PF5 + PF, // D21 - A3 - PF4 + PF, // D22 - A4 - PF1 + PF, // D23 - A5 - PF0 + + PD, // D24 - PD5 + PD, // D25 / D6 - A7 - PD7 + PB, // D26 / D8 - A8 - PB4 + PB, // D27 / D9 - A9 - PB5 + PB, // D28 / D10 - A10 - PB6 + PD, // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + _BV(2), // D0 - PD2 + _BV(3), // D1 - PD3 + _BV(1), // D2 - PD1 + _BV(0), // D3 - PD0 + _BV(4), // D4 - PD4 + _BV(6), // D5 - PC6 + _BV(7), // D6 - PD7 + _BV(6), // D7 - PE6 + + _BV(4), // D8 - PB4 + _BV(5), // D9 - PB5 + _BV(6), // D10 - PB6 + _BV(7), // D11 - PB7 + _BV(6), // D12 - PD6 + _BV(7), // D13 - PC7 + + _BV(3), // D14 - MISO - PB3 + _BV(1), // D15 - SCK - PB1 + _BV(2), // D16 - MOSI - PB2 + _BV(0), // D17 - SS - PB0 + + _BV(7), // D18 - A0 - PF7 + _BV(6), // D19 - A1 - PF6 + _BV(5), // D20 - A2 - PF5 + _BV(4), // D21 - A3 - PF4 + _BV(1), // D22 - A4 - PF1 + _BV(0), // D23 - A5 - PF0 + + _BV(5), // D24 - PD5 + _BV(7), // D25 / D6 - A7 - PD7 + _BV(4), // D26 / D8 - A8 - PB4 + _BV(5), // D27 / D9 - A9 - PB5 + _BV(6), // D28 / D10 - A10 - PB6 + _BV(6), // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + TIMER0B, /* 3 */ + NOT_ON_TIMER, + TIMER3A, /* 5 */ + TIMER4D, /* 6 */ + NOT_ON_TIMER, + + NOT_ON_TIMER, + TIMER1A, /* 9 */ + TIMER1B, /* 10 */ + TIMER0A, /* 11 */ + + NOT_ON_TIMER, + TIMER4A, /* 13 */ + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, +}; + +const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { + 7, // A0 PF7 ADC7 + 6, // A1 PF6 ADC6 + 5, // A2 PF5 ADC5 + 4, // A3 PF4 ADC4 + 1, // A4 PF1 ADC1 + 0, // A5 PF0 ADC0 + 8, // A6 D4 PD4 ADC8 + 10, // A7 D6 PD7 ADC10 + 11, // A8 D8 PB4 ADC11 + 12, // A9 D9 PB5 ADC12 + 13, // A10 D10 PB6 ADC13 + 9 // A11 D12 PD6 ADC9 +}; + +#endif /* ARDUINO_MAIN */ + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_USBVIRTUAL Serial +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +#endif /* Pins_Arduino_h */ diff --git a/keyboards/lets_splitv2/readme.md b/keyboards/lets_splitv2/readme.md new file mode 100644 index 000000000..73fdb0f78 --- /dev/null +++ b/keyboards/lets_splitv2/readme.md @@ -0,0 +1,102 @@ +Let's Split +====== + +This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ + +Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 +based boards. + +Features +-------- + +Some features supported by the firmware: + +* Either half can connect to the computer via USB, or both halves can be used + independently. +* You only need 3 wires to connect the two halves. Two for VCC and GND and one + for serial communication. +* Optional support for I2C connection between the two halves if for some + reason you require a faster connection between the two halves. Note this + requires an extra wire between halves and pull-up resistors on the data lines. + +Required Hardware +----------------- + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each. +* 2 TRS sockets +* 1 TRS cable. + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +Optional Hardware +----------------- + +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +Wiring +------ + +The 3 wires of the TRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Then wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](imgs/split-keyboard-serial-schematic.png) + +The wiring for i2c: + +![i2c wiring](imgs/split-keyboard-i2c-schematic.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +Notes on Software Configuration +------------------------------- + +Configuring the firmware is similar to any other TMK project. One thing +to note is that `MATIX_ROWS` in `config.h` is the total number of rows between +the two halves, i.e. if your split keyboard has 4 rows in each half, then +`MATRIX_ROWS=8`. + +Also the current implementation assumes a maximum of 8 columns, but it would +not be very difficult to adapt it to support more if required. + + +Flashing +-------- + +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +make eeprom-left +``` +and similarly for right half +``` +make eeprom-right +``` + +After you have flashed the EEPROM for the first time, you then need to program +the flash memory: +``` +make program +``` +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout. Then if you connect the left +half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + diff --git a/keyboards/lets_splitv2/serial.c b/keyboards/lets_splitv2/serial.c new file mode 100644 index 000000000..f439c2f20 --- /dev/null +++ b/keyboards/lets_splitv2/serial.c @@ -0,0 +1,225 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include + +#include "serial.h" + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} diff --git a/keyboards/lets_splitv2/serial.h b/keyboards/lets_splitv2/serial.h new file mode 100644 index 000000000..15fe4db7b --- /dev/null +++ b/keyboards/lets_splitv2/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/lets_splitv2/split_util.c b/keyboards/lets_splitv2/split_util.c new file mode 100644 index 000000000..65003a71a --- /dev/null +++ b/keyboards/lets_splitv2/split_util.c @@ -0,0 +1,76 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "i2c.h" +#include "serial.h" +#include "keyboard.h" +#include "config.h" + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + #ifdef I2C_MASTER_RIGHT + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< + +#ifdef EE_HANDS + #define EECONFIG_BOOTMAGIC_END (uint8_t *)10 + #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END +#endif + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +#endif diff --git a/keyboards/maxipad/Makefile b/keyboards/maxipad/Makefile new file mode 100644 index 000000000..3f6d133c9 --- /dev/null +++ b/keyboards/maxipad/Makefile @@ -0,0 +1,75 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h new file mode 100644 index 000000000..59b8cebec --- /dev/null +++ b/keyboards/maxipad/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT maxipad +#define DESCRIPTION g8ming keeb + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } +#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/maxipad/keymaps/default/Makefile b/keyboards/maxipad/keymaps/default/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/maxipad/keymaps/default/config.h b/keyboards/maxipad/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/maxipad/keymaps/default/keymap.c b/keyboards/maxipad/keymaps/default/keymap.c new file mode 100644 index 000000000..7ca127fe4 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +#include "maxipad.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ + KC_LCTL, KC_LALT, MO(1), KC_ENT,KC_GRV,KC_SPC \ +), +[1] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} \ No newline at end of file diff --git a/keyboards/maxipad/keymaps/default/readme.md b/keyboards/maxipad/keymaps/default/readme.md new file mode 100644 index 000000000..a6c0d4a3f --- /dev/null +++ b/keyboards/maxipad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maxipad \ No newline at end of file diff --git a/keyboards/maxipad/maxipad.c b/keyboards/maxipad/maxipad.c new file mode 100644 index 000000000..879ae86a7 --- /dev/null +++ b/keyboards/maxipad/maxipad.c @@ -0,0 +1,28 @@ +#include "maxipad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/maxipad/maxipad.h b/keyboards/maxipad/maxipad.h new file mode 100644 index 000000000..eee1309dd --- /dev/null +++ b/keyboards/maxipad/maxipad.h @@ -0,0 +1,25 @@ +#ifndef MAXIPAD_H +#define MAXIPAD_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, k45 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45} \ +} + +#endif diff --git a/keyboards/maxipad/readme.md b/keyboards/maxipad/readme.md new file mode 100644 index 000000000..964212b8a --- /dev/null +++ b/keyboards/maxipad/readme.md @@ -0,0 +1,28 @@ +maxipad keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/maxipad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file -- cgit v1.2.3 From 79f82d3d80a24483d14b078d325bb0f45af58e3d Mon Sep 17 00:00:00 2001 From: climbalima Date: Thu, 10 Nov 2016 18:43:31 -0500 Subject: returned to o --- keyboards/lets_split/config.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index bf618704c..05439facb 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -25,7 +25,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split v2 +#define PRODUCT Lets Split #define DESCRIPTION A split keyboard for the cheap makers /* key matrix size */ @@ -34,8 +34,8 @@ along with this program. If not, see . #define MATRIX_COLS 6 // wiring of each half -#define MATRIX_ROW_PINS { D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } #define CATERINA_BOOTLOADER @@ -95,4 +95,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From b5cecb4cc9df2d541050a9a95f48c1d5fb796ae4 Mon Sep 17 00:00:00 2001 From: climbalima Date: Thu, 10 Nov 2016 20:03:24 -0500 Subject: Added both revisions into one folder --- keyboards/lets_split/Makefile | 2 +- keyboards/lets_split/config.h | 16 ++--- keyboards/lets_split/keymaps/default/keymap.c | 51 ++------------ keyboards/lets_split/lets_split.c | 27 -------- keyboards/lets_split/lets_split.h | 26 ++----- keyboards/lets_split/rev1/config.h | 98 +++++++++++++++++++++++++++ keyboards/lets_split/rev1/rev1.c | 30 ++++++++ keyboards/lets_split/rev1/rev1.h | 25 +++++++ keyboards/lets_split/rev2/config.h | 98 +++++++++++++++++++++++++++ keyboards/lets_split/rev2/rev2.c | 30 ++++++++ keyboards/lets_split/rev2/rev2.h | 25 +++++++ 11 files changed, 327 insertions(+), 101 deletions(-) create mode 100644 keyboards/lets_split/rev1/config.h create mode 100644 keyboards/lets_split/rev1/rev1.c create mode 100644 keyboards/lets_split/rev1/rev1.h create mode 100644 keyboards/lets_split/rev2/config.h create mode 100644 keyboards/lets_split/rev2/rev2.c create mode 100644 keyboards/lets_split/rev2/rev2.h (limited to 'keyboards') diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile index 982cfc591..396d51555 100644 --- a/keyboards/lets_split/Makefile +++ b/keyboards/lets_split/Makefile @@ -72,7 +72,7 @@ USE_I2C ?= yes SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - +SUBPROJECT_DEFAULT = rev2 ifndef QUANTUM_DIR include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index bf618704c..245529ae0 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -28,15 +28,6 @@ along with this program. If not, see . #define PRODUCT Lets Split v2 #define DESCRIPTION A split keyboard for the cheap makers -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } - #define CATERINA_BOOTLOADER // #define USE_I2C @@ -94,5 +85,10 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2/config.h" +#endif #endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index 8c8466ebd..d94063816 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c @@ -29,61 +29,24 @@ enum custom_keycodes { #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ +[0] = KEYMAP( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_LSFT, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - -[_LOWER] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ +[3] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = KEYMAP( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ +[4] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ }; #ifdef AUDIO_ENABLE diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index 574c116a7..fe2d4bc19 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -1,30 +1,3 @@ #include "lets_split.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif -void matrix_init_kb(void) { - - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - -void shutdown_user(void) { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index 04844ed63..2cdfb061f 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -1,25 +1,13 @@ #ifndef LETS_SPLIT_H #define LETS_SPLIT_H -#include "quantum.h" - -void promicro_bootloader_jmp(bool program); +#ifdef SUBPROJECT_rev1 + #include "rev1.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2.h" +#endif -#define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 } \ - } +#include "quantum.h" #endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h new file mode 100644 index 000000000..b609ada07 --- /dev/null +++ b/keyboards/lets_split/rev1/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split v1 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#define ws2812_pin PD1 +#define RGBLED_NUM 28 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/rev1.c b/keyboards/lets_split/rev1/rev1.c new file mode 100644 index 000000000..574c116a7 --- /dev/null +++ b/keyboards/lets_split/rev1/rev1.c @@ -0,0 +1,30 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h new file mode 100644 index 000000000..04fe0ddeb --- /dev/null +++ b/keyboards/lets_split/rev1/rev1.h @@ -0,0 +1,25 @@ +#ifndef REV1_H +#define REV1_H + +#include "quantum.h" + +void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h new file mode 100644 index 000000000..bf618704c --- /dev/null +++ b/keyboards/lets_split/rev2/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split v2 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#define ws2812_pin PD1 +#define RGBLED_NUM 28 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c new file mode 100644 index 000000000..574c116a7 --- /dev/null +++ b/keyboards/lets_split/rev2/rev2.c @@ -0,0 +1,30 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h new file mode 100644 index 000000000..2a2246f05 --- /dev/null +++ b/keyboards/lets_split/rev2/rev2.h @@ -0,0 +1,25 @@ +#ifndef REV2_H +#define REV2_H + +#include "quantum.h" + +void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file -- cgit v1.2.3 From 19ebf6161f174902a33816bdab4ea3a209e4113e Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 12 Nov 2016 19:23:38 +0100 Subject: - Added dbroqua_hhkb layout for Satan PCB --- keyboards/satan/keymaps/dbroqua_hhkb/keymap.c | 110 +++++++++++++++++++++++++ keyboards/satan/keymaps/dbroqua_hhkb/readme.md | 9 ++ 2 files changed, 119 insertions(+) create mode 100644 keyboards/satan/keymaps/dbroqua_hhkb/keymap.c create mode 100644 keyboards/satan/keymaps/dbroqua_hhkb/readme.md (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/dbroqua_hhkb/keymap.c b/keyboards/satan/keymaps/dbroqua_hhkb/keymap.c new file mode 100644 index 000000000..98a298e76 --- /dev/null +++ b/keyboards/satan/keymaps/dbroqua_hhkb/keymap.c @@ -0,0 +1,110 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "satan.h" + +#define _DEFAULT 0 +#define _ALTDISP 1 +#define _FN 2 + +enum planck_keycodes { + DEFAULT = SAFE_RANGE, + ALTDISP +}; + +// Fillers to make layering more clear +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty alt/gui/space/gui/alt + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | + * |-----------------------------------------------------------------------------------------+ + * | LAlt| LGUI | Space | RGUI | RAlt | + * `-----------------------------------------------------------------' + */ + [_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \ + ______, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, ______, ______ \ + ), + +/* Qwerty gui/alt/space/alt/gui + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | + * |-----------------------------------------------------------------------------------------+ + * |LGUI | LAlt | Space | RAlt |RGUI | + * `-----------------------------------------------------------------' + */ + [_ALTDISP] = KEYMAP_HHKB( /* Basic QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \ + ______, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, ______, ______ \ + ), + +/* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * |-----------------------------------------------------------------------------------------+ + * | CAPS | BL- | BL+ | BL | | | | | Psc | Slck| Paus| Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | | + * |-----------------------------------------------------------------------------------------+ + * | | | | Stop | | + * `-----------------------------------------------------------------' + */ + [_FN] = KEYMAP_HHKB( /* Layer 1 */ + ______, 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_INS, KC_DEL, \ + KC_CAPS, BL_DEC, BL_INC, BL_TOGG, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ + ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \ + ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______, \ + ______, DEFAULT, ALTDISP, ______, KC_MSTP, ______, ______, ______ \ + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + return MACRO_NONE; +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DEFAULT: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DEFAULT); + } + return false; + break; + case ALTDISP: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_ALTDISP); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/satan/keymaps/dbroqua_hhkb/readme.md b/keyboards/satan/keymaps/dbroqua_hhkb/readme.md new file mode 100644 index 000000000..39e71beed --- /dev/null +++ b/keyboards/satan/keymaps/dbroqua_hhkb/readme.md @@ -0,0 +1,9 @@ +# Dbroqua HHKB like Layout + +Like the HHKB but with a Satan GH60 PCB :D. + +# Programming Instructions: +Enter into programming mode and run the following command. +``` +$ sudo KEYMAP=dbroqua_hhkb make dfu +``` \ No newline at end of file -- cgit v1.2.3 From 28249498bc621cd8e766a501de0e0c18e525d3f1 Mon Sep 17 00:00:00 2001 From: Seth Chandler Date: Sat, 12 Nov 2016 23:56:57 -0500 Subject: update sethbc keymap --- keyboards/satan/keymaps/sethbc/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/sethbc/keymap.c b/keyboards/satan/keymaps/sethbc/keymap.c index 82c779081..b59efd1d9 100644 --- a/keyboards/satan/keymaps/sethbc/keymap.c +++ b/keyboards/satan/keymaps/sethbc/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MENU, KC_RCTL), [_FL] = KEYMAP_HHKB( #ifdef RGBLIGHT_ENABLE -- cgit v1.2.3 From 34bf8558cdfa3baa46db704299ef66b79b2d0a15 Mon Sep 17 00:00:00 2001 From: Seth Chandler Date: Sun, 13 Nov 2016 00:56:46 -0500 Subject: update sethbc ergodox keymap --- keyboards/ergodox/keymaps/sethbc/Makefile | 11 ----------- keyboards/ergodox/keymaps/sethbc/keymap.c | 2 +- keyboards/ergodox/keymaps/sethbc/readme.md | 3 ++- 3 files changed, 3 insertions(+), 13 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/sethbc/Makefile b/keyboards/ergodox/keymaps/sethbc/Makefile index 8c4ff8784..457a3d01d 100644 --- a/keyboards/ergodox/keymaps/sethbc/Makefile +++ b/keyboards/ergodox/keymaps/sethbc/Makefile @@ -1,14 +1,3 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = yes # Unicode - ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/ergodox/keymaps/sethbc/keymap.c b/keyboards/ergodox/keymaps/sethbc/keymap.c index 6846c4d52..8816ad63b 100644 --- a/keyboards/ergodox/keymaps/sethbc/keymap.c +++ b/keyboards/ergodox/keymaps/sethbc/keymap.c @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, KC_GRV, KC_BSLS, KC_LEFT, KC_RGHT, KC_LCTL, KC_LALT, KC_HOME, - KC_SPC, KC_BSPC, KC_END, + KC_BSPC, KC_DEL, KC_END, // right hand MO(FN2), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, diff --git a/keyboards/ergodox/keymaps/sethbc/readme.md b/keyboards/ergodox/keymaps/sethbc/readme.md index 510b2f99c..57b5d0ec7 100644 --- a/keyboards/ergodox/keymaps/sethbc/readme.md +++ b/keyboards/ergodox/keymaps/sethbc/readme.md @@ -1,3 +1,4 @@ # sethbc's Ergodox EZ keymap -Largely based on the Ergodox Infinity default keymap +Largely based on the Ergodox Infinity default keymap, but layer locking has been +removed in favor of momentary layer activation -- cgit v1.2.3 From aa76425395028d304e223d43e76145343850f0db Mon Sep 17 00:00:00 2001 From: Seth Chandler Date: Sun, 13 Nov 2016 01:04:10 -0500 Subject: oops, fixed inverted if statement --- keyboards/satan/keymaps/sethbc/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/sethbc/keymap.c b/keyboards/satan/keymaps/sethbc/keymap.c index b59efd1d9..93610258b 100644 --- a/keyboards/satan/keymaps/sethbc/keymap.c +++ b/keyboards/satan/keymaps/sethbc/keymap.c @@ -37,16 +37,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = KEYMAP_HHKB( #ifdef RGBLIGHT_ENABLE KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, \ - KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_DEL, \ - _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______), - #else - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, \ KC_CAPS, _______, RGB_TOG,RGB_MOD,RGB_HUI, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_DEL, \ _______, KC_VOLD, RGB_HUD,RGB_SAI,RGB_SAD, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ _______, RGB_VAI,RGB_VAD,_______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______), + #else + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_DEL, \ + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), #endif }; -- cgit v1.2.3 From 162f603b1c36c63aa170170998b361a86413767f Mon Sep 17 00:00:00 2001 From: Hans Ellegård Date: Sat, 29 Oct 2016 20:31:12 +0200 Subject: Added keymap "videck", an ErgoDox keymap for Vi(m) users. --- keyboards/ergodox/keymaps/videck/Makefile | 19 ++ keyboards/ergodox/keymaps/videck/config.h | 13 + keyboards/ergodox/keymaps/videck/keymap.c | 179 +++++++++++ keyboards/ergodox/keymaps/videck/readme.md | 24 ++ keyboards/ergodox/keymaps/videck/videck.json | 443 +++++++++++++++++++++++++++ keyboards/ergodox/keymaps/videck/videck.png | Bin 0 -> 106851 bytes 6 files changed, 678 insertions(+) create mode 100644 keyboards/ergodox/keymaps/videck/Makefile create mode 100644 keyboards/ergodox/keymaps/videck/config.h create mode 100644 keyboards/ergodox/keymaps/videck/keymap.c create mode 100644 keyboards/ergodox/keymaps/videck/readme.md create mode 100644 keyboards/ergodox/keymaps/videck/videck.json create mode 100644 keyboards/ergodox/keymaps/videck/videck.png (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/videck/Makefile b/keyboards/ergodox/keymaps/videck/Makefile new file mode 100644 index 000000000..5c7d21f2c --- /dev/null +++ b/keyboards/ergodox/keymaps/videck/Makefile @@ -0,0 +1,19 @@ +AUDIO_ENABLE:=no +BACKLIGHT_ENABLE:=no +BLUETOOTH_ENABLE:=no +BOOTMAGIC_ENABLE:=no +COMMAND_ENABLE:=no +CONSOLE_ENABLE:=no +EXTRAKEY_ENABLE:=yes +MIDI_ENABLE:=no +MOUSEKEY_ENABLE:=yes +NKRO_ENABLE:=no +RGBLIGHT_ENABLE:=no +SLEEP_LED_ENABLE:=no +TAP_DANCE_ENABLE:=yes +UNICODEMAP_ENABLE:=no +UNICODE_ENABLE:=no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/videck/config.h b/keyboards/ergodox/keymaps/videck/config.h new file mode 100644 index 000000000..d89aabe77 --- /dev/null +++ b/keyboards/ergodox/keymaps/videck/config.h @@ -0,0 +1,13 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifndef NO_DEBUG + #define NO_DEBUG +#endif +#ifndef NO_PRINT + #define NO_PRINT +#endif + +#endif diff --git a/keyboards/ergodox/keymaps/videck/keymap.c b/keyboards/ergodox/keymaps/videck/keymap.c new file mode 100644 index 000000000..7bd6274e9 --- /dev/null +++ b/keyboards/ergodox/keymaps/videck/keymap.c @@ -0,0 +1,179 @@ +#include + +#include "ergodox.h" +#include "action_layer.h" + +enum { + BASE = 0, // Default layer + ARROWS = 1, // Arrows and Fx keys layer + MOUSE = 2, // Mouse movement and buttons layer + PARENS = 3, // Parenthesis easy access layer + + TD_L = 0, // Tap dance index for left shift + TD_R = 1 // Tap dance index for right shift +}; + +// See the videck.png image for a visualization of the layout. +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = KEYMAP( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, + KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, + MO(PARENS), KC_A, KC_S, KC_D, KC_F, KC_G, + TD(TD_L), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, + KC_LCTL, KC_LALT, KC_VOLD, KC_VOLU, KC_MUTE, + KC_ESC, KC_LGUI, + TG(MOUSE), + KC_SPC, KC_TAB, TG(ARROWS), + // right hand + KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_PGDN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(TD_R), + KC_LBRC, KC_RBRC, KC_EQL, KC_RALT, KC_RCTL, + KC_APP, KC_ESC, + KC_INS, + KC_SLCK, KC_ENT, KC_SPC + ), + [ARROWS] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [MOUSE] = KEYMAP( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_BTN3, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_NO, + // 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_MS_L, KC_MS_D, KC_MS_U, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [PARENS] = KEYMAP( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_NO, + KC_TRNS, KC_TRNS, KC_NO, + // 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_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +typedef void (*videck_tap_dance_trigger_t) (const uint16_t kc); + +typedef struct +{ + uint16_t kc1; + uint16_t kc2; + videck_tap_dance_trigger_t trigger; +} videck_tap_dance_tuple_t; + +static void videck_tap_dance_finished (qk_tap_dance_state_t *state, void *user_data) { + videck_tap_dance_tuple_t *const tuple = (videck_tap_dance_tuple_t *)user_data; + + if (state->count == 1) { + register_code16 (tuple->kc1); + } else if (state->count == 2) { + register_code16 (tuple->kc2); + } +} + +static void videck_tap_dance_reset (qk_tap_dance_state_t *state, void *user_data) { + videck_tap_dance_tuple_t *const tuple = (videck_tap_dance_tuple_t *)user_data; + + if (state->count == 1) { + unregister_code16 (tuple->kc1); + } else if (state->count == 2) { + unregister_code16 (tuple->kc2); + tuple->trigger(tuple->kc2); + } +} + +static bool caps_lock_is_on; + +// Toggles caps lock status. +static void videck_caps_trigger (const uint16_t kc) { + caps_lock_is_on ^= true; +} + +#define ACTION_TAP_DANCE_DOUBLE_TRIGGER(kc1, kc2, double_trigger) { \ + .fn = { NULL, videck_tap_dance_finished, videck_tap_dance_reset }, \ + .user_data = (void *)&((videck_tap_dance_tuple_t) { kc1, kc2, double_trigger }), \ + } + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_L] = ACTION_TAP_DANCE_DOUBLE_TRIGGER(KC_LSFT, KC_CAPS, videck_caps_trigger), + [TD_R] = ACTION_TAP_DANCE_DOUBLE_TRIGGER(KC_RSFT, KC_CAPS, videck_caps_trigger) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_led_all_set(LED_BRIGHTNESS_LO); + caps_lock_is_on = false; +}; + +static void indicate_using_led(const uint8_t led, const bool enabled) { + if (enabled) { + ergodox_right_led_on(led); + } else { + ergodox_right_led_off(led); + } +} + +static inline void indicate_caps_lock_state(const bool enabled) { + indicate_using_led(1, enabled); +} + +static inline void indicate_arrows_layer_state(const bool enabled) { + indicate_using_led(2, enabled); +} + +static inline void indicate_mouse_layer_state(const bool enabled) { + indicate_using_led(3, enabled); +} + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + // Check if we have shift locked. + indicate_caps_lock_state(caps_lock_is_on); + indicate_arrows_layer_state(IS_LAYER_ON(ARROWS)); + indicate_mouse_layer_state(IS_LAYER_ON(MOUSE)); +}; diff --git a/keyboards/ergodox/keymaps/videck/readme.md b/keyboards/ergodox/keymaps/videck/readme.md new file mode 100644 index 000000000..759e81bac --- /dev/null +++ b/keyboards/ergodox/keymaps/videck/readme.md @@ -0,0 +1,24 @@ +ViDeck keymap for ErgoDox +========================= + +This is a QWERTY layout based on the US layout, where Vi functionality has been +especially considered. + +# Features +* Mouse movements using the Vi movement keys. +* Vi movement keys doubling as arrow keys. +* Shift lock using double tap. +* A coder's modifier key for easy input of parenthesis. +* Acess to the escape key using either thumb. +* Reasonably accessible Scroll Lock key (useful if you, like me, want to switch + to a non-US layout once in a while in X). + +# Missing keys +* Caps Lock (shift lock is used instead). +* Pause/Break. +* Print Screen. + +# LEDs +* Shift lock is indicated using first LED. +* Arrow keys layer is indicated using second LED. +* Mouse keys layer is indicated using third LED. diff --git a/keyboards/ergodox/keymaps/videck/videck.json b/keyboards/ergodox/keymaps/videck/videck.json new file mode 100644 index 000000000..7068cf548 --- /dev/null +++ b/keyboards/ergodox/keymaps/videck/videck.json @@ -0,0 +1,443 @@ +[ + { + "backcolor": "#333333", + "background": { + "name": "PBT Black", + "style": "background-image: url('/bg/plastic/pbt-black.png');" + }, + "switchMount": "cherry", + "switchBrand": "gateron", + "switchType": "KS-3-Red" + }, + [ + { + "x": 3.5, + "c": "#323232", + "t": "#ffffff\n\n\n#ac97d8" + }, + "#\n3\n\nF3", + { + "x": 10.5 + }, + "*\n8\n\nF8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2\n\nF2", + { + "x": 1 + }, + "$\n4\n\nF4", + { + "x": 8.5 + }, + "&\n7\n\nF7", + { + "x": 1, + "t": "#ffffff\n\n\n#ac97d8\n\n\n\n#555454" + }, + "(\n9\n\nF9" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#ffffff\n\n\n#ac97d8" + }, + "%\n5\n\nF5", + { + "t": "#ffffff" + }, + "home", + { + "x": 4.5 + }, + "pgup", + { + "t": "#ffffff\n\n\n#ac97d8" + }, + "^\n6\n\nF6" + ], + [ + { + "y": -0.875, + "t": "#ffffff", + "w": 1.5 + }, + "~\n`", + { + "t": "#ffffff\n\n\n#ac97d8" + }, + "!\n1\n\nF1", + { + "x": 14.5 + }, + ")\n0\n\nF10", + { + "w": 1.5 + }, + "_\n-\n\nF11" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#ffffff" + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1, + "t": "#ffffff\n\n\n\n\n\n\n\n\n#f8d615" + }, + "O\n\n\n\n\n\n\n\n\n{" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#ffffff" + }, + "T", + { + "h": 1.5 + }, + "end", + { + "x": 4.5, + "h": 1.5 + }, + "pgdn", + "Y" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "+\n=", + "Q", + { + "x": 14.5, + "t": "#ffffff\n\n\n\n\n\n\n\n\n#f8d615" + }, + "P\n\n\n\n\n\n\n\n\n}", + { + "t": "#ffffff\n\n\n#ac97d8", + "w": 1.5 + }, + "|\n\\\n\nF12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#ffffff" + }, + "D", + { + "x": 10.5, + "t": "#ffffff\n\n#5eb1e7\n#ac97d8" + }, + "K\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#ffffff" + }, + "S", + { + "x": 1, + "n": true + }, + "F", + { + "x": 8.5, + "t": "#ffffff\n\n#5eb1e7\n#ac97d8", + "n": true + }, + "J\n\n\n", + { + "x": 1, + "t": "#ffffff\n\n#5eb1e7\n#ac97d8\n\n\n\n\n\n#f8d615" + }, + "L\n\n\n\n\n\n\n\n\n(" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#ffffff" + }, + "G", + { + "x": 6.5, + "t": "#ffffff\n\n#5eb1e7\n#ac97d8" + }, + "H\n\n\n" + ], + [ + { + "y": -0.875, + "t": "#f8d615", + "a": 6, + "w": 1.5 + }, + "( ) [ ] { }", + { + "t": "#ffffff", + "a": 4 + }, + "A", + { + "x": 14.5, + "t": "#ffffff\n\n\n\n\n\n\n#60605b\n\n#f8d615" + }, + ":\n;\n\n\n\n\n\nÖ\n\n)", + { + "t": "#ffffff\n\n\n\n\n\n\n#60605b", + "w": 1.5 + }, + "\"\n'\n\n\n\n\n\nÄ" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#ffffff", + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5 + }, + "C", + { + "x": 10.5 + }, + "<\n," + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "t": "#ffffff\n\n\n\n\n\n\n\n\n#f8d615" + }, + ">\n.\n\n\n\n\n\n\n\n[" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#ffffff" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "t": "#ffffff\n\n#f67f00", + "a": 6, + "fa": [ + 5 + ], + "w": 1.5 + }, + "⇑\n\n2-tap
locks", + { + "t": "#ffffff", + "a": 4, + "f": 3 + }, + "Z", + { + "x": 14.5, + "t": "#ffffff\n\n\n\n\n\n\n\n\n#f8d615", + "f": 3 + }, + "?\n/\n\n\n\n\n\n\n\n]", + { + "t": "#ffffff\n\n#f67f00", + "a": 6, + "f": 3, + "w": 1.5 + }, + "⇑\n\n2-tap
locks" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#ffffff", + "a": 4 + }, + "\n", + { + "x": 10.5, + "f": 3 + }, + "}\n]" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "\n", + { + "x": 1 + }, + "\n", + { + "x": 8.5, + "t": "#ffffff\n\n\n\n\n\n\n#60605b", + "f": 3 + }, + "{\n[\n\n\n\n\n\nÅ", + { + "x": 1, + "t": "#ffffff", + "f": 3 + }, + "+\n=" + ], + [ + { + "y": -0.75, + "x": 0.5, + "f": 3 + }, + "ctrl", + { + "f": 3 + }, + "alt", + { + "x": 14.5, + "f": 3 + }, + "altgr", + { + "f": 3 + }, + "ctrl" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "t": "#ffffff\n\n\n\n\n\n\n\n\n\n#5eb1e7", + "f": 3 + }, + "esc\n\n\n\n\n\n\n\n\n\nM", + { + "t": "#ffffff", + "f": 7 + }, + "" + ], + [ + { + "t": "#ffffff\n\n\n\n\n\n\n\n\n\n#5eb1e7", + "f": 3, + "h": 2 + }, + "space\n\n\n\n\n\n\n\n\n\nL", + { + "h": 2 + }, + "\n\n\n\n\n\n\n\n\n\nR", + { + "t": "#5eb1e7" + }, + "" + ], + [ + { + "x": 2, + "t": "#ac97d8" + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3, + "t": "#ffffff" + }, + "", + "esc" + ], + [ + { + "x": -3 + }, + "ins", + { + "h": 2 + }, + "", + { + "h": 2 + }, + "space" + ], + [ + { + "x": -3 + }, + "scroll
lock" + ] +] \ No newline at end of file diff --git a/keyboards/ergodox/keymaps/videck/videck.png b/keyboards/ergodox/keymaps/videck/videck.png new file mode 100644 index 000000000..c99323f53 Binary files /dev/null and b/keyboards/ergodox/keymaps/videck/videck.png differ -- cgit v1.2.3 From dd22c787b8b417df109d2136c76ce496dd7b93e3 Mon Sep 17 00:00:00 2001 From: climbalima Date: Mon, 14 Nov 2016 23:05:37 -0500 Subject: fixed extra paste --- keyboards/lets_split/config.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index a5394c5e4..bf0473116 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -105,7 +105,6 @@ along with this program. If not, see . #include "rev2/config.h" #endif #endif -======= -#endif ->>>>>>> 79f82d3d80a24483d14b078d325bb0f45af58e3d + + -- cgit v1.2.3 From bce6e52391da7c5f620c96a91857940f0dee19df Mon Sep 17 00:00:00 2001 From: climbalima Date: Mon, 14 Nov 2016 23:08:10 -0500 Subject: fixed conflict --- keyboards/lets_split/config.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index bf0473116..059d45b0c 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . #define PRODUCT Lets Split #define DESCRIPTION A split keyboard for the cheap makers -<<<<<<< HEAD -======= /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 @@ -39,7 +37,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } ->>>>>>> 79f82d3d80a24483d14b078d325bb0f45af58e3d #define CATERINA_BOOTLOADER // #define USE_I2C -- cgit v1.2.3 From 4da698fda3b7e08d7baa6849243716fb8765679a Mon Sep 17 00:00:00 2001 From: Seebs Date: Wed, 16 Nov 2016 15:44:26 -0600 Subject: dvorak/plover keyboard layout Plover's steno support likes quasi-qwerty, and gaming likes qwerty, and I like dvorak, so... what if I could have it all? Signed-off-by: seebs --- keyboards/ergodox/keymaps/dvorak_plover/README.md | 14 ++ keyboards/ergodox/keymaps/dvorak_plover/keymap.c | 230 ++++++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 keyboards/ergodox/keymaps/dvorak_plover/README.md create mode 100644 keyboards/ergodox/keymaps/dvorak_plover/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_plover/README.md b/keyboards/ergodox/keymaps/dvorak_plover/README.md new file mode 100644 index 000000000..c8287b019 --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_plover/README.md @@ -0,0 +1,14 @@ +Dvorak support, plover support, gaming support + +I'm used to the Kinesis, so originally I was just going to patch up +the thumb keys to be more familiar. But the ergodox is really well +suited to NKRO support in Plover, so I added a layer for that, and +then I remembered that dvorak can be really annoying for video +games (try to reach WASD), so I added a layer for that. + +The result is probably a bit idiosyncratic, but it works for me. + +(I also don't have any press/hold distinction keys, because that +confuses my fuzzy little brain.) + +Contributed by seebs (seebs@seebs.net) diff --git a/keyboards/ergodox/keymaps/dvorak_plover/keymap.c b/keyboards/ergodox/keymaps/dvorak_plover/keymap.c new file mode 100644 index 000000000..d0505609d --- /dev/null +++ b/keyboards/ergodox/keymaps/dvorak_plover/keymap.c @@ -0,0 +1,230 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define PLVR 2 // media keys +#define QWRT 3 // qwerty layer for gaming + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | \ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | P | Y | L1 | | L2 | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LGui | A | O | E | U | I |------| |------| D | H | T | N | S | - | + * |--------+------+------+------+------+------| Esc | | L3 |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Lalt | Grv | | Left | Right| | Up | Down | [ | ] | RAlt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | LCtrl| Alt | | LGui | RCtrl | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * |Backsp|Delete|------| |------| Enter |Space | + * | ace| | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(SYMB), + KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ESC, + KC_LALT, KC_GRV, KC_ESC, KC_LEFT,KC_RGHT, + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC,KC_DEL,KC_END, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + TG(PLVR), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + TG(QWRT),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_RALT, + KC_LGUI, KC_RCTL, + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | KP7 | KP8 | KP9 | KP* | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | KP4 | KP5 | KP6 | KP+ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | KP1 | KP2 | KP3 | KP/ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | KP. | KP0 | KP= | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + 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_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_P7, KC_P8, KC_P9, KC_PAST, KC_F12, + KC_DOWN, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_TRNS, + KC_TRNS,KC_PDOT, KC_P0, KC_PEQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Steno for Plover from https://github.com/shayneholmes/tmk_keyboard/commit/11290f8489013018f778627db725160c745e75bd + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 1 | 2 | 3 | 4 | 5 | | | L2 | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | q | w | e | r | t |------| |------| y | u | i | o | p | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | a | s | d | f | g | | | | h | j | k | l | ; | ' | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | c | v |------| |------| n | m | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[PLVR] = KEYMAP( // layout: layer 2: Steno for Plover + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_FN4, KC_NO, + KC_NO, + KC_C, KC_V, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + TG(2), KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, KC_N, KC_M +), +/* Keymap 3: qwerty-ish + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LGui | A | S | D | F | G |------| |------| H | J | K | L | ; | LGui | + * |--------+------+------+------+------+------| Spc | | L3 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Lalt | Grv | '" | Left | Right| | Up | Down | [ | ] | RAlt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | LCtrl| LAlt | | LGui | RCtrl | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * |Backsp|Delete|------| |------| Enter |Space | + * | ace| | End | | PgDn | | | + * `--------------------' `----------------------' + */ +[QWRT] = KEYMAP( // layer 3: qwerty for gaming + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPACE, + KC_LALT, KC_GRV, KC_QUOT, KC_LEFT,KC_RGHT, + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC,KC_DEL,KC_END, + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + TG(QWRT), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_RALT, + KC_LGUI, KC_RCTL, + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +}; + +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; + case 3: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; -- cgit v1.2.3 From 1dd6ceb45dfcf5f0991b84fea5a761a35df7fcda Mon Sep 17 00:00:00 2001 From: climbalima Date: Wed, 16 Nov 2016 19:18:54 -0500 Subject: Updated my repo to current qmk --- keyboards/lets_split/config.h | 48 ++------ keyboards/lets_split/keymaps/default/keymap.c | 12 +- keyboards/lets_split/lets_split.c | 30 ----- keyboards/lets_split/lets_split.h | 26 ++--- keyboards/lets_split/rev1/Makefile | 3 + keyboards/lets_split/rev1/config.h | 102 ++++++++++++++++ keyboards/lets_split/rev1/rev1.c | 32 +++++ keyboards/lets_split/rev1/rev1.h | 25 ++++ keyboards/lets_split/rev1/rules.mk | 5 + keyboards/lets_split/rev2/Makefile | 3 + keyboards/lets_split/rev2/config.h | 102 ++++++++++++++++ keyboards/lets_split/rev2/rev2.c | 32 +++++ keyboards/lets_split/rev2/rev2.h | 25 ++++ keyboards/lets_split/rev2/rules.mk | 5 + keyboards/lets_split/rules.mk | 7 +- keyboards/maxipad/Makefile | 3 + keyboards/maxipad/config.h | 162 ++++++++++++++++++++++++++ keyboards/maxipad/keymaps/default/Makefile | 21 ++++ keyboards/maxipad/keymaps/default/config.h | 8 ++ keyboards/maxipad/keymaps/default/keymap.c | 54 +++++++++ keyboards/maxipad/keymaps/default/readme.md | 1 + keyboards/maxipad/maxipad.c | 28 +++++ keyboards/maxipad/maxipad.h | 25 ++++ keyboards/maxipad/readme.md | 28 +++++ keyboards/maxipad/rules.mk | 67 +++++++++++ 25 files changed, 756 insertions(+), 98 deletions(-) create mode 100644 keyboards/lets_split/rev1/Makefile create mode 100644 keyboards/lets_split/rev1/config.h create mode 100644 keyboards/lets_split/rev1/rev1.c create mode 100644 keyboards/lets_split/rev1/rev1.h create mode 100644 keyboards/lets_split/rev1/rules.mk create mode 100644 keyboards/lets_split/rev2/Makefile create mode 100644 keyboards/lets_split/rev2/config.h create mode 100644 keyboards/lets_split/rev2/rev2.c create mode 100644 keyboards/lets_split/rev2/rev2.h create mode 100644 keyboards/lets_split/rev2/rules.mk create mode 100644 keyboards/maxipad/Makefile create mode 100644 keyboards/maxipad/config.h create mode 100644 keyboards/maxipad/keymaps/default/Makefile create mode 100644 keyboards/maxipad/keymaps/default/config.h create mode 100644 keyboards/maxipad/keymaps/default/keymap.c create mode 100644 keyboards/maxipad/keymaps/default/readme.md create mode 100644 keyboards/maxipad/maxipad.c create mode 100644 keyboards/maxipad/maxipad.h create mode 100644 keyboards/maxipad/readme.md create mode 100644 keyboards/maxipad/rules.mk (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index f4d900acc..5bee55319 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -28,29 +28,6 @@ along with this program. If not, see . #define PRODUCT Lets Split #define DESCRIPTION A split keyboard for the cheap makers -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - -// #define USE_I2C - -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -72,25 +49,11 @@ along with this program. If not, see . #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - /* disable debug print */ -// #define NO_DEBUG +//#define NO_DEBUG /* disable print */ -// #define NO_PRINT +//#define NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER @@ -98,5 +61,10 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2/config.h" +#endif #endif diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index 0d2d94b67..fc41c01fd 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c @@ -42,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Colemak @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + _______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = KEYMAP( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index c505d3a6e..851299aa2 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -1,32 +1,2 @@ #include "lets_split.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - -void matrix_init_kb(void) { - - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); - #endif -} diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index fe7ae0767..2cdfb061f 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -1,25 +1,13 @@ #ifndef LETS_SPLIT_H #define LETS_SPLIT_H -#include "quantum.h" - -void promicro_bootloader_jmp(bool program); +#ifdef SUBPROJECT_rev1 + #include "rev1.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2.h" +#endif -#define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 } \ - } +#include "quantum.h" #endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/Makefile b/keyboards/lets_split/rev1/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/lets_split/rev1/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h new file mode 100644 index 000000000..f4d900acc --- /dev/null +++ b/keyboards/lets_split/rev1/config.h @@ -0,0 +1,102 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/lets_split/rev1/rev1.c b/keyboards/lets_split/rev1/rev1.c new file mode 100644 index 000000000..c505d3a6e --- /dev/null +++ b/keyboards/lets_split/rev1/rev1.c @@ -0,0 +1,32 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h new file mode 100644 index 000000000..50bda0315 --- /dev/null +++ b/keyboards/lets_split/rev1/rev1.h @@ -0,0 +1,25 @@ +#ifndef REV1_H +#define REV1_H + +#include "../lets_split.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/rules.mk b/keyboards/lets_split/rev1/rules.mk new file mode 100644 index 000000000..a0825b4ef --- /dev/null +++ b/keyboards/lets_split/rev1/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/Makefile b/keyboards/lets_split/rev2/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/lets_split/rev2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h new file mode 100644 index 000000000..cd152e331 --- /dev/null +++ b/keyboards/lets_split/rev2/config.h @@ -0,0 +1,102 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split v2 +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c new file mode 100644 index 000000000..c505d3a6e --- /dev/null +++ b/keyboards/lets_split/rev2/rev2.c @@ -0,0 +1,32 @@ +#include "lets_split.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +void matrix_init_kb(void) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h new file mode 100644 index 000000000..a8b0f0f4c --- /dev/null +++ b/keyboards/lets_split/rev2/rev2.h @@ -0,0 +1,25 @@ +#ifndef REV2_H +#define REV2_H + +#include "../lets_split.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rules.mk b/keyboards/lets_split/rev2/rules.mk new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/lets_split/rev2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 6fde8a444..1aee5313c 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -63,11 +63,12 @@ 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 ?= yes # Audio output on port C6 +AUDIO_ENABLE ?= no # Audio output on port C6 UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SUBPROJECT_rev1 ?= yes +USE_I2C ?= yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend diff --git a/keyboards/maxipad/Makefile b/keyboards/maxipad/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/maxipad/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h new file mode 100644 index 000000000..2462a5cfd --- /dev/null +++ b/keyboards/maxipad/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER You +#define PRODUCT maxipad +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } +#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/maxipad/keymaps/default/Makefile b/keyboards/maxipad/keymaps/default/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/maxipad/keymaps/default/config.h b/keyboards/maxipad/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/maxipad/keymaps/default/keymap.c b/keyboards/maxipad/keymaps/default/keymap.c new file mode 100644 index 000000000..8a9bc4f0d --- /dev/null +++ b/keyboards/maxipad/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +#include "maxipad.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ + KC_LCTL, KC_LALT, MO(1), KC_ENT,KC_GRV,KC_SPC \ +), +[1] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} \ No newline at end of file diff --git a/keyboards/maxipad/keymaps/default/readme.md b/keyboards/maxipad/keymaps/default/readme.md new file mode 100644 index 000000000..a6c0d4a3f --- /dev/null +++ b/keyboards/maxipad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maxipad \ No newline at end of file diff --git a/keyboards/maxipad/maxipad.c b/keyboards/maxipad/maxipad.c new file mode 100644 index 000000000..879ae86a7 --- /dev/null +++ b/keyboards/maxipad/maxipad.c @@ -0,0 +1,28 @@ +#include "maxipad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/maxipad/maxipad.h b/keyboards/maxipad/maxipad.h new file mode 100644 index 000000000..eee1309dd --- /dev/null +++ b/keyboards/maxipad/maxipad.h @@ -0,0 +1,25 @@ +#ifndef MAXIPAD_H +#define MAXIPAD_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, k45 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45} \ +} + +#endif diff --git a/keyboards/maxipad/readme.md b/keyboards/maxipad/readme.md new file mode 100644 index 000000000..e722b6602 --- /dev/null +++ b/keyboards/maxipad/readme.md @@ -0,0 +1,28 @@ +maxipad keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/maxipad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk new file mode 100644 index 000000000..55898147d --- /dev/null +++ b/keyboards/maxipad/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 -- cgit v1.2.3 From 21b6b4e6c4d6872164a13e8d31e3e0a9f146ea60 Mon Sep 17 00:00:00 2001 From: climbalima Date: Wed, 16 Nov 2016 19:49:38 -0500 Subject: should have fixed conflixed --- keyboards/lets_split/Makefile | 79 --------------------------- keyboards/lets_split/config.h | 13 +---- keyboards/lets_split/keymaps/default/keymap.c | 19 ------- keyboards/lets_split/lets_split.c | 7 +-- keyboards/lets_split/rev1/config.h | 26 --------- keyboards/lets_split/rev1/rev1.c | 6 -- keyboards/lets_split/rev1/rev1.h | 5 +- keyboards/lets_split/rev2/config.h | 18 +----- keyboards/lets_split/rev2/rev2.c | 6 -- keyboards/lets_split/rev2/rev2.h | 5 +- keyboards/maxipad/Makefile | 78 -------------------------- keyboards/maxipad/config.h | 9 +-- keyboards/maxipad/keymaps/default/keymap.c | 7 +-- 13 files changed, 10 insertions(+), 268 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile index 6ce6e4373..4e2a6f00f 100644 --- a/keyboards/lets_split/Makefile +++ b/keyboards/lets_split/Makefile @@ -1,82 +1,3 @@ -<<<<<<< HEAD ifndef MAKEFILE_INCLUDED -======= -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= 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 ?= yes # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -USE_I2C ?= yes -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes -SUBPROJECT_DEFAULT = rev2 -ifndef QUANTUM_DIR ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 91b11f03f..1b7bbcbbb 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -61,20 +61,11 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -<<<<<<< HEAD -======= -<<<<<<< HEAD ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df + #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif #ifdef SUBPROJECT_rev2 #include "rev2/config.h" #endif -#endif -<<<<<<< HEAD -======= - - - ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index 41b9b8d8f..6f1f71f5f 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c @@ -29,7 +29,6 @@ enum custom_keycodes { #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -<<<<<<< HEAD /* Qwerty * ,-----------------------------------------------------------------------------------. @@ -83,29 +82,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -======= -[0] = KEYMAP( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df ), [3] = KEYMAP( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ -<<<<<<< HEAD _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -======= - _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df ), [4] = KEYMAP( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ -<<<<<<< HEAD _______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), @@ -126,12 +113,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) - - -======= - _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df }; #ifdef AUDIO_ENABLE diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index 8bb33f951..117b727a8 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -1,6 +1 @@ -#include "lets_split.h" - -<<<<<<< HEAD -======= - ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df +#include "lets_split.h" \ No newline at end of file diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index da5b47673..825e5ec24 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -25,11 +25,8 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER Wootpatoot -<<<<<<< HEAD #define PRODUCT Lets Split -======= #define PRODUCT Lets Split v1 ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df #define DESCRIPTION A split keyboard for the cheap makers /* key matrix size */ @@ -44,15 +41,11 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER // #define USE_I2C - -<<<<<<< HEAD // Use serial if not using I2C #ifndef USE_I2C # define USE_SERIAL #endif -======= ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df // #define EE_HANDS #define I2C_MASTER_LEFT @@ -80,21 +73,6 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* ws2812 RGB LED */ -<<<<<<< HEAD -#define RGB_DI_PIN D4 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 8 // Number of LEDs -======= -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD -#define ws2812_pin PD1 -#define RGBLED_NUM 28 // Number of LEDs ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -113,8 +91,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -<<<<<<< HEAD -#endif -======= #endif ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df diff --git a/keyboards/lets_split/rev1/rev1.c b/keyboards/lets_split/rev1/rev1.c index 41dd1e353..c505d3a6e 100644 --- a/keyboards/lets_split/rev1/rev1.c +++ b/keyboards/lets_split/rev1/rev1.c @@ -24,15 +24,9 @@ void matrix_init_kb(void) { }; void shutdown_user(void) { -<<<<<<< HEAD #ifdef AUDIO_ENABLE PLAY_NOTE_ARRAY(tone_goodbye, false, 0); _delay_ms(150); stop_all_notes(); #endif -======= - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df } diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h index 998b2be7c..4667c9fb0 100644 --- a/keyboards/lets_split/rev1/rev1.h +++ b/keyboards/lets_split/rev1/rev1.h @@ -1,15 +1,12 @@ #ifndef REV1_H #define REV1_H -<<<<<<< HEAD #include "../lets_split.h" //void promicro_bootloader_jmp(bool program); -======= #include "quantum.h" -void promicro_bootloader_jmp(bool program); ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df +//void promicro_bootloader_jmp(bool program); #define KEYMAP( \ k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 19c137e56..e9689d773 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -41,14 +41,11 @@ along with this program. If not, see . // #define USE_I2C -<<<<<<< HEAD // Use serial if not using I2C #ifndef USE_I2C # define USE_SERIAL #endif -======= ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df // #define EE_HANDS #define I2C_MASTER_LEFT @@ -77,19 +74,11 @@ along with this program. If not, see . ) /* ws2812 RGB LED */ -<<<<<<< HEAD #define RGB_DI_PIN D3 #define RGBLIGHT_TIMER #define RGBLED_NUM 12 // Number of LEDs -======= #define ws2812_PORTREG PORTD #define ws2812_DDRREG DDRD -#define ws2812_pin PD1 -#define RGBLED_NUM 28 // Number of LEDs ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 /* * Feature disable options @@ -109,8 +98,5 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -<<<<<<< HEAD -#endif -======= -#endif ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c index 41dd1e353..c505d3a6e 100644 --- a/keyboards/lets_split/rev2/rev2.c +++ b/keyboards/lets_split/rev2/rev2.c @@ -24,15 +24,9 @@ void matrix_init_kb(void) { }; void shutdown_user(void) { -<<<<<<< HEAD #ifdef AUDIO_ENABLE PLAY_NOTE_ARRAY(tone_goodbye, false, 0); _delay_ms(150); stop_all_notes(); #endif -======= - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df } diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 9e251ca57..990976de2 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -1,15 +1,12 @@ #ifndef REV2_H #define REV2_H -<<<<<<< HEAD #include "../lets_split.h" //void promicro_bootloader_jmp(bool program); -======= #include "quantum.h" -void promicro_bootloader_jmp(bool program); ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df +//void promicro_bootloader_jmp(bool program); #define KEYMAP( \ k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ diff --git a/keyboards/maxipad/Makefile b/keyboards/maxipad/Makefile index c65665142..57b2ef62e 100644 --- a/keyboards/maxipad/Makefile +++ b/keyboards/maxipad/Makefile @@ -1,81 +1,3 @@ -<<<<<<< HEAD ifndef MAKEFILE_INCLUDED include ../../Makefile endif -======= - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../Makefile -endif - - ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index 4a942aae9..fbe64a5b0 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h @@ -24,15 +24,10 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -<<<<<<< HEAD -#define MANUFACTURER You -#define PRODUCT maxipad -#define DESCRIPTION A custom keyboard -======= #define MANUFACTURER Wootpatoot #define PRODUCT maxipad -#define DESCRIPTION g8ming keeb ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df +#define DESCRIPTION A custom keyboard + /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/maxipad/keymaps/default/keymap.c b/keyboards/maxipad/keymaps/default/keymap.c index 5e3a594cc..43ace3241 100644 --- a/keyboards/maxipad/keymaps/default/keymap.c +++ b/keyboards/maxipad/keymaps/default/keymap.c @@ -10,15 +10,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = KEYMAP( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ -<<<<<<< HEAD KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, \ -======= KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ ), }; -- cgit v1.2.3 From b085a34506bc981a7c7cdb270b7786d6a4cbf985 Mon Sep 17 00:00:00 2001 From: climbalima Date: Wed, 16 Nov 2016 20:44:49 -0500 Subject: fixed readme conflicts --- keyboards/maxipad/readme.md | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'keyboards') diff --git a/keyboards/maxipad/readme.md b/keyboards/maxipad/readme.md index 1971ce1f3..ab7b122fe 100644 --- a/keyboards/maxipad/readme.md +++ b/keyboards/maxipad/readme.md @@ -1,13 +1,7 @@ -maxipad keyboard firmware -====================== - ## Quantum MK Firmware -<<<<<<< HEAD For the full Quantum feature list, see [the parent readme](/). -======= -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df + ## Building @@ -17,17 +11,13 @@ Depending on which keymap you would like to use, you will have to compile slight ### Default -<<<<<<< HEAD -To build with the default keymap, simply run `make default`. -======= To build with the default keymap, simply run `make`. ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df + ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. -<<<<<<< HEAD To build the firmware binary hex file with a keymap just do `make` with a keymap like this: ``` @@ -35,12 +25,4 @@ $ make [default|jack|] ``` Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. -======= -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` ->>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df -- cgit v1.2.3