diff --git a/docs/feature_macros.md b/docs/feature_macros.md index e77d7afea3..006fa04bca 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -97,6 +97,7 @@ There's also a couple of mod shortcuts you can use: * `SS_LGUI(string)` * `SS_LALT(string)` * `SS_LSFT(string)` +* `SS_RALT(string)` These press the respective modifier, send the supplied string and then release the modifier. They can be used like this: diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 2e78e64b1c..43ec0b23bf 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -359,7 +359,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_defaults(); + breathing_period_default(); } break; diff --git a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c index 29c4ac6ed3..abf98615ea 100644 --- a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c +++ b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c @@ -1,4 +1,4 @@ -#include "clueboard.h" +#include "66.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/clueboard/66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h index 9676b2b247..5eedcd237a 100644 --- a/keyboards/clueboard/66/rev2/rev2.h +++ b/keyboards/clueboard/66/rev2/rev2.h @@ -64,7 +64,7 @@ { k20, k21, k22, k23, k24, k25, k26, k27 }, \ { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ - { k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \ + { k50, k51, k52, k53, k54, KC_NO, KC_NO, k57 }, \ { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ @@ -73,7 +73,7 @@ /* LAYOUT_66_iso, standard 67 key ISO layout */ -#define LAYOUT_ISO( \ +#define LAYOUT_66_iso( \ k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k67, \ k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \ diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h new file mode 100755 index 0000000000..85077ed46a --- /dev/null +++ b/keyboards/contra/config.h @@ -0,0 +1,58 @@ +#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 Cartel +#define PRODUCT Contra +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F6, B3, B2, B6 } +#define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* 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)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/contra/contra.c b/keyboards/contra/contra.c new file mode 100755 index 0000000000..3ef66a9c0d --- /dev/null +++ b/keyboards/contra/contra.c @@ -0,0 +1 @@ +#include "contra.h" diff --git a/keyboards/contra/contra.h b/keyboards/contra/contra.h new file mode 100755 index 0000000000..e9f9c5418d --- /dev/null +++ b/keyboards/contra/contra.h @@ -0,0 +1,18 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/contra/keymaps/dana/config.h b/keyboards/contra/keymaps/dana/config.h new file mode 100644 index 0000000000..2846b57910 --- /dev/null +++ b/keyboards/contra/keymaps/dana/config.h @@ -0,0 +1,30 @@ +/* +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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + + +#undef TAPPING_TERM +#define TAPPING_TERM 190 + +#define MUSIC_MASK (keycode != KC_NO) +#define MIDI_ADVANCED + +#endif diff --git a/keyboards/contra/keymaps/dana/keymap.c b/keyboards/contra/keymaps/dana/keymap.c new file mode 100644 index 0000000000..529491923f --- /dev/null +++ b/keyboards/contra/keymaps/dana/keymap.c @@ -0,0 +1,37 @@ +// 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 "contra.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | Cmd |Lower | Space |Raise | Enter| Cmd | Alt |Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[0] = { + { MI_C_4, MI_Cs_4, MI_D_4, MI_Ds_4, MI_E_4, MI_F_4, MI_Fs_4, MI_G_4, MI_Gs_4, MI_A_4, MI_As_4, MI_B_4 }, + { MI_C_3, MI_Cs_3, MI_D_3, MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, MI_Gs_3, MI_A_3, MI_As_3, MI_B_3 }, + { MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2, MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, MI_A_2, MI_As_2, MI_B_2 }, + { MI_C_1, MI_Cs_1, MI_D_1, MI_Ds_1, MI_E_1, MI_F_1, MI_Fs_1, MI_G_1, MI_Gs_1, MI_A_1, MI_As_1, MI_B_1 } +} +}; + + + + diff --git a/keyboards/contra/keymaps/dana/readme.md b/keyboards/contra/keymaps/dana/readme.md new file mode 100644 index 0000000000..75b4582d4a --- /dev/null +++ b/keyboards/contra/keymaps/dana/readme.md @@ -0,0 +1,6 @@ +# Dana musical MIDI keyboard layout + +Has the contra mapped as a MIDI keyboard, where each row is an octave. + +The keyboard has only MIDI, nothing else! + diff --git a/keyboards/contra/keymaps/dana/rules.mk b/keyboards/contra/keymaps/dana/rules.mk new file mode 100644 index 0000000000..1198f378a8 --- /dev/null +++ b/keyboards/contra/keymaps/dana/rules.mk @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # 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 = yes # 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 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/contra/readme.md b/keyboards/contra/readme.md new file mode 100644 index 0000000000..a83228507d --- /dev/null +++ b/keyboards/contra/readme.md @@ -0,0 +1,16 @@ +CONTRA +=== + +![CONTRA](https://cartel.ltd/wp-content/uploads/2018/01/img_3209.jpg) + +A 40% keyboard by + +Keyboard Maintainer: The QMK Community +Hardware Supported: CONTRA +Hardware Availability: [CARTEL](https://cartel.ltd/projects/contra/) + +Make example for this keyboard (after setting up your build environment): + + make contra:dana + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk new file mode 100755 index 0000000000..ca2945e63b --- /dev/null +++ b/keyboards/contra/rules.mk @@ -0,0 +1,58 @@ +# 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* +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dz60/keymaps/LEdiodes/keymap.c b/keyboards/dz60/keymaps/LEdiodes/keymap.c index 46bdb5fed1..dbf2a75f57 100644 --- a/keyboards/dz60/keymaps/LEdiodes/keymap.c +++ b/keyboards/dz60/keymaps/LEdiodes/keymap.c @@ -1,14 +1,16 @@ -#include "xd60.h" +#include "dz60.h" #include "action_layer.h" -#Define _L0 0 -#Define _L1 1 -#Define _L2 2 -#Define _L3 3 -#Define _L4 4 +#define _L0 0 +#define _L1 1 +#define _L2 2 +#define _L3 3 +#define _L4 4 #define _______ KC_TRNS +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* * template * [_L1] = KEYMAP( @@ -22,7 +24,7 @@ *\ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap _L0: (Layer 0 - Base Layer) This is the default layer + * Keymap _L0: (Layer 0 - Base Layer) This is the default layer * This layer has a key set to MO(_L1) which means when held down Layer 1 will become active, If Layer 1 does not have anything set for tat key is will revert to uing the key set at layer 0. * LT(_L1, KC_1) means that when the "1" key is long touched then it will activate the layer _L1 key(F1) but if the key is just tapped it will activate the "1" key. * KC_GESC = Escape when tapped, ` when pressed with Shift or GUI @@ -45,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L0] = KEYMAP( KC_GESC, LT(_L1, KC_1),LT(_L1, KC_2),LT(_L1, KC_3),LT(_L1, KC_4),LT(_L1, KC_5),LT(_L1, KC_6),LT(_L1, KC_7),LT(_L1, KC_8),LT(_L1, KC_9),LT(_L1, KC_0),LT(_L1, KC_MINS),LT(_L1, KC_EQL),KC_BSPC, KC_DEL, \ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPO, KC_UP, M0(_L1), \ - KC_LCTL, KC_LGUI, KC_LALT, TD(LT(_L3,KC_SPACE)),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, M0(_L2), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TO(_L1), \ + KC_LCTL, KC_LGUI, KC_LALT, TD(LT(_L3,KC_SPACE)),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, TO(_L2), KC_LEFT, KC_DOWN, KC_RIGHT), /* Keymap _L1: (Layer 1) This is function layer 1 * This layer is activated while the Fn key is being held down. @@ -66,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L1] = KEYMAP( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ _______, KC_WH_U, KC_UP, KC_WH_D, _______, _______,_______, _______, _______, _______, KC_PSCR, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_HOME, _______, _______, _______, KC_HOME, _______, _______, _______, \ - _______, _______, _______, KC_APP, BL_STEP,_______, KC_END, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_PGUP, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_HOME, _______, _______, _______, KC_HOME, _______, _______, \ + _______, _______, KC_APP, BL_STEP,_______, KC_END, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_PGUP, _______, \ _______, _______, _______, _______,_______,_______, _______, _______, KC_HOME, KC_PGDOWN, KC_END), /* Keymap _L2: (Layer 2) This is function layer 2 @@ -89,9 +91,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L2] = KEYMAP( _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,LCA(KC_TAB), \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MEH(KC_TAB), \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MS_BTN1,KC_MS_UP,KC_MS_BTN2, \ - _______,_______,_______, _______,_______,_______, _______,_______,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT, + _______,_______,_______, _______,_______,_______, _______,_______,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT) }; diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h new file mode 100644 index 0000000000..61c2fa0ed3 --- /dev/null +++ b/keyboards/ok60/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2018 Edward Browncross + +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 OK60 +#define PRODUCT OK60 +#define DESCRIPTION qmk keyboard firmware for OK60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * 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 { B5, B4, D7, D6, D4 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 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)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/ok60/keymaps/default/keymap.c b/keyboards/ok60/keymaps/default/keymap.c new file mode 100644 index 0000000000..7fd3b8f729 --- /dev/null +++ b/keyboards/ok60/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include "ok60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP_ANSI( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, 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_LSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL), + + KEYMAP_ANSI( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/ok60/keymaps/ebrowncross/keymap.c b/keyboards/ok60/keymaps/ebrowncross/keymap.c new file mode 100644 index 0000000000..904262f036 --- /dev/null +++ b/keyboards/ok60/keymaps/ebrowncross/keymap.c @@ -0,0 +1,29 @@ +#include "ok60.h" + +// An ISO UK keymap + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP_ISO( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LGUI, KC_MENU, KC_LCTL), + + KEYMAP_ISO( + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_PSCR, + _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, MO(2), _______, _______), + + KEYMAP_ISO( + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/ok60/ok60.c b/keyboards/ok60/ok60.c new file mode 100644 index 0000000000..052656205b --- /dev/null +++ b/keyboards/ok60/ok60.c @@ -0,0 +1 @@ +#include "ok60.h" diff --git a/keyboards/ok60/ok60.h b/keyboards/ok60/ok60.h new file mode 100644 index 0000000000..5511bf0f59 --- /dev/null +++ b/keyboards/ok60/ok60.h @@ -0,0 +1,37 @@ +#ifndef OK60_H +#define OK60_H + +#include "quantum.h" + +#define KEYMAP_ANSI( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ +} + +#define KEYMAP_ISO( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ +} + +#define LAYOUT_60_ansi KEYMAP_ANSI +#define LAYOUT_60_iso KEYMAP_ISO + +#endif diff --git a/keyboards/ok60/pinout.txt b/keyboards/ok60/pinout.txt new file mode 100644 index 0000000000..ec557ce4ba --- /dev/null +++ b/keyboards/ok60/pinout.txt @@ -0,0 +1,12 @@ + /* Column pin configuration + * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + * pin: D0 D1 D2 D3 D5 B6 C6 C7 F1 F0 E6 B3 B2 B1 B0 + */ + + /* Row pin configuration + * row: 0 1 2 3 4 + * pin: B5 B4 D7 D6 D4 + */ + + B7 LED backlight + F6 WS2812 Strip diff --git a/keyboards/ok60/readme.md b/keyboards/ok60/readme.md new file mode 100644 index 0000000000..cd9951c543 --- /dev/null +++ b/keyboards/ok60/readme.md @@ -0,0 +1,16 @@ +# OK60 + +![OK60](https://i.imgur.com/X1rISXS.png) + +A 60% keyboard PCB sold on AliExpress by Shenzhen YMD Tech Co.,Ltd. +It supports the same layouts and cases as the GH60 but comes with WS2812 RGB underglow. + +Keyboard Maintainer: [Edward Browncross](https://github.com/edwardbrowncross) +Hardware Supported: OK60 PCB, OK60XRGB, Diamond 60 Keyboard +Hardware Availability: [AliExpress](https://www.aliexpress.com/store/product/Free-shipping-Pre-soldered-Diode-Resistance-Satan-GH60-PCB-Board-Programmable-DIY-Mechanical-Keyboard-Poker-2/429151_32809893696.html) + +Make example for this keyboard (after setting up your build environment): + + make ok60:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk new file mode 100644 index 0000000000..a642c83b05 --- /dev/null +++ b/keyboards/ok60/rules.mk @@ -0,0 +1,66 @@ +# 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=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable the RGB backlight +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/planck/keymaps/aviator/config.h b/keyboards/planck/keymaps/aviator/config.h index 6bc53cf57b..81232367db 100644 --- a/keyboards/planck/keymaps/aviator/config.h +++ b/keyboards/planck/keymaps/aviator/config.h @@ -4,6 +4,7 @@ #include "config_common.h" #define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 3 #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c index 97d2bd0637..8ce9a8e174 100644 --- a/keyboards/planck/keymaps/aviator/keymap.c +++ b/keyboards/planck/keymaps/aviator/keymap.c @@ -134,7 +134,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { set_single_persistent_default_layer(_DATA); #ifdef BACKLIGHT_ENABLE - breathing_speed_set(3); breathing_enable(); #endif } @@ -146,7 +145,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint8_t default_layer = biton32(default_layer_state); if (default_layer == _QWERTY) { #ifdef BACKLIGHT_ENABLE - breathing_speed_set(3); breathing_enable(); #endif } @@ -167,7 +165,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint8_t default_layer = biton32(default_layer_state); if (default_layer == _QWERTY) { #ifdef BACKLIGHT_ENABLE - breathing_speed_set(3); breathing_enable(); #endif } diff --git a/keyboards/planck/keymaps/dudeofawesome/config.h b/keyboards/planck/keymaps/dudeofawesome/config.h index 68d447dec8..33dd4e41a1 100644 --- a/keyboards/planck/keymaps/dudeofawesome/config.h +++ b/keyboards/planck/keymaps/dudeofawesome/config.h @@ -2,14 +2,14 @@ #define CONFIG_USER_H #include "../../config.h" - -#define WORKMAN_SOUND COLEMAK_SOUND +#include "dudeofawesome.h" #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) // #define STARTUP_SONG SONG(NO_SOUND) #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(WORKMAN_SOUND), \ SONG(COLEMAK_SOUND), \ SONG(DVORAK_SOUND) \ } @@ -41,8 +41,4 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 -#define RGB_DI_PIN B2 // The pin the LED strip is connected to (PB2 by default) -#define RGBLED_NUM 3 // Number of LEDs in your strip -#define RGBLIGHT_ANIMATIONS - #endif diff --git a/keyboards/planck/keymaps/dudeofawesome/keymap.c b/keyboards/planck/keymaps/dudeofawesome/keymap.c index 3fa7399086..55ef0e39b5 100644 --- a/keyboards/planck/keymaps/dudeofawesome/keymap.c +++ b/keyboards/planck/keymaps/dudeofawesome/keymap.c @@ -22,17 +22,20 @@ extern keymap_config_t keymap_config; enum planck_layers { _QWERTY, - _DVORAK, _WORKMAN, + _COLEMAK, + _DVORAK, _LOWER, _RAISE, - _ADJUST + _ADJUST, + _NUMPAD, }; enum planck_keycodes { QWERTY = SAFE_RANGE, - DVORAK, WORKMAN, + COLEMAK, + DVORAK, LOWER, RAISE, BACKLIT @@ -44,61 +47,79 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | RGB | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, - {RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, + {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } }, - /* Dvorak + /* Workman * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * | Tab | Q | W | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S |Enter | + * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z | / | + * | Shift| Z | X | M | C | V | K | L | , | . | / | Enter| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | RGB | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT)}, - {RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } + [_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_QUOT }, + {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, + {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } }, - /* Workman + /* Colemak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter | + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | L | , | . | / | ' | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Enter| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | RGB | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ - [_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_QUOT }, - {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, - {RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } + [_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_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, + {TT(_NUMPAD), 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| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT)}, + {TT(_NUMPAD), 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 | _ | + | { | } | | | + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -116,7 +137,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -134,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Wrkman|Dvorak| | | + * |CPSLCK| | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Wrkman|Dvorak|Colemk| | * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -143,9 +164,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = { {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, _______, _______}, + {KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + }, + + /* Numpad + * ,-----------------------------------------------------------------------------------. + * | | ✗ | Home | Up | End | PgUp | ✗ | 7 | 8 | 9 | + | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ✗ | Left | Down | Right| PgDn | ✗ | 4 | 5 | 6 | - | ✗ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | / | * | - | + | Enter| ✗ | 1 | 2 | 3 | * | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | ✗ | | 0 | 0 | . | / | = | + * `-----------------------------------------------------------------------------------' + */ + [_NUMPAD] = { + {_______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______}, + {_______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_NO}, + {_______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, KC_PENT}, + {_______, _______, _______, _______, KC_NO, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PSLS, KC_PEQL} } }; @@ -168,6 +207,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_DVORAK); } return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; case LOWER: if (record->event.pressed) { layer_on(_LOWER); diff --git a/keyboards/planck/keymaps/dudeofawesome/readme.md b/keyboards/planck/keymaps/dudeofawesome/readme.md index 7dccbaabc3..7e2f7dc943 100644 --- a/keyboards/planck/keymaps/dudeofawesome/readme.md +++ b/keyboards/planck/keymaps/dudeofawesome/readme.md @@ -1,17 +1,17 @@ # DudeOfAwesome's Planck Layout -A basic Planck layout with simultaneous RGB and audio support. - -![Planck Layout](https://i.imgur.com/2p1TEEH.png) +![Planck Layout](https://i.imgur.com/mOc2Sbd.png) ## Features - Base Layers - - QWERTY - - Workman - - Dvorak + - QWERTY + - Workman + - Dvorak + - Colemak +- Numpad layer + ![numpad layer](https://i.imgur.com/PQENcut.png) - Audio -- WS2812b RGB backlight ## Building and flashing diff --git a/keyboards/planck/keymaps/dudeofawesome/rules.mk b/keyboards/planck/keymaps/dudeofawesome/rules.mk index 42c370aa16..edeab16439 100644 --- a/keyboards/planck/keymaps/dudeofawesome/rules.mk +++ b/keyboards/planck/keymaps/dudeofawesome/rules.mk @@ -7,4 +7,4 @@ CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index c515a0d364..6429369099 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -138,7 +138,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { break; case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_defaults(); + breathing_period_default(); } break; } diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 820018af6d..a0981573ab 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -337,7 +337,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_defaults(); + breathing_period_default(); } break; diff --git a/keyboards/planck/keymaps/steno/rules.mk b/keyboards/planck/keymaps/steno/rules.mk index 8bfc69499b..634a1c8878 100644 --- a/keyboards/planck/keymaps/steno/rules.mk +++ b/keyboards/planck/keymaps/steno/rules.mk @@ -2,6 +2,7 @@ ifndef QUANTUM_DIR include ../../../../Makefile endif +EXTRAKEY_ENABLE = no MOUSEKEY_ENABLE = no # Mouse keys(+4700) STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index cf4478cee0..bb4e19fa08 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -346,7 +346,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_defaults(); + breathing_period_default(); } break; diff --git a/keyboards/viterbi/keymaps/default/rules.mk b/keyboards/viterbi/keymaps/default/rules.mk index 1e57612788..1e3cebb145 100644 --- a/keyboards/viterbi/keymaps/default/rules.mk +++ b/keyboards/viterbi/keymaps/default/rules.mk @@ -1,5 +1 @@ RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/viterbi/keymaps/dwallace/rules.mk b/keyboards/viterbi/keymaps/dwallace/rules.mk index 1e57612788..1e3cebb145 100644 --- a/keyboards/viterbi/keymaps/dwallace/rules.mk +++ b/keyboards/viterbi/keymaps/dwallace/rules.mk @@ -1,5 +1 @@ RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/viterbi/keymaps/fido/config.h b/keyboards/viterbi/keymaps/fido/config.h new file mode 100644 index 0000000000..5cb1083652 --- /dev/null +++ b/keyboards/viterbi/keymaps/fido/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2018 Danny Nguyen + +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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +#ifndef MASTER_LEFT + #define MASTER_RIGHT +#endif +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/viterbi/keymaps/fido/keymap.c b/keyboards/viterbi/keymaps/fido/keymap.c new file mode 100644 index 0000000000..cffc236e1e --- /dev/null +++ b/keyboards/viterbi/keymaps/fido/keymap.c @@ -0,0 +1,74 @@ +#include "viterbi.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _FN 1 + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_FN1 MO(_FN) +#define KC_WD_L LCTL(KC_LEFT) +#define KC_WD_R LCTL(KC_RGHT) +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD +#define KC_RST RESET +#define KC_CTLZ LCTL(KC_Z) +#define KC_CTLX LCTL(KC_X) +#define KC_CTLC LCTL(KC_C) +#define KC_CTLV LCTL(KC_V) +#define KC_ATAB LALT(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + 1 , 2 , 3 , 4 , 5 , 6 ,ESC , DEL , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + RBRC, Q , W , E , R , T ,TAB , BSPC, Y , U , I , O , P ,LBRC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + GRV , A , S , D , F , G ,LALT, CAPS, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + BSLS, Z , X , C , V , B ,LSFT, RSFT, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + INS ,PSCR,MENU,LGUI,LCTL,SPC ,FN1 , FN1 ,SPC ,RCTL,RALT, , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + F1 , F2 , F3 , F4 , F5 , F6 , , , F7 , F8 , F9 ,F10 ,F11 ,F12 , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,PGUP,WD_L, UP ,WD_R, ,ATAB, ,RMOD,RHUI,RSAI,RVAI, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,HOME,LEFT,DOWN,RGHT, , , , ,RHUD,RSAD,RVAD, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,CTLZ,CTLX,CTLC,CTLV, , , ,MUTE,VOLD,VOLU, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ) + +}; + +void led_set_user(uint8_t usb_led) { + #ifdef RGBLIGHT_ENABLE + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + rgblight_enable(); + } else { + rgblight_disable(); + } + #endif //RGBLIGHT_ENABLE +} diff --git a/keyboards/viterbi/keymaps/fido/rules.mk b/keyboards/viterbi/keymaps/fido/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/viterbi/keymaps/fido/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/keymaps/hexwire/rules.mk b/keyboards/viterbi/keymaps/hexwire/rules.mk index 1e57612788..1e3cebb145 100644 --- a/keyboards/viterbi/keymaps/hexwire/rules.mk +++ b/keyboards/viterbi/keymaps/hexwire/rules.mk @@ -1,5 +1 @@ RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/viterbi/split_rgb.c b/keyboards/viterbi/split_rgb.c deleted file mode 100644 index 6d7cb44cf0..0000000000 --- a/keyboards/viterbi/split_rgb.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include "split_util.h" -#include "progmem.h" -#include "print.h" -#include "rgblight.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - - -rgblight_config_t rgblight_config; - -void rgblight_slave_update(void) { - //rgblight_effect_christmas(); -} - - -void rgblight_set(void) { - if (rgblight_config.enable) { - #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); - #else - ws2812_setleds(led, RGBLED_NUM); - #endif - } else { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); - #else - ws2812_setleds(led, RGBLED_NUM); - #endif - } -} diff --git a/keyboards/viterbi/split_rgb.h b/keyboards/viterbi/split_rgb.h deleted file mode 100644 index 5f552890af..0000000000 --- a/keyboards/viterbi/split_rgb.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SPLIT_RGB_H -#define SPLIT_RGB_H - -void rgblight_slave_update(void); - -#endif diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h new file mode 100644 index 0000000000..5b19bddb05 --- /dev/null +++ b/keyboards/xd75/keymaps/germanized/config.h @@ -0,0 +1,125 @@ +/* Copyright 2018 Kolja Brauns + * + * 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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +//Tap-Toggle +#define TAPPING_TOGGLE 3 + +//Tap Dancing +#define TAPPING_TERM 200 + +// Alt gr +#define ALGR(kc) RALT(kc) +#define DE_ALGR KC_RALT + +// normal characters +#define DE_Z KC_Y +#define DE_Y KC_Z + +#define DE_A KC_A +#define DE_B KC_B +#define DE_C KC_C +#define DE_D KC_D +#define DE_E KC_E +#define DE_F KC_F +#define DE_G KC_G +#define DE_H KC_H +#define DE_I KC_I +#define DE_J KC_J +#define DE_K KC_K +#define DE_L KC_L +#define DE_M KC_M +#define DE_N KC_N +#define DE_O KC_O +#define DE_P KC_P +#define DE_Q KC_Q +#define DE_R KC_R +#define DE_S KC_S +#define DE_T KC_T +#define DE_U KC_U +#define DE_V KC_V +#define DE_W KC_W +#define DE_X KC_X + +#define DE_0 KC_0 +#define DE_1 KC_1 +#define DE_2 KC_2 +#define DE_3 KC_3 +#define DE_4 KC_4 +#define DE_5 KC_5 +#define DE_6 KC_6 +#define DE_7 KC_7 +#define DE_8 KC_8 +#define DE_9 KC_9 + +#define DE_DOT KC_DOT +#define DE_COMM KC_COMM + +#define DE_SS KC_MINS +#define DE_AE KC_QUOT +#define DE_UE KC_LBRC +#define DE_OE KC_SCLN + +#define DE_CIRC KC_GRAVE // accent circumflex ^ and ring ° +#define DE_ACUT KC_EQL // accent acute ´ and grave ` +#define DE_PLUS KC_RBRC // + and * and ~ +#define DE_HASH KC_BSLS // # and ' +#define DE_LESS KC_NUBS // < and > and | +#define DE_MINS KC_SLSH // - and _ + +// shifted characters +#define DE_RING LSFT(DE_CIRC) // ° +#define DE_EXLM LSFT(KC_1) // ! +#define DE_DQOT LSFT(KC_2) // " +#define DE_PARA LSFT(KC_3) // § +#define DE_DLR LSFT(KC_4) // $ +#define DE_PERC LSFT(KC_5) // % +#define DE_AMPR LSFT(KC_6) // & +#define DE_SLSH LSFT(KC_7) // / +#define DE_LPRN LSFT(KC_8) // ( +#define DE_RPRN LSFT(KC_9) // ) +#define DE_EQL LSFT(KC_0) // = +#define DE_QST LSFT(DE_SS) // ? +#define DE_GRV LSFT(DE_ACUT) // ` +#define DE_ASTR LSFT(DE_PLUS) // * +#define DE_QUOT LSFT(DE_HASH) // ' +#define DE_MORE LSFT(DE_LESS) // > +#define DE_COLN LSFT(KC_DOT) // : +#define DE_SCLN LSFT(KC_COMM) // ; +#define DE_UNDS LSFT(DE_MINS) // _ + +// Alt Gr-ed characters +#define DE_SQ2 ALGR(KC_2) // ² +#define DE_SQ3 ALGR(KC_3) // ³ +#define DE_LCBR ALGR(KC_7) // { +#define DE_LBRC ALGR(KC_8) // [ +#define DE_RBRC ALGR(KC_9) // ] +#define DE_RCBR ALGR(KC_0) // } +#define DE_BSLS ALGR(DE_SS) // backslash +#define DE_AT ALGR(KC_Q) // @ +#define DE_EURO ALGR(KC_E) // € +#define DE_TILD ALGR(DE_PLUS) // ~ +#define DE_PIPE ALGR(DE_LESS) // | + +// Launchy +#define ALT_SPC LALT(KC_SPC) +#endif diff --git a/keyboards/xd75/keymaps/germanized/keymap.c b/keyboards/xd75/keymaps/germanized/keymap.c new file mode 100644 index 0000000000..b7c9620c13 --- /dev/null +++ b/keyboards/xd75/keymaps/germanized/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2017 Kolja Brauns +*/ +#include "xd75.h" + +#ifndef KEYMAP_GERMAN +#define KEYMAP_GERMAN + +#include "keymap.h" + +#endif + +//Tap Dance Declarations +enum { + TD_ESC_RUPT = 0 +}; + +enum { + TD_TAB = 1 +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice Ctrl+Alt+Del + [TD_ESC_RUPT] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(LCTL(KC_DEL))), + [TD_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, LGUI(KC_TAB)) +// 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 + + +// Layer shorthand +#define _QWZ 0 +#define _FNC 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + /* QWZ + * .-----------------------------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BckSpc| Esc | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Tab | Q | W | E | R | T | Z | U | I | O | P | Ü | + | | PgUp | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| Enter |-------| + * | Ctrl/ | A | S | D | F | G | H | J | K | L | Ö | Ä | # | | PgDn | + * | GUITab| | | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | LShift| Y | X | C | V | B | N | M | , | . | - | ^ | Home/ | Up | End | + * | | | | | | | | | | | | | RShift| | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | LCtrl | LAlt | MO(1)/| Space | Backspace | MO(1)/|AltGr/ | Win | < | Del | Left | Down | Right | + * | | | Enter | | | TO(1) |Pause | | | | | | | + * °-----------------------------------------------------------------------------------------------------------------------° + */ + + [_QWZ] = { + { TD(TD_ESC_RUPT), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, KC_ESC }, + { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_NO, KC_PGUP }, + { TD(TD_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_PGDN }, + { KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, DE_CIRC, MT(MOD_RSFT, KC_HOME), KC_UP, KC_END }, + { KC_LCTL, KC_LALT, LT(1, KC_ENT), KC_SPC, KC_NO, KC_BSPC, KC_NO, TT(1), MT(MOD_RALT, KC_PAUS), KC_RGUI, DE_LESS, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT }, + }, + + /* FNC + * .-----------------------------------------------------------------------------------------------------------------------. + * | Reset | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | _____ | _____ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | _____ | _____ | _____ |Bright+| _____ | _____ | _____ | _____ | _____ | Up | PrtSc | _____ | _____ | _____ | _____ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | _____ | _____ | _____ |RGB Tog|RGB Mod| _____ | _____ | _____ | Left | Down | Right | _____ | _____ | Play | _____ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | CpsLck| _____ | _____ |Bright-| _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | VolUp | Mute | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | TO(0) | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | Prev | VolDn | Next | + * °-----------------------------------------------------------------------------------------------------------------------° +*/ + [_FNC] = { + { RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS }, + { KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, + { KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS }, + { KC_CAPS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE }, + { TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT }, + }, + +}; + diff --git a/keyboards/xd75/keymaps/germanized/readme.md b/keyboards/xd75/keymaps/germanized/readme.md new file mode 100644 index 0000000000..81e98c9f70 --- /dev/null +++ b/keyboards/xd75/keymaps/germanized/readme.md @@ -0,0 +1,83 @@ +# XD75RE + +Copyright 2018 Kolja Brauns + +### Current release: 1.7 + +**Features** +A keymap for German users of the XD75RE keyboard, customized to my needs. Not optimized for ten-finger typing. Some choices are due to me being a lefty. +Designed to ease transition from staggered layouts, with the most important keys in the same positions. All German alphanumerics on main layer. Keyboard language should be set to DE in your OS. +Lots of dual-use keys, mostly with hold/tap. See visual representation below. +Some 2u keys, using PoS caps. If you don't have any you'll have to replace the dummy keys with the relevant keycodes. +Full nav keys on main layer. +Designed to be used with an additional macropad, no numpad configured. + + **QWZ** - Layer 0, Default Layer. QWERTZ layout. + + + .-----------------------------------------------------------------------------------------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BckSpc| Esc | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Tab | Q | W | E | R | T | Z | U | I | O | P | Ü | + | | PgUp | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| Enter |-------| + | Ctrl/ | A | S | D | F | G | H | J | K | L | Ö | Ä | # | | PgDn | + | GUITab| | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | LShift| Y | X | C | V | B | N | M | , | . | - | ^ | Home/ | Up | End | + | | | | | | | | | | | | | RShift| | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | LCtrl | LAlt | MO(1)/| Space | Backspace | MO(1)/|AltGr/ | Win | < | Del | Left | Down | Right | + | | | Enter | | | TO(1) |Pause | | | | | | | + °-----------------------------------------------------------------------------------------------------------------------° + + + + +**FNC** - Layer 1, Function Layer. F-Keys, additional useful keys. Usually accessed temporarily, can be toggled if necessary. + + + .-----------------------------------------------------------------------------------------------------------------------. + | Reset | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | _____ | _____ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | _____ | _____ | _____ |Bright+| _____ | _____ | _____ | _____ | _____ | Up | PrtSc | _____ | _____ | _____ | _____ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | _____ | _____ | _____ |RGB Tog|RGB Mod| _____ | _____ | _____ | Left | Down | Right | _____ | _____ | Play | _____ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | CpsLck| _____ | _____ |Bright-| _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | VolUp | Mute | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | TO(0) | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | Prev | VolDn | Next | + °-----------------------------------------------------------------------------------------------------------------------° + + + +*Release 1.1* + +Added Printscreen to second layer. +Added shortcut to Launchy to AltGr. + +*Release 1.3* + +Now using PoS keys for 2u keys, added dummy keys accordingly (not strictly necessary since debouncing handles this, but without this you'll have double input rarely.) +Cleaned keymap up & removed unnecessary layers. + +*Release 1.4* +Fixed position of the reset key, replaced right spacebar with backspace. + +*Release 1.5* +Reset moved to Esc. Removed Numpad since it wasn't getting any use. Removed random other keys on function layer that weren't getting any use or are covered by my macropad. Added RShift for held home key. +Added secondary arrow keys on JIKL. + +*Release 1.6* +Major rework and cleanup. +Capslock removed. Caps now temporarily toggles function layer when held, Esc when tapped. LShift is Capslock when tapped. Esc is Ctrl-Alt-Del on tap. +Left lower MO(1) is now Enter on tap. Right lower Layer(1) is now Tap-Toggle (Toggle:_Tap thrice). +Media keys moved to nav section - Enter=Play, Up=VolUp, Down=VolDn, Left=Prev, Right=Next, End=Mute. +Added PrintScreen on P on Layer 1. +Added cleaner visual representation since the multi-function keys make the actual keymap messy. +Moved old versions into folder together, only current version in root keymap directory now. + +*Release 1.7* +Backspace split, includes Esc now. +Capslock moved to function layer to keep smoother LShift operation. +Original Caps key now Ctrl, Alt+GUI on double-tap - inspired by Android. +Cleaned up visual representation in readme. diff --git a/keyboards/xd75/keymaps/germanized/rules.mk b/keyboards/xd75/keymaps/germanized/rules.mk new file mode 100644 index 0000000000..d72bcf575d --- /dev/null +++ b/keyboards/xd75/keymaps/germanized/rules.mk @@ -0,0 +1,38 @@ +# Copyright 2013 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 . + + +# QMK 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ymd96/README.md b/keyboards/ymd96/README.md index a60323ab95..5de5062ecd 100644 --- a/keyboards/ymd96/README.md +++ b/keyboards/ymd96/README.md @@ -10,7 +10,7 @@ using Bootmapper Client to change any keyboard settings, since not all the USB report options are supported. Here is the default layout, it is fairly simple with a few function keys: -![YMD96 Layout](https://i.imgur.com/qCwE2ns.png) +![YMD96 Layout](https://i.imgur.com/3QnqVPn.png) If you have a different layout (since there were many options during the GB), please feel free to contribute! Keyboard maintainer: [Andrew](https://github.com/sparkyman215) @@ -29,27 +29,18 @@ This firmware was modified from [ps2avrGB](https://github.com/qmk/qmk_firmware/t ## Installing and Building -First, install the requirements. These commands are for OSX, but all you -need is the AVR toolchain and `bootloadHID` for flashing: - -``` -$ brew cask install crosspack-avr -$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb -``` - -In order to use the `./program` script, which can reboot the board into -the bootloader, you'll need Python 2 with PyUSB installed: - -``` -$ pip install pyusb -``` +Since the YMD96 uses an ATmega32a chip instead of the 32u4, you need to download [HIDBootFlash v.1.0](http://vusb.wikidot.com/project:hidbootflash) for Windows. If anyone knows of a Linux/Mac bootflasher that works, edit this readme! +On Windows, I use [MINGw](http://www.mingw.org/) to compile the keymaps. On Linux, you can simply use the terminal. +Once you have those two pieces of software: Build the keyboard with ``` -$ make ymd96:default +$ make ymd96-default ``` If you make your own layout, change the `default` word to whatever your layout is. +And flash the compiled hex file with `HIDBootFlash`. Simply put the board in flashing mode by plugging it in while holding control, and click `find device`. Then you can specify the .hex file and flash it to the device. + ## Troubleshooting From my experience, it's really hard to brick these boards. But these @@ -60,3 +51,5 @@ tricks have been useful when it got stuck in a weird scenario. done, just reflash the board with the original firmware. 2. Sometimes USB hubs can act weird, so try connecting the board directly to your computer or plugging/unplugging the USB hub. + +Lastly, if you still need help, you can add me on Discord and I'll be happy to help. diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index e0a2aa1383..8a0668ac98 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -31,10 +31,13 @@ along with this program. If not, see . #define MATRIX_COLS 15 #define DIODE_DIRECTION ROW2COL -#define RGBLED_NUM 20 +#define RGB_DI_PIN C4 +#define RGBLED_NUM 18 #define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_VAL_STEP 20 #define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c index ae2b3ed197..1ca3d22a34 100644 --- a/keyboards/ymd96/keymaps/default/keymap.c +++ b/keyboards/ymd96/keymaps/default/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | - | 18 keys * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + | 17 keys * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys - * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | ter | 12 keys + * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys */ [_DEFLT] = KEYMAP( @@ -46,17 +46,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 1, raise layer * | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | - * | | | | | | | | | | | | | | | | | | | + * | | |rgb_up|rgb_dn|rgb_mo| | | | | | F22 | F23 | F24 | | | | | | * | | | | | | | | | | | | | | | | | | * | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | | - * | | | | | | | | | | | | | | + * | | | | | | |MPrev | | | MNext| | | | */ [_RAISE] = KEYMAP( - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_F22, KC_F23, KC_F24, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_VAI, RGB_VAD, RGB_MOD, ______, ______, ______, ______, ______, KC_F22, KC_F23, KC_F24, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, KC_MPRV, ______, ______, KC_MNXT, ______, ______ \ ) }; \ No newline at end of file diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index 788c37d6e1..f79a172908 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -12,6 +12,9 @@ /* Personal preference (enable by passing EXTRAFLAGS=... to make). */ /* #define CFQ_USE_MOMENTARY_LAYER_KEYS */ +/* Holding right/left or left/right shift for single or double quote pair */ +/* #define CFQ_USE_SHIFT_QUOTES */ + #define CFQ_USE_DYNAMIC_MACRO #if !defined(CFQ_USER_KEY0) @@ -21,10 +24,10 @@ # define CFQ_USER_KEY1 CFQ_KC_FN1 #endif #if !defined(CFQ_USER_KEY2) -# define CFQ_USER_KEY2 KC_LT +# define CFQ_USER_KEY2 KC_INS #endif #if !defined(CFQ_USER_KEY3) -# define CFQ_USER_KEY3 KC_GT +# define CFQ_USER_KEY3 KC_NLCK #endif #if !defined(CFQ_USER_KEY4) # define CFQ_USER_KEY4 KC_BSPC @@ -38,6 +41,9 @@ #if !defined(CFQ_USER_KEY7) # define CFQ_USER_KEY7 CFQ_KC_FN3 #endif +#if !defined(CFQ_USER_KEY8) +# define CFQ_USER_KEY8 KC_DEL +#endif #ifndef CFQ_WORD_A #define CFQ_WORD_A "" @@ -118,14 +124,29 @@ #define CFQ_WORD_Z "" #endif -static const char *cfq_word_lut[26] = { - CFQ_WORD_A, CFQ_WORD_B, CFQ_WORD_C, CFQ_WORD_D, CFQ_WORD_E, CFQ_WORD_F, - CFQ_WORD_G, CFQ_WORD_H, CFQ_WORD_I, CFQ_WORD_J, CFQ_WORD_K, CFQ_WORD_L, - CFQ_WORD_M, CFQ_WORD_N, CFQ_WORD_O, CFQ_WORD_P, CFQ_WORD_Q, CFQ_WORD_R, - CFQ_WORD_S, CFQ_WORD_T, CFQ_WORD_U, CFQ_WORD_V, CFQ_WORD_W, CFQ_WORD_X, - CFQ_WORD_Y, CFQ_WORD_Z, +/* lower and title capitals versions (setup at start). */ +static char *cfq_word_lut[2][26] = { + { + CFQ_WORD_A, CFQ_WORD_B, CFQ_WORD_C, CFQ_WORD_D, CFQ_WORD_E, CFQ_WORD_F, + CFQ_WORD_G, CFQ_WORD_H, CFQ_WORD_I, CFQ_WORD_J, CFQ_WORD_K, CFQ_WORD_L, + CFQ_WORD_M, CFQ_WORD_N, CFQ_WORD_O, CFQ_WORD_P, CFQ_WORD_Q, CFQ_WORD_R, + CFQ_WORD_S, CFQ_WORD_T, CFQ_WORD_U, CFQ_WORD_V, CFQ_WORD_W, CFQ_WORD_X, + CFQ_WORD_Y, CFQ_WORD_Z, + }, + {NULL} }; +/* Storage for title-caps strings. */ +static char cfq_word_lut_title_caps[ + sizeof(CFQ_WORD_A) + sizeof(CFQ_WORD_B) + sizeof(CFQ_WORD_C) + sizeof(CFQ_WORD_D) + + sizeof(CFQ_WORD_E) + sizeof(CFQ_WORD_F) + sizeof(CFQ_WORD_G) + sizeof(CFQ_WORD_H) + + sizeof(CFQ_WORD_I) + sizeof(CFQ_WORD_J) + sizeof(CFQ_WORD_K) + sizeof(CFQ_WORD_L) + + sizeof(CFQ_WORD_M) + sizeof(CFQ_WORD_N) + sizeof(CFQ_WORD_O) + sizeof(CFQ_WORD_P) + + sizeof(CFQ_WORD_Q) + sizeof(CFQ_WORD_R) + sizeof(CFQ_WORD_S) + sizeof(CFQ_WORD_T) + + sizeof(CFQ_WORD_U) + sizeof(CFQ_WORD_V) + sizeof(CFQ_WORD_W) + sizeof(CFQ_WORD_X) + + sizeof(CFQ_WORD_Y) + sizeof(CFQ_WORD_Z) +]; + #define BASE 0 /* default layer */ #define SYMB 1 /* symbols */ #define MDIA 2 /* media keys */ @@ -186,13 +207,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Ins | + * | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | < | > | | Home | End | + * | Ins |NumClk| | Home | End | * ,------+------+------| |------+------+------. * | | |CapsLk| | PgUp | | | - * |BSpace| Del |------| |------| ~L2 |Space | + * |BSpace| Del |------| |------| ~L2 |Enter | * | | | ~L3 | | PgDn | | | * `--------------------' `--------------------' * @@ -207,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | USR1 | | | | | | | | + * | | | | USR1 | | | | | | | USR8 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | USR2 | USR3 | | | | @@ -235,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RPRN, 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_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - KC_LEFT, KC_DOWN,KC_UP, KC_RGHT, KC_INS, + KC_LEFT, KC_DOWN,KC_UP, KC_RGHT, CFQ_USER_KEY8, KC_HOME, KC_END, KC_PGUP, KC_PGDN, CFQ_KC_FN2, KC_ENT @@ -380,6 +401,15 @@ const uint16_t PROGMEM fn_actions[] = { [3] = ACTION_LAYER_TAP_TOGGLE(WORD), /* FN3 - Momentary Layer 3 (Words) */ }; + + #define WITHOUT_MODS(...) \ + do { \ + uint8_t _real_mods = get_mods(); \ + clear_mods(); \ + { __VA_ARGS__ } \ + set_mods(_real_mods); \ + } while (0) + bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef CFQ_USE_DYNAMIC_MACRO if (!process_record_dynamic_macro(keycode, record)) { @@ -468,27 +498,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } break; +#ifdef CFQ_USE_SHIFT_QUOTES case KC_LSHIFT: /* '' */ if (record->event.pressed && (keyboard_report->mods & (MOD_BIT(KC_RSFT)))) { - clear_mods(); - SEND_STRING("''" SS_TAP(X_LEFT) SS_DOWN(X_RSHIFT) SS_DOWN(X_LSHIFT)); + WITHOUT_MODS({ + SEND_STRING("''" SS_TAP(X_LEFT) SS_DOWN(X_RSHIFT) SS_DOWN(X_LSHIFT)); + }); return false; } break; case KC_RSHIFT: /* "" */ if (record->event.pressed && (keyboard_report->mods & (MOD_BIT(KC_LSFT)))) { - clear_mods(); - SEND_STRING("\x22\x22" SS_TAP(X_LEFT) SS_DOWN(X_LSHIFT) SS_DOWN(X_RSHIFT)); + WITHOUT_MODS({ + SEND_STRING("\x22\x22" SS_TAP(X_LEFT) SS_DOWN(X_LSHIFT) SS_DOWN(X_RSHIFT)); + }); return false; } break; - +#endif /* CFQ_USE_SHIFT_QUOTES */ case M_WORD_A...M_WORD_Z: { - const char *word = cfq_word_lut[keycode - M_WORD_A]; + uint8_t shift_index = (keyboard_report->mods & (MOD_BIT(KC_RSFT) | MOD_BIT(KC_LSFT))) ? 1 : 0; + const char *word = cfq_word_lut[shift_index][keycode - M_WORD_A]; if (record->event.pressed) { if (*word) { - send_string(word); + WITHOUT_MODS({ + send_string(word); + }); } return false; } @@ -502,6 +538,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /* Runs just one time when the keyboard initializes. */ void matrix_init_user(void) { + /* Duplicate 'cfq_word_lut[0][...]' into 'cfq_word_lut[1][...]' */ + { + char *d = cfq_word_lut_title_caps; + for (uint16_t i = 0; i < 26; i++) { + char *s = cfq_word_lut[0][i]; + cfq_word_lut[1][i] = d; + while ((*d++ = *s++)) {} + } + } + /* Title caps. */ + for (uint16_t i = 0; i < 26; i++) { + char *w = cfq_word_lut[1][i]; + bool prev_is_alpha = false; + if (*w) { + while (*w) { + bool is_lower = (*w >= 'a' && *w <= 'z'); + bool is_upper = (*w >= 'A' && *w <= 'Z'); + if (prev_is_alpha == false && is_lower) { + *w -= ('a' - 'A'); + } + prev_is_alpha = is_lower || is_upper; + w++; + } + } + } }; /* Runs constantly in the background, in a loop. */ diff --git a/layouts/community/ergodox/qwerty_code_friendly/readme.md b/layouts/community/ergodox/qwerty_code_friendly/readme.md index 231123b780..29a04e6893 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/readme.md +++ b/layouts/community/ergodox/qwerty_code_friendly/readme.md @@ -3,6 +3,9 @@ - This layout aims to balance muscle memory from a typical QWERTY layout with having keys used for software development easily accessible. + The this layout is a normalized qwerty, + with some configurable keys left thumb cluster so you can use it more as needed. + - Arrow keys follow VIM convention (the media layer even uses arrow keys for HJKL). @@ -21,13 +24,6 @@ however using the larger thumb cluster ended up being more of a reach while typing. -- There is a handy shortcut for writing quotes that inserts the cursor - between the quotation marks. - - Holding LShift, then RShift types: "" (then presses left). - - Holding RShift, then LShift types: '' (then presses left). - ## Configuration Some optional behavior is configurable without editing the code @@ -37,6 +33,14 @@ using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make. (0..7) are used for custom-keys - `CFQ_USE_MOMENTARY_LAYER_KEYS` is used to prevent layer keys from toggling when tapped. +- `CFQ_USE_SHIFT_QUOTES` + an optional handy shortcut for writing quotes that inserts the + cursor between the quotation marks. + + Holding LShift, then RShift types: "" (then presses left). + + Holding RShift, then LShift types: '' (then presses left). + - `CFQ_WORD_[A-Z]` defines can bind a key to an entire user defined word. @@ -54,13 +58,13 @@ using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make. |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------| | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Ins | + | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del | `----------------------------------' `----------------------------------' ,-------------. ,-------------. - | < | > | | Home | End | + | Ins |NumClk| | Home | End | ,------+------+------| |------+------+------. | | |CapsLk| | PgUp | | | - |BSpace| Del |------| |------| ~L2 |Space | + |BSpace| Del |------| |------| ~L2 |Enter | | | | ~L3 | | PgDn | | | `--------------------' `--------------------' @@ -75,7 +79,7 @@ Optional overrides: see CFQ_USER_KEY# defines. |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | | | | | | | | | | | | | | | | `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - | | | | USR1 | | | | | | | | + | | | | USR1 | | | | | | | USR8 | `----------------------------------' `----------------------------------' ,-------------. ,-------------. | USR2 | USR3 | | | | @@ -166,6 +170,12 @@ eg: `-DCFQ_WORD_E=\"my@email.com\"` ## Changelog +- 2018/03/08 + Add `CFQ_USE_SHIFT_QUOTES` option. + Add `CFQ_USER_KEY8` key. + + When holding shift `CFQ_WORD_[A-Z]` use title caps. + - 2018/03/06 Add layer for user defined words (replaces `CFQ_USE_EXPEREMENTAL_LAYER`). diff --git a/quantum/quantum.h b/quantum/quantum.h index b4c9e0b894..e6d76015b0 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -124,6 +124,7 @@ extern uint32_t default_layer_state; #define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI) #define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT) #define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT) +#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT) #define SEND_STRING(str) send_string_P(PSTR(str)) extern const bool ascii_to_shift_lut[0x80]; diff --git a/users/dudeofawesome/dudeofawesome.c b/users/dudeofawesome/dudeofawesome.c new file mode 100644 index 0000000000..5a9117b029 --- /dev/null +++ b/users/dudeofawesome/dudeofawesome.c @@ -0,0 +1 @@ +#include "dudeofawesome.h" diff --git a/users/dudeofawesome/dudeofawesome.h b/users/dudeofawesome/dudeofawesome.h new file mode 100644 index 0000000000..b0387f2ad4 --- /dev/null +++ b/users/dudeofawesome/dudeofawesome.h @@ -0,0 +1,16 @@ +#ifndef USERSPACE +#define USERSPACE + +#define TAPPING_TOGGLE 2 + +#ifdef AUDIO_ENABLE + #define WORKMAN_SOUND \ + E__NOTE(_GS7), \ + ED_NOTE(_E7), \ + S__NOTE(_REST), \ + E__NOTE(_A6), \ + S__NOTE(_REST), \ + ED_NOTE(_GS6), +#endif + +#endif diff --git a/users/dudeofawesome/rules.mk b/users/dudeofawesome/rules.mk new file mode 100644 index 0000000000..b99697b586 --- /dev/null +++ b/users/dudeofawesome/rules.mk @@ -0,0 +1 @@ +SRC += dudeofawesome.c diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk index 5dd62c200b..359478912c 100644 --- a/users/gordon/rules.mk +++ b/users/gordon/rules.mk @@ -1 +1,2 @@ +TAP_DANCE_ENABLE = yes SRC += gordon.c \ No newline at end of file diff --git a/util/macos_install.sh b/util/macos_install.sh index 551b84b5aa..ec8502985a 100755 --- a/util/macos_install.sh +++ b/util/macos_install.sh @@ -1,6 +1,6 @@ #!/bin/bash -if brew --version 2>&1 > /dev/null; then +if ! brew --version 2>&1 > /dev/null; then echo "Error! Homebrew not installed or broken!" echo -n "Would you like to install homebrew now? [y/n] " while read ANSWER; do