From de96513ff2f12e56a572b6f54db548725194c10b Mon Sep 17 00:00:00 2001 From: Toni Date: Sun, 17 Jul 2016 14:57:56 +0200 Subject: changes needed for a ISO satan PCB including a split right-shift key --- keyboards/satan/keymaps/iso_split_rshift/Makefile | 70 ++++++++ keyboards/satan/keymaps/iso_split_rshift/build.sh | 17 ++ keyboards/satan/keymaps/iso_split_rshift/config.h | 31 ++++ keyboards/satan/keymaps/iso_split_rshift/keymap.c | 192 +++++++++++++++++++++ .../satan/keymaps/iso_split_rshift/resetboard.sh | 4 + keyboards/satan/keymaps/iso_split_rshift/satan.c | 30 ++++ keyboards/satan/keymaps/iso_split_rshift/satan.h | 96 +++++++++++ 7 files changed, 440 insertions(+) create mode 100644 keyboards/satan/keymaps/iso_split_rshift/Makefile create mode 100755 keyboards/satan/keymaps/iso_split_rshift/build.sh create mode 100644 keyboards/satan/keymaps/iso_split_rshift/config.h create mode 100644 keyboards/satan/keymaps/iso_split_rshift/keymap.c create mode 100755 keyboards/satan/keymaps/iso_split_rshift/resetboard.sh create mode 100644 keyboards/satan/keymaps/iso_split_rshift/satan.c create mode 100644 keyboards/satan/keymaps/iso_split_rshift/satan.h (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/Makefile b/keyboards/satan/keymaps/iso_split_rshift/Makefile new file mode 100644 index 000000000..67eaa078f --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/Makefile @@ -0,0 +1,70 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # 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 ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/satan/keymaps/iso_split_rshift/build.sh b/keyboards/satan/keymaps/iso_split_rshift/build.sh new file mode 100755 index 000000000..2bfc3bb32 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# adjust for cpu +# -j 16 gave best result on a hyperthreaded quad core core i7 +THREADS="-j 16" +echo "We need sudo later" +sudo ls 2>&1 /dev/null +make clean +make KEYMAP=toni77 ${THREADS} +if [[ $? -eq 0 ]] +then + echo "please trigger flashing! you have 5 seconds" + sleep 5 + sudo make KEYMAP=toni77 dfu ${THREADS} +else + echo "make failed" + exit 77 +fi diff --git a/keyboards/satan/keymaps/iso_split_rshift/config.h b/keyboards/satan/keymaps/iso_split_rshift/config.h new file mode 100644 index 000000000..39eec4b59 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/config.h @@ -0,0 +1,31 @@ +/* +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" + + +#define RGB_DI_PIN B2 +#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 + +#endif diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c new file mode 100644 index 000000000..fc07f6da8 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -0,0 +1,192 @@ +// 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" + +// 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 _DEF 0 +#define _SPC 1 +#define _TAB 2 +#define _SFX 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _DEF: Default Layer + * ,-----------------------------------------------------------.------------------------------------- + * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 !! + * |-----------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP + * |-----------------------------------------------------------| + * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is + * `-----------------------------------------------------------' LEFT DWN RIGHT + */ +[_DEF] = KEYMAP_ISO_SPLITRSHIFT( + 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, \ + F(2), 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, \ + F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, F(17), \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX),F(4), \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, F(5), F(6), F(7)) , + /* Keymap 1: F-and-vim Layer, modified with Space (Fn0) + * ,-----------------------------------------------------------.----------------------------------------- + * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| + * |-----------------------------------------------------------| + * | |Paus| Up| | | | | | | | | | | | + * |-----------------------------------------------------------| + * | |Lft|Dwn|Rgt| | | |Left|Down|Right|Up| | PLAY | + * |-----------------------------------------------------------| + * | | | | | | |M0 | | | | | Vol+ | | + * |-----------------------------------------------------------| + * | | | | |Alt |Prev|Vol-|Next| + * `-----------------------------------------------------------' + */ +[_SPC] = KEYMAP_ISO_SPLITRSHIFT( + KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT) , + + /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (Fn1) + * ,-----------------------------------------------------------.----------------------------------------- + * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | |Pos1|PgDn|PgUp|End| |Retrn | + * |-----------------------------------------------------------| + * | | | | | | |AF2| | | | | PgUp | | + * |-----------------------------------------------------------| + * | | | | |Alt |Pos1|PgDn|End | + * `-----------------------------------------------------------' + */ +[_TAB] = KEYMAP_ISO_SPLITRSHIFT( + KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) , + + /* Keymap 3: Split right shift Numpad toggle Layer (Fn2) + * ,-----------------------------------------------------------.----------------------------------------- + * |RSET| | | | | | | 7| 8| 9| | | |Backsp | + * |-----------------------------------------------------------| + * | | | | | | | | 4 | 5 | 6 | | | | \ | + * |-----------------------------------------------------------| + * | | L | L | | | | | 1 | 2 | 3 | | | Return | + * |-----------------------------------------------------------| + * | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent + * |-----------------------------------------------------------| LED controlling + * |Ctrl|Win |Alt | |Alt |Left|Down|Right| + * `-----------------------------------------------------------' + */ +[_SFX] = KEYMAP_ISO_SPLITRSHIFT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ + KC_TRNS, F(9), F(10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ + KC_TRNS, F(11), F(12), F(13), F(14), F(15), F(16), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT) , + +}; + +enum function_id { + LAUNCH, + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_SPC, KC_SPACE), + [1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), + [2] = ACTION_LAYER_TAP_KEY(_TAB, KC_TAB), + [3] = ACTION_LAYER_TOGGLE(_SFX), + [4] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), + [5] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), + [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), + [7] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), + [8] = ACTION_FUNCTION(LAUNCH), + [9] = ACTION_FUNCTION(RGBLED_TOGGLE), + [10] = ACTION_FUNCTION(RGBLED_STEP_MODE), + [11] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [12] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [13] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [14] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [15] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), + [16] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), + [17] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), +}; + +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: + return (record->event.pressed ? + MACRO( D(RALT), T(SPC), U(RALT), END ) + :MACRO( END )); + break; + case 1: + return (record->event.pressed ? + MACRO( D(LALT), T(F2), U(LALT), END ) + :MACRO( END )); + break; + } + return MACRO_NONE; +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + case RGBLED_INCREASE_HUE: + if (record->event.pressed) { + rgblight_increase_hue(); + } + break; + case RGBLED_DECREASE_HUE: + if (record->event.pressed) { + rgblight_decrease_hue(); + } + break; + case RGBLED_INCREASE_SAT: + if (record->event.pressed) { + rgblight_increase_sat(); + } + break; + case RGBLED_DECREASE_SAT: + if (record->event.pressed) { + rgblight_decrease_sat(); + } + break; + case RGBLED_INCREASE_VAL: + if (record->event.pressed) { + rgblight_increase_val(); + } + break; + case RGBLED_DECREASE_VAL: + if (record->event.pressed) { + rgblight_decrease_val(); + } + break; + case RGBLED_STEP_MODE: + if (record->event.pressed) { + rgblight_step(); + } + break; + } +} diff --git a/keyboards/satan/keymaps/iso_split_rshift/resetboard.sh b/keyboards/satan/keymaps/iso_split_rshift/resetboard.sh new file mode 100755 index 000000000..d955ccf54 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/resetboard.sh @@ -0,0 +1,4 @@ +#!/bin/bash +sudo dfu-programmer atmega32u4 erase --force +sudo dfu-programmer atmega32u4 flash clear_flash.hex +sudo dfu-programmer atmega32u4 reset diff --git a/keyboards/satan/keymaps/iso_split_rshift/satan.c b/keyboards/satan/keymaps/iso_split_rshift/satan.c new file mode 100644 index 000000000..d2c5d5c20 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/satan.c @@ -0,0 +1,30 @@ +#include "satan.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRB |= (1<<2); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1<&1 /dev/null make clean -make KEYMAP=toni77 ${THREADS} +make KEYMAP=iso_split_rschift ${THREADS} if [[ $? -eq 0 ]] then echo "please trigger flashing! you have 5 seconds" sleep 5 - sudo make KEYMAP=toni77 dfu ${THREADS} + sudo make KEYMAP=iso_split_rschift dfu ${THREADS} else echo "make failed" exit 77 -- cgit v1.2.3 From 1988c180e3cc971e83db0f9e862de4857ce6d766 Mon Sep 17 00:00:00 2001 From: Toni Date: Tue, 19 Jul 2016 09:16:55 +0200 Subject: small cosmetic change --- keyboards/satan/keymaps/iso_split_rshift/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/build.sh b/keyboards/satan/keymaps/iso_split_rshift/build.sh index c286f26f8..9523f6716 100755 --- a/keyboards/satan/keymaps/iso_split_rshift/build.sh +++ b/keyboards/satan/keymaps/iso_split_rshift/build.sh @@ -2,16 +2,16 @@ # adjust for cpu # -j 16 gave best result on a hyperthreaded quad core core i7 THREADS="-j 16" -KMAP=iso_split_rschift +KMAP=iso_split_rshift echo "We need sudo later" sudo ls 2>&1 /dev/null make clean -make KEYMAP=iso_split_rschift ${THREADS} +make KEYMAP=${KMAP} ${THREADS} if [[ $? -eq 0 ]] then echo "please trigger flashing! you have 5 seconds" sleep 5 - sudo make KEYMAP=iso_split_rschift dfu ${THREADS} + sudo make KEYMAP=${KMAP} dfu ${THREADS} else echo "make failed" exit 77 -- cgit v1.2.3 From 5cd6d607fc7362fdf72ecd76f802305bce68270c Mon Sep 17 00:00:00 2001 From: Toni Date: Tue, 19 Jul 2016 09:17:31 +0200 Subject: changed ctrl back to enter. "j" interfered with my vimming --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index a2623e0e0..fc07f6da8 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEF] = KEYMAP_ISO_SPLITRSHIFT( 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, \ F(2), 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, \ - F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, F(17), KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, F(17), \ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX),F(4), \ KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, F(5), F(6), F(7)) , /* Keymap 1: F-and-vim Layer, modified with Space (Fn0) @@ -124,7 +124,7 @@ const uint16_t PROGMEM fn_actions[] = { [14] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), [15] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), [16] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [17] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_J), + [17] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -- cgit v1.2.3 From c1f014b1dd24ba7e121ae3ca999d832b07ce50cf Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 22 Jul 2016 08:13:06 +0200 Subject: purely cosmetic changes --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 84 +++++++++++------------ 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index fc07f6da8..17d4b3345 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer - * ,-----------------------------------------------------------.------------------------------------- + * ,-----------------------------------------------------------. * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | * |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 !! @@ -26,14 +26,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is * `-----------------------------------------------------------' LEFT DWN RIGHT */ -[_DEF] = KEYMAP_ISO_SPLITRSHIFT( - 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, \ - F(2), 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, \ - F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, F(17), \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX),F(4), \ - KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, F(5), F(6), F(7)) , + [_DEF] = KEYMAP_ISO_SPLITRSHIFT( + 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, \ + F(2), 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, \ + F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, F(17), \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX),F(4), \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, F(5), F(6), F(7)) , + /* Keymap 1: F-and-vim Layer, modified with Space (Fn0) - * ,-----------------------------------------------------------.----------------------------------------- + * ,-----------------------------------------------------------. * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| * |-----------------------------------------------------------| * | |Paus| Up| | | | | | | | | | | | @@ -45,15 +46,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ -[_SPC] = KEYMAP_ISO_SPLITRSHIFT( - KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT) , - + [_SPC] = KEYMAP_ISO_SPLITRSHIFT( + KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (Fn1) - * ,-----------------------------------------------------------.----------------------------------------- + * ,-----------------------------------------------------------. * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE * |-----------------------------------------------------------| * | | | | | | | | | | | | | | | @@ -65,15 +66,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Pos1|PgDn|End | * `-----------------------------------------------------------' */ -[_TAB] = KEYMAP_ISO_SPLITRSHIFT( - KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) , - + [_TAB] = KEYMAP_ISO_SPLITRSHIFT( + KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + /* Keymap 3: Split right shift Numpad toggle Layer (Fn2) - * ,-----------------------------------------------------------.----------------------------------------- + * ,-----------------------------------------------------------. * |RSET| | | | | | | 7| 8| 9| | | |Backsp | * |-----------------------------------------------------------| * | | | | | | | | 4 | 5 | 6 | | | | \ | @@ -85,13 +86,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | |Alt |Left|Down|Right| * `-----------------------------------------------------------' */ -[_SFX] = KEYMAP_ISO_SPLITRSHIFT( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ - KC_TRNS, F(9), F(10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ - KC_TRNS, F(11), F(12), F(13), F(14), F(15), F(16), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT) , - + [_SFX] = KEYMAP_ISO_SPLITRSHIFT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ + KC_TRNS, F(9), F(10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ + KC_TRNS, F(11), F(12), F(13), F(14), F(15), F(16), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), }; enum function_id { @@ -129,19 +129,19 @@ 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) { + // MACRODOWN only works in this function + switch(id) { case 0: - return (record->event.pressed ? - MACRO( D(RALT), T(SPC), U(RALT), END ) - :MACRO( END )); - break; + return (record->event.pressed ? + MACRO( D(RALT), T(SPC), U(RALT), END ) + :MACRO( END )); + break; case 1: - return (record->event.pressed ? - MACRO( D(LALT), T(F2), U(LALT), END ) - :MACRO( END )); - break; - } + return (record->event.pressed ? + MACRO( D(LALT), T(F2), U(LALT), END ) + :MACRO( END )); + break; + } return MACRO_NONE; }; -- cgit v1.2.3 From 197244e47f619b0853e4fdb54bb821a32b584764 Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 22 Jul 2016 08:14:08 +0200 Subject: more cosmetic changes (whitespace) --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 17d4b3345..c7aad3fc0 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -116,7 +116,7 @@ const uint16_t PROGMEM fn_actions[] = { [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), [7] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), [8] = ACTION_FUNCTION(LAUNCH), - [9] = ACTION_FUNCTION(RGBLED_TOGGLE), + purely cosmetic changes [9] = ACTION_FUNCTION(RGBLED_TOGGLE), [10] = ACTION_FUNCTION(RGBLED_STEP_MODE), [11] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), [12] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), -- cgit v1.2.3 From 5631f1436c356fb9e09138f186981dc9b6cb43a2 Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 22 Jul 2016 11:17:57 +0200 Subject: converted funtions to QMK aliases --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 55 ++++++++++------------- 1 file changed, 23 insertions(+), 32 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index c7aad3fc0..545cb1ab1 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -27,13 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' LEFT DWN RIGHT */ [_DEF] = KEYMAP_ISO_SPLITRSHIFT( - 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, \ - F(2), 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, \ - F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, F(17), \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX),F(4), \ - KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, F(5), F(6), F(7)) , - - /* Keymap 1: F-and-vim Layer, modified with Space (Fn0) + 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, \ + LT(_TAB,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, \ + 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_NUHS, CTL_T(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, TG(_SFX), SFT_T(KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, ALT_T(KC_LEFT), GUI_T(KC_DOWN), CTL_T(KC_RIGHT)), + /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) * ,-----------------------------------------------------------. * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| * |-----------------------------------------------------------| @@ -53,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (Fn1) + /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) * ,-----------------------------------------------------------. * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE * |-----------------------------------------------------------| @@ -73,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), - /* Keymap 3: Split right shift Numpad toggle Layer (Fn2) + /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) * ,-----------------------------------------------------------. * |RSET| | | | | | | 7| 8| 9| | | |Backsp | * |-----------------------------------------------------------| @@ -87,11 +86,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_SFX] = KEYMAP_ISO_SPLITRSHIFT( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ - KC_TRNS, F(9), F(10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ - KC_TRNS, F(11), F(12), F(13), F(14), F(15), F(16), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ + KC_TRNS, F(2), F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ + KC_TRNS, F(4), F(5), F(6), F(7), F(8), F(9), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), }; enum function_id { @@ -107,24 +106,16 @@ enum function_id { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_SPC, KC_SPACE), - [1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), - [2] = ACTION_LAYER_TAP_KEY(_TAB, KC_TAB), - [3] = ACTION_LAYER_TOGGLE(_SFX), - [4] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), - [5] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), - [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), - [7] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), - [8] = ACTION_FUNCTION(LAUNCH), - purely cosmetic changes [9] = ACTION_FUNCTION(RGBLED_TOGGLE), - [10] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [11] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [12] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [13] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [14] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [15] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [16] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [17] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), + [1] = ACTION_FUNCTION(LAUNCH), + [2] = ACTION_FUNCTION(RGBLED_TOGGLE), + [3] = ACTION_FUNCTION(RGBLED_STEP_MODE), + [4] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [5] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [6] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [7] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [8] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), + [9] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), + [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -- cgit v1.2.3 From 6ff8a8152035a32f6521d09d91594eeba269486d Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 27 Jul 2016 21:11:55 +0200 Subject: first try ar adding the parenthesis mess for german iso --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 545cb1ab1..4bd990d37 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -32,25 +32,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NUHS, CTL_T(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, TG(_SFX), SFT_T(KC_UP), \ KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, ALT_T(KC_LEFT), GUI_T(KC_DOWN), CTL_T(KC_RIGHT)), + /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) * ,-----------------------------------------------------------. * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| * |-----------------------------------------------------------| - * | |Paus| Up| | | | | | | | | | | | + * | |Paus| Up| [ | ] | | | | ( | ) | | | | | * |-----------------------------------------------------------| * | |Lft|Dwn|Rgt| | | |Left|Down|Right|Up| | PLAY | * |-----------------------------------------------------------| - * | | | | | | |M0 | | | | | Vol+ | | + * | | | | < | > | |M0 | | { | } | | Vol+ | | * |-----------------------------------------------------------| * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ [_SPC] = KEYMAP_ISO_SPLITRSHIFT( - KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS, LSFT(KC_8), LSFT(KC_9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), RALT(KC_7), RALT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) * ,-----------------------------------------------------------. -- cgit v1.2.3 From 684d869fab8bf513b2939ea544068f115b9d7b85 Mon Sep 17 00:00:00 2001 From: Toni Date: Thu, 28 Jul 2016 11:58:53 +0200 Subject: added homerow-ish brackets --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 4bd990d37..7af7c14bd 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP + * |Sft | < | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP * |-----------------------------------------------------------| * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is * `-----------------------------------------------------------' LEFT DWN RIGHT @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * | |Lft|Dwn|Rgt| | | |Left|Down|Right|Up| | PLAY | * |-----------------------------------------------------------| - * | | | | < | > | |M0 | | { | } | | Vol+ | | + * | | | | | < | > | |M0 | | { | } | | Vol+ | | * |-----------------------------------------------------------| * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * | | | | | | | |Pos1|PgDn|PgUp|End| |Retrn | * |-----------------------------------------------------------| - * | | | | | | |AF2| | | | | PgUp | | + * | | | | | | | |AF2| | | | | PgUp | | * |-----------------------------------------------------------| * | | | | |Alt |Pos1|PgDn|End | * `-----------------------------------------------------------' @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * | | L | L | | | | | 1 | 2 | 3 | | | Return | * |-----------------------------------------------------------| - * | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent + * | | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent * |-----------------------------------------------------------| LED controlling * |Ctrl|Win |Alt | |Alt |Left|Down|Right| * `-----------------------------------------------------------' -- cgit v1.2.3 From dcf672223f20412ae79eb73a58d80ccbb0bd5c31 Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 5 Aug 2016 20:53:58 +0200 Subject: enterfn / enterisctrl on hold added --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 7af7c14bd..3ee141eb4 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 !! + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 * |-----------------------------------------------------------| * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | * |-----------------------------------------------------------| @@ -107,15 +107,15 @@ enum function_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [2] = ACTION_FUNCTION(RGBLED_TOGGLE), - [3] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), + [1] = ACTION_FUNCTION(LAUNCH), + [2] = ACTION_FUNCTION(RGBLED_TOGGLE), + [3] = ACTION_FUNCTION(RGBLED_STEP_MODE), + [4] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [5] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [6] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [7] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [8] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), + [9] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), }; -- cgit v1.2.3 From b5fcb5a7447424a160b86b4d2c0d2ea29ae1d813 Mon Sep 17 00:00:00 2001 From: Toni Date: Sun, 7 Aug 2016 11:37:28 +0200 Subject: new variant with the curly braces on tab layer --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 3ee141eb4..71c205a48 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -27,11 +27,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' LEFT DWN RIGHT */ [_DEF] = KEYMAP_ISO_SPLITRSHIFT( - 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, \ - LT(_TAB,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, \ - 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_NUHS, CTL_T(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, TG(_SFX), SFT_T(KC_UP), \ - KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, ALT_T(KC_LEFT), GUI_T(KC_DOWN), CTL_T(KC_RIGHT)), + 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, \ + LT(_TAB,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, \ + 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_NUHS, CTL_T(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, TG(_SFX), SFT_T(KC_UP), \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, ALT_T(KC_LEFT), GUI_T(KC_DOWN), CTL_T(KC_RIGHT)), /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) * ,-----------------------------------------------------------. @@ -39,27 +39,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| * | |Paus| Up| [ | ] | | | | ( | ) | | | | | * |-----------------------------------------------------------| - * | |Lft|Dwn|Rgt| | | |Left|Down|Right|Up| | PLAY | + * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | * |-----------------------------------------------------------| - * | | | | | < | > | |M0 | | { | } | | Vol+ | | + * | | | | | < | > | |M0 | | | | | Vol+ | | * |-----------------------------------------------------------| * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ [_SPC] = KEYMAP_ISO_SPLITRSHIFT( - KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS, LSFT(KC_8), LSFT(KC_9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), RALT(KC_7), RALT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS, LSFT(KC_8), LSFT(KC_9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) * ,-----------------------------------------------------------. * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE * |-----------------------------------------------------------| - * | | | | | | | | | | | | | | | + * | | | | | | | | | { | } | | | | | * |-----------------------------------------------------------| - * | | | | | | | |Pos1|PgDn|PgUp|End| |Retrn | + * | | | | | | |Pos1|PgDn|PgUp|End| | |Retrn | * |-----------------------------------------------------------| * | | | | | | | |AF2| | | | | PgUp | | * |-----------------------------------------------------------| @@ -67,11 +67,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_TAB] = KEYMAP_ISO_SPLITRSHIFT( - KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_7), RALT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) * ,-----------------------------------------------------------. @@ -87,11 +87,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_SFX] = KEYMAP_ISO_SPLITRSHIFT( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ - KC_TRNS, F(2), F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ - KC_TRNS, F(4), F(5), F(6), F(7), F(8), F(9), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ + KC_TRNS, F(2), F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ + KC_TRNS, F(4), F(5), F(6), F(7), F(8), F(9), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), }; enum function_id { -- cgit v1.2.3 From cafa528b88c097f02ae92a5b15b015f5653cefe7 Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 12 Aug 2016 19:14:48 +0200 Subject: only aesthetics --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 71c205a48..9f838ba61 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -67,10 +67,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_TAB] = KEYMAP_ISO_SPLITRSHIFT( - KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_7), RALT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ + KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_7), RALT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) -- cgit v1.2.3 From 5705a403205c0c1e7c585e1a2edda21e79134ee6 Mon Sep 17 00:00:00 2001 From: Toni Date: Sun, 14 Aug 2016 20:06:47 +0200 Subject: increased readability with a defince --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 9f838ba61..68cc6755e 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -2,6 +2,7 @@ // this is the style you want to emulate. #include "satan.h" +// TODO: replace your ugly german brckets with #defines // 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. @@ -12,6 +13,9 @@ #define _TAB 2 #define _SFX 3 +// increase readability +#define _______ KC_TRNS + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. @@ -48,10 +52,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SPC] = KEYMAP_ISO_SPLITRSHIFT( KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS, LSFT(KC_8), LSFT(KC_9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + _______, KC_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), _______, _______, LSFT(KC_8), LSFT(KC_9), _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ + _______, _______, _______, _______, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), _______, _______, _______, _______, _______, KC_VOLU, \ + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) * ,-----------------------------------------------------------. @@ -67,11 +71,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_TAB] = KEYMAP_ISO_SPLITRSHIFT( - KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_7), RALT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, RALT(KC_7), RALT(KC_0), _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) * ,-----------------------------------------------------------. @@ -87,11 +91,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_SFX] = KEYMAP_ISO_SPLITRSHIFT( - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, \ - KC_TRNS, F(2), F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ - KC_TRNS, F(4), F(5), F(6), F(7), F(8), F(9), KC_TRNS, KC_TRNS, KC_0, KC_TRNS, KC_SLSH, KC_TRNS, KC_UP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), + RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ + _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, KC_NO, KC_ENT, \ + _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, _______, KC_UP, \ + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; enum function_id { -- cgit v1.2.3 From f89aec98aebc3831e4c51acd5990b2025efc7758 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 20:32:45 +0200 Subject: removed my personal stuff --- keyboards/satan/keymaps/iso_split_rshift/.gitignore | 3 +++ keyboards/satan/keymaps/iso_split_rshift/updatemerge.sh | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 keyboards/satan/keymaps/iso_split_rshift/.gitignore delete mode 100755 keyboards/satan/keymaps/iso_split_rshift/updatemerge.sh (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/.gitignore b/keyboards/satan/keymaps/iso_split_rshift/.gitignore new file mode 100644 index 000000000..4d652661c --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/.gitignore @@ -0,0 +1,3 @@ +updatemerge.sh +clear_flash.hex +resetboard.sh diff --git a/keyboards/satan/keymaps/iso_split_rshift/updatemerge.sh b/keyboards/satan/keymaps/iso_split_rshift/updatemerge.sh deleted file mode 100755 index d17ec76ec..000000000 --- a/keyboards/satan/keymaps/iso_split_rshift/updatemerge.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -git checkout iso_split_rshift # gets you "on branch dmgr2" -git fetch origin # gets you up to date with origin -git merge origin/master -- cgit v1.2.3 From ca4968bc44c39eb50752a289224568e27fce8281 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 20:46:38 +0200 Subject: readme.md added --- keyboards/satan/keymaps/iso_split_rshift/readme.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 keyboards/satan/keymaps/iso_split_rshift/readme.md (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md new file mode 100644 index 000000000..25ef62b57 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -0,0 +1,16 @@ +toneman77's Satan Layout +===================== + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +* heavily modified ISO (!) layout with split right shift key +* spaceFn +* Dual-Role keys: +* Lockable layer for LED functions and numpad +* WS2812 RGB Underglow Support (not needed anymore to solder directly to the atmega) + + +### Additional Credits +Keymap has been based on TerryMathews' fork of Aqoush's fork of qmk-satan-rgb. [here](https://github.com/TerryMathews/qmk-satan-rgb/tree/master/keyboard/satan) + -- cgit v1.2.3 From 77f3efbef6cc19ffd1b0b4cd3813285a18031de1 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 20:59:50 +0200 Subject: more information. first steps in markdown --- keyboards/satan/keymaps/iso_split_rshift/readme.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index 25ef62b57..411dbce32 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -7,10 +7,24 @@ For the full Quantum feature list, see the parent readme.md. * heavily modified ISO (!) layout with split right shift key * spaceFn * Dual-Role keys: + | Original key | when tapped | when held | + | ---------------- | ------------- | ------------- | + | Space | Space | layer change | + | Caps lock | Escape | Control | + | Tab | Tab | layer change | + | Enter | Enter | Control | * Lockable layer for LED functions and numpad +* vim-style arrow keys on hjkl (spacefn layer) +* corresponding Home/PgDn/PgUp/End on hjkl (tab layer) +* bonus arrow keys in the bottom right corner on Alt/Win/Menu/rCtrl/Shift +* more bonus arrow keys on wasd (spacefn layer) +* media keys prev/next/play/vol+/vol- (spacefn layer) +* formware bootloader button * WS2812 RGB Underglow Support (not needed anymore to solder directly to the atmega) +* additional brackets that only work in german layout due to horrible placement +in the default qwertz layout ### Additional Credits Keymap has been based on TerryMathews' fork of Aqoush's fork of qmk-satan-rgb. [here](https://github.com/TerryMathews/qmk-satan-rgb/tree/master/keyboard/satan) - +ce visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) -- cgit v1.2.3 From 5cf5e27dcd908ca538208292491e11cd00e38c57 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:02:07 +0200 Subject: Update readme.md attempt to prettify the table--- keyboards/satan/keymaps/iso_split_rshift/readme.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index 411dbce32..862b44eb1 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -7,12 +7,14 @@ For the full Quantum feature list, see the parent readme.md. * heavily modified ISO (!) layout with split right shift key * spaceFn * Dual-Role keys: +* | Original key | when tapped | when held | | ---------------- | ------------- | ------------- | | Space | Space | layer change | | Caps lock | Escape | Control | | Tab | Tab | layer change | | Enter | Enter | Control | + * Lockable layer for LED functions and numpad * vim-style arrow keys on hjkl (spacefn layer) * corresponding Home/PgDn/PgUp/End on hjkl (tab layer) -- cgit v1.2.3 From 14de76ea8079321ab97f0f187d6f598886171540 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:02:40 +0200 Subject: Update readme.md typo--- keyboards/satan/keymaps/iso_split_rshift/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index 862b44eb1..65dd26bbe 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -29,4 +29,4 @@ in the default qwertz layout ### Additional Credits Keymap has been based on TerryMathews' fork of Aqoush's fork of qmk-satan-rgb. [here](https://github.com/TerryMathews/qmk-satan-rgb/tree/master/keyboard/satan) -ce visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) +nice visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) -- cgit v1.2.3 From 94ff9c9fa54749ebcf6eb06f9c1b27076c7e23b4 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:04:11 +0200 Subject: more prettyness --- keyboards/satan/keymaps/iso_split_rshift/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index 65dd26bbe..53db78188 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -28,5 +28,5 @@ in the default qwertz layout ### Additional Credits -Keymap has been based on TerryMathews' fork of Aqoush's fork of qmk-satan-rgb. [here](https://github.com/TerryMathews/qmk-satan-rgb/tree/master/keyboard/satan) -nice visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) +* Keymap has been based on TerryMathews' fork of Aqoush's fork of qmk-satan-rgb. [here](https://github.com/TerryMathews/qmk-satan-rgb/tree/master/keyboard/satan) +* nice visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) -- cgit v1.2.3 From 396b59f256d8cbf77d359a2b9677f9f7b1d0a021 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:12:49 +0200 Subject: readme now with picture --- .../satan/keymaps/iso_split_rshift/LEDpinSatan.jpg | Bin 0 -> 793980 bytes keyboards/satan/keymaps/iso_split_rshift/readme.md | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 keyboards/satan/keymaps/iso_split_rshift/LEDpinSatan.jpg (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/LEDpinSatan.jpg b/keyboards/satan/keymaps/iso_split_rshift/LEDpinSatan.jpg new file mode 100644 index 000000000..7616693f9 Binary files /dev/null and b/keyboards/satan/keymaps/iso_split_rshift/LEDpinSatan.jpg differ diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index 53db78188..c08cddba2 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -30,3 +30,5 @@ in the default qwertz layout ### Additional Credits * Keymap has been based on TerryMathews' fork of Aqoush's fork of qmk-satan-rgb. [here](https://github.com/TerryMathews/qmk-satan-rgb/tree/master/keyboard/satan) * nice visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) +* no-need-to-solder-on-chip picture: +![no need to solder directly on the chip anymore](LEDpinSatan.jpg) -- cgit v1.2.3 From b8cbf7c9c0766b1f51373368bc3644b2c48c598f Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:18:25 +0200 Subject: script now waits for the user to press the button --- keyboards/satan/keymaps/iso_split_rshift/build.sh | 28 +++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/build.sh b/keyboards/satan/keymaps/iso_split_rshift/build.sh index 9523f6716..6b4b4568f 100755 --- a/keyboards/satan/keymaps/iso_split_rshift/build.sh +++ b/keyboards/satan/keymaps/iso_split_rshift/build.sh @@ -1,16 +1,40 @@ #!/bin/bash # adjust for cpu # -j 16 gave best result on a hyperthreaded quad core core i7 + +LIMIT=10 THREADS="-j 16" KMAP=iso_split_rshift + echo "We need sudo later" sudo ls 2>&1 /dev/null + +function wait_bootloader { + echo "Waiting for Bootloader..." + local STARTTIME=$(date +"%s") + local REMIND=0 + local EXEC=dfu-programmer + local TARGET=atmega32u4 + while true + do + sudo $EXEC $TARGET get > /dev/null 2>&1 + [ $? -eq 0 ] && break + ENDTIME=$(date +"%s") + DURATION=$(($ENDTIME-$STARTTIME)) + if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ] + then + echo "Did you forget to press the reset button?" + REMIND=1 + fi + sleep 1 + done +} make clean make KEYMAP=${KMAP} ${THREADS} if [[ $? -eq 0 ]] then - echo "please trigger flashing! you have 5 seconds" - sleep 5 + echo "please trigger flashing!" + wait_bootloader sudo make KEYMAP=${KMAP} dfu ${THREADS} else echo "make failed" -- cgit v1.2.3 From 7e1be3ae7c5b1839ce03fcedcc180e19836d3200 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:44:20 +0200 Subject: reference to reddit post and Terry Mathews --- keyboards/satan/keymaps/iso_split_rshift/readme.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index c08cddba2..1eec0e13e 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -32,3 +32,5 @@ in the default qwertz layout * nice visualization of the layers [here](http://www.keyboard-layout-editor.com/#/gists/aba4e4396459ede85bc66a22cee88e48) * no-need-to-solder-on-chip picture: ![no need to solder directly on the chip anymore](LEDpinSatan.jpg) +* special thanks to /u/TerryMathews who suggested the pin PB2 so soldering +directly on the atmega is not needed anymore [reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/4ghq9z/photos_satan_rgb60_w1976/d2k5tra) -- cgit v1.2.3 From 68005ce60232c487a6b2ff78925c070881c240b5 Mon Sep 17 00:00:00 2001 From: Toni Date: Mon, 15 Aug 2016 21:47:07 +0200 Subject: grammar --- keyboards/satan/keymaps/iso_split_rshift/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/readme.md b/keyboards/satan/keymaps/iso_split_rshift/readme.md index 1eec0e13e..116ae9160 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/readme.md +++ b/keyboards/satan/keymaps/iso_split_rshift/readme.md @@ -33,4 +33,4 @@ in the default qwertz layout * no-need-to-solder-on-chip picture: ![no need to solder directly on the chip anymore](LEDpinSatan.jpg) * special thanks to /u/TerryMathews who suggested the pin PB2 so soldering -directly on the atmega is not needed anymore [reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/4ghq9z/photos_satan_rgb60_w1976/d2k5tra) +directly on the atmega is not needed anymore. Happened on [reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/4ghq9z/photos_satan_rgb60_w1976/d2k5tra) -- cgit v1.2.3 From f5ed3e5155474e1fefee41374dc8b09ed114a67e Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 15 Aug 2016 17:26:01 -0500 Subject: Added my custom Planck layout called Circuit. * Layout has image and readme, as well as documentation in the code. --- keyboards/planck/keymaps/circuit/Makefile | 25 ++ keyboards/planck/keymaps/circuit/Readme.md | 44 ++++ keyboards/planck/keymaps/circuit/config.h | 91 ++++++++ .../planck/keymaps/circuit/keyboard-layout.png | Bin 0 -> 154368 bytes keyboards/planck/keymaps/circuit/keymap.c | 258 +++++++++++++++++++++ 5 files changed, 418 insertions(+) create mode 100644 keyboards/planck/keymaps/circuit/Makefile create mode 100644 keyboards/planck/keymaps/circuit/Readme.md create mode 100644 keyboards/planck/keymaps/circuit/config.h create mode 100644 keyboards/planck/keymaps/circuit/keyboard-layout.png create mode 100644 keyboards/planck/keymaps/circuit/keymap.c (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/circuit/Makefile b/keyboards/planck/keymaps/circuit/Makefile new file mode 100644 index 000000000..1ed0ff956 --- /dev/null +++ b/keyboards/planck/keymaps/circuit/Makefile @@ -0,0 +1,25 @@ + +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk in +# the appropriate keymap folder that will get included automatically +# +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 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. +TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys + +# 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/circuit/Readme.md b/keyboards/planck/keymaps/circuit/Readme.md new file mode 100644 index 000000000..cbdf5de4e --- /dev/null +++ b/keyboards/planck/keymaps/circuit/Readme.md @@ -0,0 +1,44 @@ +##Design goals: +1. Arrow keys always available. +2. As close to a to my US layout 107-key QWERTY keyboard as I could manage, (i.e. as few arbitrary decisions as possible). +3. Togglable DVORAK keyboard. +4. most frequently used things in the easiest to reach places. +5. Ability to game on it, just for fun. + +My layout differs from most in the placement the ARROW keys, `ESC`, VOL keys, use of double-tap `CAPS`, and the GAME LOCK function. + +I put the layer buttons in the usual spots. I originally wanted only function/symbols layer, but that proved detrimental. I use some timed press actions to save some space, but this has been accounted for, (see GAME LOCK below). I'm not fully satisfied with the current product (see NOTES below), so it may change in the future. + +##Effective layers: +* Default later is obviously your letters and modifiers. +* Lower layer [NUMBER] is your numbers and punctuation. +* Upper layer [ACTION] is your symbols and actions. +* Function layer is the infrequently used function keys, layout toggle, game lock, and reset. + +There is also a toggle for the DVORAK/QWERTY layers, but in normal typing this is not of concern. + +###Special keys: +* `RSHFT` and `ENTER` are combined. Tap once for `ENTER` and hold for `RSHFT`. `ENTER` will be registered on release if released within 200 ms, else `RSHFT` is registered starting at 201 ms until release. +* If for some reason, this interferes with the normal usage of the `ENTER` key in any way, (some problem that may never happen), I have added a regular non-modified `ENTER` key on the same key in the [ACTION] layer. +* `LSHFT` and `CAPS` are also combined. The key works like a normal `LSHFT` unless double-tapped, in which case it counts as `CAPS`. This functionality unfortunately delays all key presses by at most 200 ms, but I have added ways to disable this both temporarily or permanently, described below. +* A failsafe `CAPS` key is on the same key in the [ACTION] layer. +* There are `UNDO`, `CUT`, `COPY`, and `PASTE` keys. This was intended to be a universal way to use these commands since in macOS cut is `⌘ + C` but in Windows it is `⌃ + C`. Unfortunately these special keys only work in Windows. ¯\\\_(ツ)\_/¯ + +##Game lock: +**TL;DR** the game lock toggle disables the double-tap `CAPS`, and disables `GUI` keys (WINDOWS key). + +I wished for this keyboard to be fully usable in the most demanding of games. The most demanding game I know of is ARMA 3 which has a binding to practically every individual key of a 107-key keyboard. This means I need to have pretty much every key possible somewhere. I also wanted the keyboard to be responsive in games for every critical keypress. This means having a way to disable features that introduce an inherent delay to registering keys, such as double-tap. + +I do not expect to see this used by the pros, but I enjoyed making it. As for use in ARMA 3, I got a little ways into the APEX campaign, but I found a few flaws. For Example, I cannot enable my HUD GPS since that requires `RCTRL`+`M` but `RCTRL` is not bound. The obvious fix is to rebind the action to a new key, but I still take this as a shortcoming of my layout. + +###If you wish to disable double-tap +####Disable it temporarily +Turn on the game lock. While on, it registers as normal `LSHFT` and has no delay. Whether in game mode or not, `CAPS` is on the same key in the [ACTION] layer. + +####Disable it permanently +Open the `Makefile` and set `TAP_DANCE_ENABLE = no`. I wrote the layout to compensate for this change, and no further changes to the code should be necessary. Whether or not it's disabled, `CAPS` is on the same key in the [ACTION] layer. + +##Notes: +* `ALT` and `GUI` are reversed compared to the normal US layout. I will also be using my Planck on my mac, and that's the standard in the Apple ecosystem. I may add a special compiler flag in the future to swap the two. +* The DVORAK `Z` key is to the right of the `S` key instead of under it as part of a compromise I made to keep the ARROW keys available on the default layer. I prioritize the ARROW keys, so the DVORAK layout is the one to suffer. +* I also support the little tones that the default Planck layout features, identical to them too, (minus those for layouts I don't support). To enable it, open the `Makefile` and set `AUDIO_ENABLE = yes`. diff --git a/keyboards/planck/keymaps/circuit/config.h b/keyboards/planck/keymaps/circuit/config.h new file mode 100644 index 000000000..22244f4a7 --- /dev/null +++ b/keyboards/planck/keymaps/circuit/config.h @@ -0,0 +1,91 @@ +/* +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" + +/* Tap-dance interval definition */ +#define TAPPING_TERM 200 + +/* 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 + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/circuit/keyboard-layout.png b/keyboards/planck/keymaps/circuit/keyboard-layout.png new file mode 100644 index 000000000..e9296a6d9 Binary files /dev/null and b/keyboards/planck/keymaps/circuit/keyboard-layout.png differ diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c new file mode 100644 index 000000000..5096decb9 --- /dev/null +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -0,0 +1,258 @@ +// Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6 + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif +#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 _DVORAK 1 +#define _LOCKED 2 +#define _NUMBER 3 +#define _ACTION 4 +#define _FUNCTN 5 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + NUMBER, + ACTION +}; + +// Key code names +#define SFT_ENT FUNC(0) // Tap for enter, hold for right shift +#define LOCK FUNC(1) +#define KC_PSTE KC_PASTE +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#ifdef TAP_DANCE_ENABLE +#define SFT_CAP TD(0) // Left shift, double tap for caps +#endif +#ifndef TAP_DANCE_ENABLE +#define SFT_CAP KC_LSFT // Regular left shift +#endif + +// Tap Dance Definitions +#ifdef TAP_DANCE_ENABLE +const qk_tap_dance_action_t tap_dance_actions[] = { + [0] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) +}; +#endif + +// Function definitions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), + [1] = ACTION_LAYER_TOGGLE(_LOCKED) +}; + +// Layout definitions +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------------------------------------------------. + * | Esc | 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 | , | . | Up |SftEnt| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | Alt | Cmd | Vol- | ACTN | Space | NUMS | Vol+ | Left | Down | Left | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {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}, + {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT}, + {KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT} +}, + +/* DVORAK + * ,-----------------------------------------------------------------------------------. + * | | ' | , | . | P | Y | F | G | C | R | L | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | A | O | E | U | I | D | H | T | N | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ; | Q | J | K | X | B | M | W | V | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______}, + {_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_Z }, + {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* LOCK + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | NULL | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOCKED] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* NUMBERS + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ~ | NULL | NULL | NULL | | | _ | + | { | } | ? | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ` | NULL | NULL | NULL | \ | - | = | [ | ] | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | NULL | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMBER] = { + {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + {_______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH}, + {_______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______}, + {_______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______} +}, + +/* ACTIONS + * ,-----------------------------------------------------------------------------------. + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | Undo | Cut | Copy | Paste| NULL | NULL | NULL | NULL | NULL | PgUp | Enter| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | Mute | | NULL | | NULL | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_ACTION] = { + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT }, + {_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END } +}, + +/* FUNCTIONS + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NULL | NULL | NULL | NULL | NULL |QWERTY|DVORAK| NULL | NULL | NULL | NULL | NULL | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Reset| NULL | Lock | NULL | | NULL | | NULL | NULL | NULL | NULL | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTN] = { + {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_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 }, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +} + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + if (IS_LAYER_ON(_DVORAK)) { +#ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); +#endif + layer_off(_DVORAK); + } + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + if (!IS_LAYER_ON(_DVORAK)) { +#ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); +#endif + layer_on(_DVORAK); + } + } + return false; + break; + case NUMBER: + if (record->event.pressed) { + layer_on(_NUMBER); + update_tri_layer(_NUMBER, _ACTION, _FUNCTN); + } else { + layer_off(_NUMBER); + update_tri_layer(_NUMBER, _ACTION, _FUNCTN); + } + return false; + break; + case ACTION: + if (record->event.pressed) { + layer_on(_ACTION); + update_tri_layer(_NUMBER, _ACTION, _FUNCTN); + } else { + layer_off(_ACTION); + update_tri_layer(_NUMBER, _ACTION, _FUNCTN); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { +#ifdef AUDIO_ENABLE + startup_user(); +#endif +} + +#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(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif -- cgit v1.2.3 From 5abb05ca402a3ffbce1d4a0a7e3e4eba1ebc9d1b Mon Sep 17 00:00:00 2001 From: premek Date: Tue, 16 Aug 2016 00:44:58 +0200 Subject: premek split layout --- keyboards/planck/keymaps/premek/Makefile | 25 ++++ keyboards/planck/keymaps/premek/keymap.c | 231 ++++++++++++++++++++++++++++++ keyboards/planck/keymaps/premek/readme.md | 2 + 3 files changed, 258 insertions(+) create mode 100644 keyboards/planck/keymaps/premek/Makefile create mode 100644 keyboards/planck/keymaps/premek/keymap.c create mode 100644 keyboards/planck/keymaps/premek/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/premek/Makefile b/keyboards/planck/keymaps/premek/Makefile new file mode 100644 index 000000000..0f4953888 --- /dev/null +++ b/keyboards/planck/keymaps/premek/Makefile @@ -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 = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = 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. + +# 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/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c new file mode 100644 index 000000000..9b212ab25 --- /dev/null +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -0,0 +1,231 @@ +// 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" + +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 _PLOVER 5 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, + {KC_LGUI, _______, _______, KC_LALT, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI} +}, +[_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, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, +[_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, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, +[_LOWER] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END }, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, +[_RAISE] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, + {_______, _______, _______, KC_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}, + {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float 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 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#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(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/premek/readme.md b/keyboards/planck/keymaps/premek/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/premek/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + -- cgit v1.2.3 From a75d4bd593491ea628a271aaddfc4268a241a68f Mon Sep 17 00:00:00 2001 From: premek Date: Tue, 16 Aug 2016 00:50:35 +0200 Subject: premek split layout --- keyboards/planck/keymaps/premek/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/premek/readme.md b/keyboards/planck/keymaps/premek/readme.md index de9680b49..df6053d6f 100644 --- a/keyboards/planck/keymaps/premek/readme.md +++ b/keyboards/planck/keymaps/premek/readme.md @@ -1,2 +1,3 @@ -# The Default Planck Layout +# Split Layout +Inspired by TECK -- cgit v1.2.3 From 2ebfdcac404e4898110da40c4d2f86394595246d Mon Sep 17 00:00:00 2001 From: Přemek Vyhnal Date: Tue, 16 Aug 2016 01:07:34 +0200 Subject: Update readme.md --- keyboards/planck/keymaps/premek/readme.md | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/premek/readme.md b/keyboards/planck/keymaps/premek/readme.md index df6053d6f..16debdd63 100644 --- a/keyboards/planck/keymaps/premek/readme.md +++ b/keyboards/planck/keymaps/premek/readme.md @@ -1,3 +1,4 @@ # Split Layout Inspired by TECK +[Layout](http://www.keyboard-layout-editor.com/##@_switchMount=cherry&switchBrand=gateron&switchType=KS-3-Tea&pcb:true%3B&@_c=%23e6e6e6&t=%23757575&a:7&fa@:5%3B%3B&=Esc&_a:4&fa@:5&:0&:0&:0&:0&:0&:0&:0&:0&:5%3B%3B&=%0A%0A!%0A1%0A%0A%0A%0A%0A%0AQ&=%0A%0A%2F@%0A2%0A%0A%0A%0A%0A%0AW&=%0A%0A%23%0A3%0A%0A%0A%0A%0A%0AE&=%0A%0A$%0A4%0A%0A%0A%0A%0A%0AR&=%0A%0A%25%0A5%0A%0A%0A%0A%0A%0AT&_c=%23e3b02d&a:7%3B&=Del&_c=%23e6e6e6&a:4%3B&=%0A%0A%5E%0A6%0A%0A%0A%0A%0A%0AY&=%0A%0A%2F&%0A7%0A%0A%0A%0A%0A%0AU&=%0A%0A*%0A8%0A%0A%0A%0A%0A%0AI&=%0A%0A(%0A9%0A%0A%0A%0A%0A%0AO&=%0A%0A)%0A0%0A%0A%0A%0A%0A%0AP%3B&@_a:7%3B&=Shift&_a:4%3B&=%0A%0A%0AF1%0A%0A%0A%0A%0A%0AA&=%0A%0A%0AF2%0A%0A%0A%0A%0A%0AS&=%0A%0A'%0AF3%0A%0A%0A%0A%0A%0AD&_c=%23e3b02d&n:true%3B&=%0A%0A-%0AF4%0A%0A%0A%0A%0A%0AF&_c=%23e6e6e6%3B&=%0A%0A%0AF5%0A%0A%0A%0A%0A%0AG&_c=%23e3b02d&a:7%3B&=Tab&_c=%23e6e6e6&a:4%3B&=%0A%0A%0AF6%0A%0A%0A%0A%0A%0AH&_c=%23e3b02d&n:true%3B&=%0A%0A%2F&larr%2F%3B%0AHom%0A%0A%0A%0A%0A%0AJ&_c=%23e6e6e6%3B&=%0A%0A%2F&darr%2F%3B%0APgD%0A%0A%0A%0A%0A%0AK&=%0A%0A%2F&uarr%2F%3B%0APgU%0A%0A%0A%0A%0A%0AL&=%0A%0A%2F&rarr%2F%3B%0AEnd%0A%0A%0A%0A%0A%0A%2F%3B%3B&@_a:7%3B&=Ctrl&_a:4%3B&=%0A%0A~%0AF7%0A%0A%0A%0A%0A%0AZ&=%0A%0A%60%0AF8%0A%0A%0A%0A%0A%0AX&=%0A%0A+%0AF9%0A%0A%0A%0A%0A%0AC&=%0A%0A%2F=%0AF10%0A%0A%0A%0A%0A%0AV&=%0A%0A%7C%0AF11%0A%0A%0A%0A%0A%0AB&_c=%23e3b02d&a:7%3B&=BSp&_c=%23e6e6e6&a:4%3B&=%0A%0A%5C%0AF12%0A%0A%0A%0A%0A%0AN&=%0A%0A%5B%0A%0A%0A%0A%0A%0A%0AM&=%0A%0A%5D%0A%0A%0A%0A%0A%0A%0A,&=%0A%0A%7B%0A%0A%0A%0A%0A%0A%0A.&=%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%2F%2F%3B&@_a:7%3B&=&=&=&=Alt&_c=%23e3b02d%3B&=%2F&dArr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&crarr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&uArr%2F%3B&_c=%23e6e6e6%3B&=Alt&=&=) -- cgit v1.2.3 From b1ac91a040a464b595b819417fb1a04c5f9d8926 Mon Sep 17 00:00:00 2001 From: Toni Date: Tue, 16 Aug 2016 16:32:42 +0200 Subject: big cleanup and minor refactoring. thanks iFreilicht. --- keyboards/satan/keymaps/iso_split_rshift/Makefile | 27 +++---- keyboards/satan/keymaps/iso_split_rshift/config.h | 7 +- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 53 +++++++++---- keyboards/satan/keymaps/iso_split_rshift/satan.c | 30 ------- keyboards/satan/keymaps/iso_split_rshift/satan.h | 96 ----------------------- keyboards/satan/satan.h | 27 +++++++ 6 files changed, 77 insertions(+), 163 deletions(-) delete mode 100644 keyboards/satan/keymaps/iso_split_rshift/satan.c delete mode 100644 keyboards/satan/keymaps/iso_split_rshift/satan.h (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/Makefile b/keyboards/satan/keymaps/iso_split_rshift/Makefile index e25515b69..9187df44c 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/Makefile +++ b/keyboards/satan/keymaps/iso_split_rshift/Makefile @@ -1,18 +1,15 @@ -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # 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 ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # 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 ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/satan/keymaps/iso_split_rshift/config.h b/keyboards/satan/keymaps/iso_split_rshift/config.h index 39eec4b59..5e79e07f5 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/config.h +++ b/keyboards/satan/keymaps/iso_split_rshift/config.h @@ -20,12 +20,7 @@ along with this program. If not, see . #include "../../config.h" - +// only change #define RGB_DI_PIN B2 -#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 #endif diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index 68cc6755e..f04036d10 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -13,8 +13,29 @@ #define _TAB 2 #define _SFX 3 +// dual-role shortcuts +#define TABDUAL LT(_TAB, KC_TAB) +#define CAPSDUAL CTL_T(KC_ESC) +#define SPACEDUAL LT(_SPC, KC_SPACE) +#define ENTERDUAL CTL_T(KC_ENT) +// arrow cluster duality bottom right corner +#define ARRLEFT ALT_T(KC_LEFT) +#define ARRDOWN GUI_T(KC_DOWN) +#define ARRUP SFT_T(KC_UP) +#define ARRRIGHT CTL_T(KC_RIGHT) +// german brackets +#define GER_CUR_L RALT(KC_7) // [ +#define GER_CUR_R RALT(KC_9) // ] +#define GER_PAR_L LSFT(KC_8) // ( +#define GER_PAR_R LSFT(KC_9) // ) +#define GER_ANG_L KC_NUBS // < +#define GER_ANG_R LSFT(KC_NUBS) // > +#define GER_BRC_L RALT(KC_8) // [ +#define GER_BRC_R RALT(KC_9) // ] + // increase readability #define _______ KC_TRNS +#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer @@ -31,11 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' LEFT DWN RIGHT */ [_DEF] = KEYMAP_ISO_SPLITRSHIFT( - 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, \ - LT(_TAB,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, \ - 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_NUHS, CTL_T(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, TG(_SFX), SFT_T(KC_UP), \ - KC_LCTL, KC_LGUI, KC_LALT, LT(_SPC,KC_SPACE), KC_RALT, ALT_T(KC_LEFT), GUI_T(KC_DOWN), CTL_T(KC_RIGHT)), + 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, \ + TABDUAL, 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, \ + CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TG(_SFX), ARRUP, \ + KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT), /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) * ,-----------------------------------------------------------. @@ -51,11 +72,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_SPC] = KEYMAP_ISO_SPLITRSHIFT( - KC_PSCR, 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_PAUS, KC_UP, RALT(KC_8), RALT(KC_9), _______, _______, LSFT(KC_8), LSFT(KC_9), _______, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ - _______, _______, _______, _______, KC_NUBS, LSFT(KC_NUBS), KC_SPACE,M(0), _______, _______, _______, _______, _______, KC_VOLU, \ - _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), + KC_PSCR, 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_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ + _______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, _______, KC_VOLU, \ + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) * ,-----------------------------------------------------------. @@ -71,11 +92,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_TAB] = KEYMAP_ISO_SPLITRSHIFT( - KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ - _______, _______, _______, _______, _______, _______, _______, RALT(KC_7), RALT(KC_0), _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ - _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) * ,-----------------------------------------------------------. @@ -93,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = KEYMAP_ISO_SPLITRSHIFT( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, KC_NO, KC_ENT, \ + _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, _______, KC_UP, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; diff --git a/keyboards/satan/keymaps/iso_split_rshift/satan.c b/keyboards/satan/keymaps/iso_split_rshift/satan.c deleted file mode 100644 index d2c5d5c20..000000000 --- a/keyboards/satan/keymaps/iso_split_rshift/satan.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "satan.h" -#include "led.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - // * Set our LED pins as output - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #include "../../config.h" // only change +#undef RGB_DI_PIN #define RGB_DI_PIN B2 #endif -- cgit v1.2.3 From 29f64d7a93d941167c6c6e95f893ab84586b2205 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 17 Aug 2016 13:04:50 +0200 Subject: tap-dance: Major rework, to make it more reliable This reworks how the tap-dance feature works: instead of one global state, we have a state for each tap-dance key, so we can cancel them when another tap-dance key is in flight. This fixes #527. Since we have a state for each key, we can avoid situation where a keyup would mess with our global state. This fixes #563. And while here, we also make sure to fire events only once, and this fixes #574. There is one breaking change, though: tap-dance debugging support was removed, because dumping the whole state would increase the firmware size too much. Any keymap that made use of this, will have to be updated (but there's no such keymap in the repo). Also, there's a nice trick used in this rework: we need to iterate through tap_dance_actions in a few places, to check for timeouts, and so on. For this, we'd need to know the size of the array. We can't discover that at compile-time, because tap-dance gets compiled separately. We'd like to avoid having to terminate the list with a sentinel value, because that would require updates to all keymaps that use the feature. So, we keep track of the highest tap-dance code seen so far, and iterate until that index. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/keymap.c | 2 +- keyboards/preonic/keymaps/kinesis/keymap.c | 2 +- quantum/process_keycode/process_tap_dance.c | 121 ++++++++++++++-------------- quantum/process_keycode/process_tap_dance.h | 9 ++- readme.md | 4 +- 5 files changed, 70 insertions(+), 68 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 244bfb51f..144030e2e 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -853,7 +853,7 @@ void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { td_ta->finished_once = false; } -const qk_tap_dance_action_t tap_dance_actions[] = { +qk_tap_dance_action_t tap_dance_actions[] = { [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset) ,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset) ,[CT_TA] = { diff --git a/keyboards/preonic/keymaps/kinesis/keymap.c b/keyboards/preonic/keymaps/kinesis/keymap.c index 1cd6eb993..9691be91d 100644 --- a/keyboards/preonic/keymaps/kinesis/keymap.c +++ b/keyboards/preonic/keymaps/kinesis/keymap.c @@ -123,7 +123,7 @@ void music_scale_user(void) } -const qk_tap_dance_action_t tap_dance_actions[] = { +qk_tap_dance_action_t tap_dance_actions[] = { //Tap once for equal, twice for hyper + X (alfred lock) [TD_EQ_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, HYPR(KC_X)), //Tap once for minus, twice for time.heals.nothing diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index bab5c4dbd..e152f2350 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -1,19 +1,8 @@ #include "quantum.h" #include "action_tapping.h" -static qk_tap_dance_state_t qk_tap_dance_state; -bool td_debug_enable = false; - -#if CONSOLE_ENABLE -#define td_debug(s) if (td_debug_enable) \ - { \ - xprintf ("D:tap_dance:%s:%s = { keycode = %d, count = %d, active = %d, pressed = %d }\n", __FUNCTION__, s, \ - qk_tap_dance_state.keycode, qk_tap_dance_state.count, \ - qk_tap_dance_state.active, qk_tap_dance_state.pressed); \ - } -#else -#define td_debug(s) -#endif +static uint16_t last_td; +static int8_t highest_td = -1; void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; @@ -36,98 +25,110 @@ void qk_tap_dance_pair_reset (qk_tap_dance_state_t *state, void *user_data) { } static inline void _process_tap_dance_action_fn (qk_tap_dance_state_t *state, - void *user_data, - qk_tap_dance_user_fn_t fn) + void *user_data, + qk_tap_dance_user_fn_t fn) { if (fn) { fn(state, user_data); } } -static inline void process_tap_dance_action_on_each_tap (qk_tap_dance_action_t action) +static inline void process_tap_dance_action_on_each_tap (qk_tap_dance_action_t *action) { - td_debug("trigger"); - _process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_each_tap); + _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_each_tap); } -static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_action_t action) +static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_action_t *action) { - td_debug("trigger"); - _process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_dance_finished); + if (action->state.finished) + return; + action->state.finished = true; + _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); } -static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t action) +static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) { - td_debug("trigger") - _process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_reset); + _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { - bool r = true; uint16_t idx = keycode - QK_TAP_DANCE; - qk_tap_dance_action_t action; + qk_tap_dance_action_t *action; + + if (last_td && last_td != keycode) { + (&tap_dance_actions[last_td - QK_TAP_DANCE])->state.interrupted = true; + } switch(keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: - action = tap_dance_actions[idx]; - - process_tap_dance_action_on_each_tap (action); - if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) { - process_tap_dance_action_on_dance_finished (action); - } else if (qk_tap_dance_state.active && qk_tap_dance_state.pressed) { - reset_tap_dance (&qk_tap_dance_state); - } else { - r = false; - } + if ((int16_t)idx > highest_td) + highest_td = idx; + action = &tap_dance_actions[idx]; - qk_tap_dance_state.active = true; - qk_tap_dance_state.pressed = record->event.pressed; + action->state.keycode = keycode; + action->state.pressed = record->event.pressed; if (record->event.pressed) { - qk_tap_dance_state.keycode = keycode; - qk_tap_dance_state.timer = timer_read (); - qk_tap_dance_state.count++; + action->state.count++; + action->state.timer = timer_read(); + + if (last_td && last_td != keycode) { + qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; + paction->state.interrupted = true; + process_tap_dance_action_on_dance_finished (paction); + reset_tap_dance (&paction->state); + } } + last_td = keycode; + break; default: - if (qk_tap_dance_state.keycode) { - // if we are here, the tap dance was interrupted by a different key - idx = qk_tap_dance_state.keycode - QK_TAP_DANCE; - action = tap_dance_actions[idx]; + if (!record->event.pressed) + return true; + + if (highest_td == -1) + return true; - process_tap_dance_action_on_each_tap (action); + for (int i = 0; i <= highest_td; i++) { + action = &tap_dance_actions[i]; + if (action->state.count == 0) + continue; + action->state.interrupted = true; process_tap_dance_action_on_dance_finished (action); - reset_tap_dance (&qk_tap_dance_state); - qk_tap_dance_state.active = false; + reset_tap_dance (&action->state); } break; } - return r; + return true; } void matrix_scan_tap_dance () { - if (qk_tap_dance_state.active && timer_elapsed (qk_tap_dance_state.timer) > TAPPING_TERM) { - // if we are here, the tap dance was timed out - uint16_t idx = qk_tap_dance_state.keycode - QK_TAP_DANCE; - qk_tap_dance_action_t action = tap_dance_actions[idx]; + if (highest_td == -1) + return; + + for (int i = 0; i <= highest_td; i++) { + qk_tap_dance_action_t *action = &tap_dance_actions[i]; - process_tap_dance_action_on_dance_finished (action); - reset_tap_dance (&qk_tap_dance_state); + if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { + process_tap_dance_action_on_dance_finished (action); + reset_tap_dance (&action->state); + } } } void reset_tap_dance (qk_tap_dance_state_t *state) { - uint16_t idx = state->keycode - QK_TAP_DANCE; - qk_tap_dance_action_t action; + qk_tap_dance_action_t *action; if (state->pressed) return; - action = tap_dance_actions[idx]; + action = &tap_dance_actions[state->keycode - QK_TAP_DANCE]; + process_tap_dance_action_on_reset (action); - state->keycode = 0; state->count = 0; - state->active = false; + state->interrupted = false; + state->finished = false; + last_td = 0; } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 6a1258067..d7b857bdc 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -11,8 +11,9 @@ typedef struct uint8_t count; uint16_t keycode; uint16_t timer; - bool active:1; - bool pressed:1; + bool interrupted; + bool pressed; + bool finished; } qk_tap_dance_state_t; #define TD(n) (QK_TAP_DANCE + n) @@ -26,6 +27,7 @@ typedef struct qk_tap_dance_user_fn_t on_dance_finished; qk_tap_dance_user_fn_t on_reset; } fn; + qk_tap_dance_state_t state; void *user_data; } qk_tap_dance_action_t; @@ -48,8 +50,7 @@ typedef struct .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ } -extern const qk_tap_dance_action_t tap_dance_actions[]; -extern bool td_debug_enable; +extern qk_tap_dance_action_t tap_dance_actions[]; /* To be used internally */ diff --git a/readme.md b/readme.md index e2221e749..8c07a5d1f 100644 --- a/readme.md +++ b/readme.md @@ -431,7 +431,7 @@ enum { }; //Tap Dance Definitions -const qk_tap_dance_action_t tap_dance_actions[] = { +qk_tap_dance_action_t tap_dance_actions[] = { //Tap once for Esc, twice for Caps Lock [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) // Other declarations would go here, separated by commas, if you have them @@ -517,7 +517,7 @@ void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { ergodox_right_led_3_off(); } -const qk_tap_dance_action_t tap_dance_actions[] = { +qk_tap_dance_action_t tap_dance_actions[] = { [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT) ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg) -- cgit v1.2.3 From c024de4a879cdab04f0473c29c6e9c4f6f28cbae Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 17 Aug 2016 15:33:14 +0200 Subject: wring keypress for german iso fixed. prettified --- keyboards/satan/keymaps/iso_split_rshift/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index f04036d10..bc5bfe2e6 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -14,18 +14,18 @@ #define _SFX 3 // dual-role shortcuts -#define TABDUAL LT(_TAB, KC_TAB) -#define CAPSDUAL CTL_T(KC_ESC) +#define TABDUAL LT(_TAB, KC_TAB) +#define CAPSDUAL CTL_T(KC_ESC) #define SPACEDUAL LT(_SPC, KC_SPACE) #define ENTERDUAL CTL_T(KC_ENT) // arrow cluster duality bottom right corner -#define ARRLEFT ALT_T(KC_LEFT) -#define ARRDOWN GUI_T(KC_DOWN) -#define ARRUP SFT_T(KC_UP) +#define ARRLEFT ALT_T(KC_LEFT) +#define ARRDOWN GUI_T(KC_DOWN) +#define ARRUP SFT_T(KC_UP) #define ARRRIGHT CTL_T(KC_RIGHT) // german brackets #define GER_CUR_L RALT(KC_7) // [ -#define GER_CUR_R RALT(KC_9) // ] +#define GER_CUR_R RALT(KC_0) // ] #define GER_PAR_L LSFT(KC_8) // ( #define GER_PAR_R LSFT(KC_9) // ) #define GER_ANG_L KC_NUBS // < -- cgit v1.2.3