Merge branch 'qmk:master' into master
This commit is contained in:
@@ -15,14 +15,12 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define VENDOR_ID 0x03A8
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT Planck
|
||||
|
||||
@@ -79,5 +77,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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
|
||||
@@ -108,26 +109,6 @@
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
// #define WS2812_LED_N 2
|
||||
// #define RGBLED_NUM WS2812_LED_N
|
||||
// #define WS2812_TIM_N 2
|
||||
@@ -139,26 +120,74 @@
|
||||
//#define WS2812_EXTERNAL_PULLUP
|
||||
|
||||
#define DRIVER_ADDR_1 0b1010000
|
||||
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
||||
|
||||
#define DRIVER_COUNT 1
|
||||
#define DRIVER_1_LED_TOTAL 47
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
#define DRIVER_LED_TOTAL 47
|
||||
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
|
||||
#define RGB_MATRIX_LED_PROCESS_LIMIT 5
|
||||
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
|
||||
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
#define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
|
||||
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define ENABLE_RGB_MATRIX_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 0
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 400
|
||||
#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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
|
||||
@@ -19,7 +21,7 @@
|
||||
|
||||
keyboard_config_t keyboard_config;
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
@@ -104,16 +106,6 @@ led_config_t g_led_config = { {
|
||||
1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1
|
||||
} };
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_color_all(0, 0, 0);
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Left B9 Right B8 */
|
||||
@@ -257,7 +249,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
planck_ez_left_led_off();
|
||||
planck_ez_right_led_off();
|
||||
state = layer_state_set_user(state);
|
||||
uint8_t layer = biton32(state);
|
||||
uint8_t layer = get_highest_layer(state);
|
||||
switch (layer) {
|
||||
case PLANCK_EZ_LED_LOWER:
|
||||
planck_ez_left_led_on();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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
|
||||
@@ -39,19 +41,22 @@
|
||||
}
|
||||
|
||||
#define LAYOUT_ortho_4x12( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b \
|
||||
) \
|
||||
LAYOUT_planck_1x2uC( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
|
||||
)
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05 }, \
|
||||
{ k10, k11, k12, k13, k14, k15 }, \
|
||||
{ k20, k21, k22, k23, k24, k25 }, \
|
||||
{ k30, k31, k32, k3a, k3b, k36 }, \
|
||||
{ k06, k07, k08, k09, k0a, k0b }, \
|
||||
{ k16, k17, k18, k19, k1a, k1b }, \
|
||||
{ k26, k27, k28, k29, k2a, k2b }, \
|
||||
{ k37, k38, k39, k33, k34, k35 } \
|
||||
}
|
||||
|
||||
#define KEYMAP LAYOUT_ortho_4x12
|
||||
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
|
||||
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -1 +1,19 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "glow.h"
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||
* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ez.h"
|
||||
|
||||
23
keyboards/planck/ez/halconf.h
Normal file
23
keyboards/planck/ez/halconf.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* Copyright 2021 QMK
|
||||
*
|
||||
* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_GPT TRUE
|
||||
#define HAL_USE_DAC TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
@@ -2,11 +2,8 @@
|
||||
"keyboard_name": "Planck EZ",
|
||||
"url": "https://ergodox-ez.com/pages/planck",
|
||||
"maintainer": "jackhumbert",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT_planck_1x2uC": {
|
||||
"key_count": 47,
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 },
|
||||
{ "x": 1, "y": 0 },
|
||||
@@ -58,7 +55,6 @@
|
||||
]
|
||||
},
|
||||
"LAYOUT_ortho_4x12": {
|
||||
"key_count": 48,
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 },
|
||||
{ "x": 1, "y": 0 },
|
||||
|
||||
41
keyboards/planck/ez/mcuconf.h
Normal file
41
keyboards/planck/ez/mcuconf.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2021 QMK
|
||||
*
|
||||
* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
|
||||
// for i2c expander, and ISSI
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
||||
// for indicator LEDs
|
||||
#undef STM32_PWM_USE_TIM3
|
||||
#define STM32_PWM_USE_TIM3 TRUE
|
||||
#undef STM32_PWM_USE_TIM4
|
||||
#define STM32_PWM_USE_TIM4 TRUE
|
||||
|
||||
// for audio
|
||||
#undef STM32_DAC_USE_DAC1_CH1
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#undef STM32_DAC_USE_DAC1_CH2
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#undef STM32_GPT_USE_TIM6
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
#undef STM32_GPT_USE_TIM7
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#undef STM32_GPT_USE_TIM8
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
@@ -4,24 +4,26 @@
|
||||
|
||||
A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting.
|
||||
|
||||
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
|
||||
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert), [Drashna Jael're](https://github.com/drashna)
|
||||
Hardware Supported: Planck EZ
|
||||
Hardware Availability: [ergodox-ez.com](https://ergodox-ez.com/pages/planck)
|
||||
Hardware Availability: [ZSA](https://www.zsa.io/planck/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make planck/ez:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
# Planck EZ Glow
|
||||
make planck/ez:oryx
|
||||
|
||||
For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example:
|
||||
|
||||
make planck/ez/glow:default
|
||||
make planck/ez/glow:oryx
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
## Planck EZ Configuration (from Oryx)
|
||||
|
||||
To enable the features from Oryx (ZSA's Configurator), either compile the the `oryx` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file.
|
||||
|
||||
This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR`, and `LED_LEVEL` keycodes. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. The `LED_LEVEL` cycles through the brightness levels for the front "teeth" LEDs.
|
||||
|
||||
### Indicator LEDs
|
||||
|
||||
The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage)
|
||||
|
||||
@@ -1,32 +1,31 @@
|
||||
# MCU name
|
||||
MCU = STM32F303
|
||||
BOARD = QMK_PROTON_C
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = stm32-dfu
|
||||
|
||||
# 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
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
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 = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Enable N-Key Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = yes # Audio output
|
||||
AUDIO_DRIVER = dac_additive
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = no
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
|
||||
# SERIAL_LINK_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3737
|
||||
|
||||
LAYOUTS = ortho_4x12 planck_mit
|
||||
LAYOUTS_HAS_RGB = no
|
||||
|
||||
RGB_MATRIX_SUPPORTED = yes
|
||||
RGBLIGHT_SUPPORTED = no
|
||||
BAKCLIGHT_SUPPORTED = no
|
||||
|
||||
MOUSE_SHARED_EP = no
|
||||
|
||||
@@ -2,110 +2,106 @@
|
||||
"keyboard_name": "Planck",
|
||||
"url": "https://olkb.com/planck",
|
||||
"maintainer": "jackhumbert",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT_planck_mit": {
|
||||
"key_count": 47,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 2, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
"LAYOUT_planck_1x2uC": {
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 2, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
{ "w": 1, "x": 11, "y": 3 } ]
|
||||
},
|
||||
"LAYOUT_planck_grid": {
|
||||
"key_count": 48,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 1, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 6, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
"LAYOUT_ortho_4x12": {
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 1, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 6, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
{ "w": 1, "x": 11, "y": 3 } ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
# 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)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -221,7 +221,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -251,9 +251,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -282,6 +283,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
39
keyboards/planck/keymaps/adamtabrams/config.h
Normal file
39
keyboards/planck/keymaps/adamtabrams/config.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Copyright (C) 2021 Adam Abrams
|
||||
*
|
||||
* 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 3 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// General Configs
|
||||
#define NO_ACTION_ONESHOT
|
||||
#define FORCE_NKRO
|
||||
#define TAPPING_TOGGLE 3
|
||||
|
||||
// Mouse Configs
|
||||
#define MK_3_SPEED
|
||||
#define MK_MOMENTARY_ACCEL
|
||||
#define MK_C_OFFSET_1 6
|
||||
#define MK_C_OFFSET_UNMOD 16
|
||||
#define MK_C_OFFSET_2 26
|
||||
// for MK_W lower is faster
|
||||
#define MK_W_INTERVAL_UNMOD 80
|
||||
|
||||
// Tap-Hold Configs
|
||||
#define TAPPING_TERM 180
|
||||
#define PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_FORCE_HOLD_PER_KEY
|
||||
279
keyboards/planck/keymaps/adamtabrams/keymap.c
Normal file
279
keyboards/planck/keymaps/adamtabrams/keymap.c
Normal file
@@ -0,0 +1,279 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_SIMPLE,
|
||||
_NUMBER,
|
||||
_ARROWS,
|
||||
_CURSOR,
|
||||
_SYSTEM,
|
||||
_KBOARD,
|
||||
_FMWARE
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
SIMPLE,
|
||||
NORMAL
|
||||
};
|
||||
|
||||
#define ARROWS TT(_ARROWS)
|
||||
#define CURSOR TT(_CURSOR)
|
||||
#define SYSTEM TT(_SYSTEM)
|
||||
#define KBOARD MO(_KBOARD)
|
||||
#define FMWARE MO(_FMWARE)
|
||||
|
||||
#define NUMSPAC LT(_NUMBER, KC_SPC)
|
||||
#define SHFTESC LSFT_T(KC_ESC)
|
||||
#define SFTENTR SFT_T(KC_ENT)
|
||||
|
||||
#define ALT__A ALT_T(KC_A)
|
||||
#define ALTSCLN ALT_T(KC_SCLN)
|
||||
#define ALT__O ALT_T(KC_O)
|
||||
#define GUI__S GUI_T(KC_S)
|
||||
#define GUI__L GUI_T(KC_L)
|
||||
#define GUI__R GUI_T(KC_R)
|
||||
#define GUI__I GUI_T(KC_I)
|
||||
#define SFT__D SFT_T(KC_D)
|
||||
#define SFT__K SFT_T(KC_K)
|
||||
#define SFT__S SFT_T(KC_S)
|
||||
#define SFT__E SFT_T(KC_E)
|
||||
#define CTL__F CTL_T(KC_F)
|
||||
#define CTL__J CTL_T(KC_J)
|
||||
#define CTL__T CTL_T(KC_T)
|
||||
#define CTL__N CTL_T(KC_N)
|
||||
|
||||
#define ALTRGHT A(KC_RGHT)
|
||||
#define ALTLEFT A(KC_LEFT)
|
||||
#define CTLRGHT C(KC_RGHT)
|
||||
#define CTLLEFT C(KC_LEFT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* ## Qwerty
|
||||
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | -_ |
|
||||
| Bsp | A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" |
|
||||
| ! | Z | X | C | V | B | N | M | , | . | / | Enter|
|
||||
| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right|
|
||||
*/
|
||||
|
||||
[_QWERTY] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
|
||||
KC_BSPC, ALT__A, GUI__S, SFT__D, CTL__F, KC_G, KC_H, CTL__J, SFT__K, GUI__L, ALTSCLN, KC_QUOT,
|
||||
KC_EXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* ## Colemak
|
||||
|
||||
| Tab | Q | W | F | P | B | J | L | U | Y | ; | -_ |
|
||||
| Bsp | A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" |
|
||||
| ! | Z | X | C | D | V | K | H | , | . | / | Enter|
|
||||
| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right|
|
||||
*/
|
||||
|
||||
[_COLEMAK] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS,
|
||||
KC_BSPC, ALT__A, GUI__R, SFT__S, CTL__T, KC_G, KC_M, CTL__N, SFT__E, GUI__I, ALT__O, KC_QUOT,
|
||||
KC_EXLM, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, SHFTESC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* ## Simple
|
||||
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp |
|
||||
| Esc | A | S | D | F | G | H | J | K | L | ; | '" |
|
||||
| SHFT | Z | X | C | V | B | N | M | , | . | / |S(Ent)|
|
||||
| CTRL | GUI | ALT |System|Cursor| Spc |N(Spc)|Arrows| Left | Down | Up | Right|
|
||||
*/
|
||||
|
||||
[_SIMPLE] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFTENTR,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, SYSTEM, CURSOR, KC_SPC, NUMSPAC, ARROWS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* ## Number
|
||||
|
||||
| | \| | & | = | + | @ | % | # | * | $ | ^ | |
|
||||
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` |
|
||||
| | | [ | { | ( | ~ | ! | ) | } | ] | \ | |
|
||||
| | | | | | | \\/ | | | | |Normal|
|
||||
*/
|
||||
|
||||
[_NUMBER] = LAYOUT_planck_grid(
|
||||
_______, KC_PIPE, KC_AMPR, KC_EQL, KC_PLUS, KC_AT, KC_PERC, KC_HASH, KC_ASTR, KC_DLR, KC_CIRC, _______,
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
|
||||
_______, XXXXXXX, KC_LBRC, KC_LCBR, KC_LPRN, KC_TILD, KC_EXLM, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL
|
||||
),
|
||||
|
||||
|
||||
/* ## Arrows
|
||||
|
||||
| | |A(->) | | |A(<-) | | P_Up | P_Up |C(->) | | |
|
||||
| | | |P_Down| | | Left | Down | Up |Right |C(<-) | |
|
||||
| | | | |P_Down|A(<-) | | | | | | |
|
||||
| | | | | | | | \\/ | | | |Normal|
|
||||
*/
|
||||
|
||||
[_ARROWS] = LAYOUT_planck_grid(
|
||||
_______, _______, ALTRGHT, _______, _______, ALTLEFT, _______, KC_PGUP, KC_PGUP, CTLRGHT, _______, _______,
|
||||
_______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CTLLEFT, _______,
|
||||
_______, _______, _______, _______, KC_PGDN, ALTLEFT, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL
|
||||
),
|
||||
|
||||
/* ## Cursor
|
||||
|
||||
| | | |Wh_Dn |M_Btn2| | |Wh_Dn |Wh_Dn | | | |
|
||||
| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | |
|
||||
| | | | |Wh_Up | | | | | | | |
|
||||
| | | | | \\/ | | | | | | |Normal|
|
||||
*/
|
||||
|
||||
[_CURSOR] = LAYOUT_planck_grid(
|
||||
_______, _______, _______, KC_WH_D, KC_BTN2, _______, _______, KC_WH_D, KC_WH_D, _______, _______, _______,
|
||||
_______, KC_ACL2, KC_ACL1, KC_WH_U, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______,
|
||||
_______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NORMAL
|
||||
),
|
||||
|
||||
/* ## System
|
||||
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
| | |Pr_Scn|Pr_Scn| | |Brght-| Vol- | Vol+ |Brght+| Mute | |
|
||||
| | | | | | | | Mute |P_Trac|N_Trac| | Play |
|
||||
|KBoard| | | \\/ | | | | |Simple|Qwerty|Colemk|Normal|
|
||||
*/
|
||||
|
||||
[_SYSTEM] = LAYOUT_planck_grid(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, XXXXXXX, KC_PSCR, KC_PSCR, XXXXXXX, XXXXXXX, KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, KC_MUTE, _______,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_MPRV, KC_MNXT, XXXXXXX, KC_MPLY,
|
||||
KBOARD, _______, _______, _______, _______, _______, _______, _______, SIMPLE, QWERTY, COLEMAK, NORMAL
|
||||
),
|
||||
|
||||
/* ## KBoard
|
||||
|
||||
|------| | | | | | | | | | | |
|
||||
| | | | | | | Hue- | Sat- | Sat+ | Hue+ |Mode+ | |
|
||||
| | | | | | | |Mode- |Brght-|Brght+| |RGB_Tg|
|
||||
| \\/ | | | \\/ | | | | | | | |FMWare|
|
||||
*/
|
||||
|
||||
[_KBOARD] = LAYOUT_planck_grid(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_VAD, RGB_VAI, XXXXXXX, RGB_TOG,
|
||||
_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, FMWARE
|
||||
),
|
||||
|
||||
/* ## FMWare
|
||||
|
||||
| | | |EEPROM|Reset | | | | | | | |
|
||||
| | |Reset |Debug | | | | | | | | |
|
||||
|------| | | | | | | | | | | |
|
||||
| \\/ | | | \\/ | | | | | | | | \\/ |
|
||||
*/
|
||||
|
||||
[_FMWARE] = LAYOUT_planck_grid(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
return true;
|
||||
|
||||
case COLEMAK:
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
return true;
|
||||
|
||||
case SIMPLE:
|
||||
set_single_persistent_default_layer(_SIMPLE);
|
||||
return true;
|
||||
|
||||
case NORMAL:
|
||||
layer_clear();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SHFTESC:
|
||||
case NUMSPAC:
|
||||
case SFTENTR:
|
||||
case ALT__A:
|
||||
case ALTSCLN:
|
||||
case ALT__O:
|
||||
case GUI__S:
|
||||
case GUI__L:
|
||||
case GUI__R:
|
||||
case GUI__I:
|
||||
case SFT__D:
|
||||
case SFT__K:
|
||||
case SFT__S:
|
||||
case SFT__E:
|
||||
case CTL__F:
|
||||
case CTL__J:
|
||||
case CTL__T:
|
||||
case CTL__N:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case ALT__A:
|
||||
case ALTSCLN:
|
||||
case ALT__O:
|
||||
case GUI__S:
|
||||
case GUI__L:
|
||||
case GUI__R:
|
||||
case GUI__I:
|
||||
case SFT__D:
|
||||
case SFT__K:
|
||||
case SFT__S:
|
||||
case SFT__E:
|
||||
case CTL__F:
|
||||
case CTL__J:
|
||||
case CTL__T:
|
||||
case CTL__N:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
89
keyboards/planck/keymaps/adamtabrams/readme.md
Normal file
89
keyboards/planck/keymaps/adamtabrams/readme.md
Normal file
@@ -0,0 +1,89 @@
|
||||
## Normal - Qwerty
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | -_ |
|
||||
| Bsp | A(A) | G(S) | S(D) | C(F) | G | H | C(J) | S(K) | G(L) | A(;) | '" |
|
||||
| ! | Z | X | C | V | B | N | M | , | . | / | Enter|
|
||||
| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right|
|
||||
|
||||
- The `N` in `N(Spc)` stands for Number layer
|
||||
- Hold down a layer key to temporarily activate or tap twice to toggle on or off
|
||||
|
||||
## Normal - Colemak
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| Tab | Q | W | F | P | B | J | L | U | Y | ; | -_ |
|
||||
| Bsp | A(A) | G(R) | S(S) | C(T) | G | M | C(N) | S(E) | G(I) | A(O) | '" |
|
||||
| ! | Z | X | C | D | V | K | H | , | . | / | Enter|
|
||||
| CTRL | GUI | ALT |System|Cursor|S(Esc)|N(Spc)|Arrows| Left | Down | Up | Right|
|
||||
|
||||
- The `N` in `N(Spc)` stands for Number layer
|
||||
- Hold down a layer key to temporarily activate or tap twice to toggle on or off
|
||||
|
||||
## Normal - Simple
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bsp |
|
||||
| Esc | A | S | D | F | G | H | J | K | L | ; | '" |
|
||||
| SHFT | Z | X | C | V | B | N | M | , | . | / |S(Ent)|
|
||||
| CTRL | GUI | ALT |System|Cursor| Spc |N(Spc)|Arrows| Left | Down | Up | Right|
|
||||
|
||||
- The `N` in `N(Spc)` stands for Number layer
|
||||
- Hold down a layer key to temporarily activate or tap twice to toggle on or off
|
||||
|
||||
## Number
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| | \| | & | = | + | @ | % | # | * | $ | ^ | |
|
||||
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \` |
|
||||
| | | [ | { | ( | ~ | ! | ) | } | ] | \ | |
|
||||
| | | | | | | \\/ | | | | |Normal|
|
||||
|
||||
## Arrows
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| | |A(->) | | |A(<-) | | P_Up | P_Up |C(->) | | |
|
||||
| | | |P_Down| | | Left | Down | Up |Right |C(<-) | |
|
||||
| | | | |P_Down|A(<-) | | | | | | |
|
||||
| | | | | | | | \\/ | | | |Normal|
|
||||
|
||||
## Cursor
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| | | |Wh_Dn |M_Btn2| | |Wh_Dn |Wh_Dn | | | |
|
||||
| |M_Acc2|M_Acc1|Wh_Up |M_Btn1| | M_L |M_Down| M_Up | M_R | | |
|
||||
| | | | |Wh_Up | | | | | | | |
|
||||
| | | | | \\/ | | | | | | |Normal|
|
||||
|
||||
## System
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
| | |Pr_Scn|Pr_Scn| | |Brght-| Vol- | Vol+ |Brght+| Mute | |
|
||||
| | | | | | | | Mute |P_Trac|N_Trac| | Play |
|
||||
|KBoard| | | \\/ | | | | |Simple|Qwerty|Colemk|Normal|
|
||||
|
||||
## KBoard
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
|------| | | | | | | | | | | |
|
||||
| | | | | | | Hue- | Sat- | Sat+ | Hue+ |Mode+ | |
|
||||
| | | | | | | |Mode- |Brght-|Brght+| |RGB_Tg|
|
||||
| \\/ | | | \\/ | | | | | | | |FMWare|
|
||||
|
||||
## FMWare
|
||||
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|
||||
| | | |EEPROM|Reset | | | | | | | |
|
||||
| | |Reset |Debug | | | | | | | | |
|
||||
|------| | | | | | | | | | | |
|
||||
| \\/ | | | \\/ | | | | | | | | \\/ |
|
||||
13
keyboards/planck/keymaps/adamtabrams/rules.mk
Normal file
13
keyboards/planck/keymaps/adamtabrams/rules.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
SRC += muse.c
|
||||
LTO_ENABLE = yes
|
||||
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
COMMAND_ENABLE = no
|
||||
AUDIO_ENABLE = no
|
||||
ENCODER_ENABLE = no
|
||||
DIP_SWITCH_ENABLE = no
|
||||
@@ -1,5 +1,5 @@
|
||||
# AJP10304 Custom Planck Layout
|
||||
# Also available for the Shark, JJ40 and Atreus50
|
||||
# Also available for the Shark, Quark, JJ40 and Atreus50
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
@@ -7,9 +7,7 @@ the second is the output when shift is applied.
|
||||
**Note:** The below tables assume a UK layout.
|
||||
|
||||
#### Flashing
|
||||
Rev <=5: `make planck:ajp10304:flash`
|
||||
|
||||
Rev 6: `make planck/rev6:ajp10304:flash`
|
||||
Refer to the README.md of the keyboard you want to flash.
|
||||
|
||||
##### Main Qwerty Layer
|
||||
|
||||
@@ -24,6 +22,15 @@ Rev 6: `make planck/rev6:ajp10304:flash`
|
||||
| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft |
|
||||
| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||
|
||||
##### Main Colemak-DHm Layer
|
||||
|
||||
| | | | | | | | | | | | |
|
||||
| ---- |:----:| :---:|:---:|:-----:|:----:|:-----:|:-----:|:-----:|:----:|:----:| ----:|
|
||||
| Esc | Q | W | F | P | B | J | L | U | Y | ;: | Bksp |
|
||||
| Tab | A | R | S | T | G | M | N | E | I | O | Enter|
|
||||
| Shft | Z | X | C | D | V | K | H | ,< | .> | /? | Shft |
|
||||
| Fn | Ctrl | Alt | GUI | Lower | Bksp | Space | Raise | Shift | MENU | Ctrl | Fn2 |
|
||||
|
||||
##### Function Layer
|
||||
Activated when `fn` held in the above `qwerty` layer.
|
||||
|
||||
@@ -75,12 +82,12 @@ To finish the recording, press STOP. To replay the macro, press either PLAY1 or
|
||||
* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
|
||||
MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively.
|
||||
|
||||
| | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
|
||||
| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | |
|
||||
| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | |
|
||||
| | | | | | | | | DYN | | | |
|
||||
| | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|:-------:|
|
||||
| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del |
|
||||
| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | Qwerty |
|
||||
| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | Colemak |
|
||||
| | | | | | | | | DYN | | | |
|
||||
|
||||
##### Function 2 Layer
|
||||
Activated when `fn` held in the above `qwerty` layer.
|
||||
@@ -103,7 +110,7 @@ Activated when `fn` and `raise` held together.
|
||||
|
||||
| | | | | | | | | | | | |
|
||||
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| ESC | | | | | | | | BTN3 | | | |
|
||||
| ESC | | | | | | W_L | W_UP | BTN3 | W_DWN| W_R | |
|
||||
| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | |
|
||||
| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | |
|
||||
| | | | | | | | | | | | |
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
|
||||
BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # console for debug(+400)
|
||||
|
||||
@@ -171,7 +171,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC ,
|
||||
KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE ,
|
||||
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT ,
|
||||
_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
/* Raise
|
||||
@@ -151,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC ,
|
||||
KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
|
||||
_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
@@ -216,7 +216,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
5
keyboards/planck/keymaps/ariccb/.vscode/settings.json
vendored
Normal file
5
keyboards/planck/keymaps/ariccb/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"select_word.h": "c"
|
||||
}
|
||||
}
|
||||
56
keyboards/planck/keymaps/ariccb/config.h
Normal file
56
keyboards/planck/keymaps/ariccb/config.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Copyright 2015-2021 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) }
|
||||
#endif
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
#define MIDI_BASIC
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
#define TAPPING_TERM 150
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
// #define IGNORE_MOD_TAP_INTERRUPT
|
||||
// #define HOLD_ON_OTHER_KEY_PRESS
|
||||
|
||||
#define COMBO_TERM 20
|
||||
|
||||
|
||||
|
||||
#define MOUSEKEY_INTERVAL 16 //Time between cursor movements in milliseconds.
|
||||
//If the refresh rate of your display is 60Hz, you could set it to 16 (1/60). As this raises the cursor speed significantly, you may want to lower MOUSEKEY_MAX_SPEED
|
||||
#define MOUSEKEY_MAX_SPEED 8 //Maximum cursor speed at which acceleration stops
|
||||
#define MOUSEKEY_TIME_TO_MAX 50 //Time until maximum scroll speed is reached
|
||||
#define MOUSEKEY_DELAY 100 //Delay between pressing a movement key and cursor movement
|
||||
#define MOUSEKEY_MOVE_DELTA 8 //Step size
|
||||
122
keyboards/planck/keymaps/ariccb/features/caps_word.c
Normal file
122
keyboards/planck/keymaps/ariccb/features/caps_word.c
Normal file
@@ -0,0 +1,122 @@
|
||||
// Copyright 2021-2022 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
// For full documentation, see
|
||||
// https://getreuer.info/posts/keyboards/caps-word
|
||||
|
||||
#include "caps_word.h"
|
||||
|
||||
static bool caps_word_active = false;
|
||||
|
||||
bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
const uint8_t mods = get_mods() | get_oneshot_mods();
|
||||
#else
|
||||
const uint8_t mods = get_mods();
|
||||
#endif // NO_ACTION_ONESHOT
|
||||
|
||||
if (!caps_word_active) {
|
||||
// Pressing both shift keys at the same time enables caps word.
|
||||
if ((mods & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) {
|
||||
caps_word_set(true); // Activate Caps Word.
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!record->event.pressed) { return true; }
|
||||
|
||||
if (!(mods & ~MOD_MASK_SHIFT)) {
|
||||
switch (keycode) {
|
||||
// Ignore MO, TO, TG, TT, and OSL layer switch keys.
|
||||
case QK_MOMENTARY ... QK_MOMENTARY + 255:
|
||||
case QK_TO ... QK_TO + 255:
|
||||
case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER + 255:
|
||||
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE + 255:
|
||||
case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER + 255:
|
||||
return true;
|
||||
|
||||
#ifndef NO_ACTION_TAPPING
|
||||
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
|
||||
if (record->tap.count == 0) {
|
||||
// Deactivate if a mod becomes active through holding a mod-tap key.
|
||||
caps_word_set(false);
|
||||
return true;
|
||||
}
|
||||
keycode &= 0xff;
|
||||
break;
|
||||
|
||||
#ifndef NO_ACTION_LAYER
|
||||
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
||||
#endif // NO_ACTION_LAYER
|
||||
if (record->tap.count == 0) { return true; }
|
||||
keycode &= 0xff;
|
||||
break;
|
||||
#endif // NO_ACTION_TAPPING
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
|
||||
if (keycode > 0x56F0 || record->tap.count == 0) { return true; }
|
||||
keycode &= 0xff;
|
||||
break;
|
||||
#endif // SWAP_HANDS_ENABLE
|
||||
}
|
||||
|
||||
if (caps_word_press_user(keycode)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
caps_word_set(false); // Deactivate Caps Word.
|
||||
return true;
|
||||
}
|
||||
|
||||
void caps_word_set(bool active) {
|
||||
if (active != caps_word_active) {
|
||||
if (active) {
|
||||
clear_mods();
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
clear_oneshot_mods();
|
||||
#endif // NO_ACTION_ONESHOT
|
||||
}
|
||||
|
||||
caps_word_active = active;
|
||||
caps_word_set_user(active);
|
||||
}
|
||||
}
|
||||
|
||||
bool caps_word_get(void) { return caps_word_active; }
|
||||
|
||||
__attribute__((weak)) void caps_word_set_user(bool active) {}
|
||||
|
||||
__attribute__((weak)) bool caps_word_press_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
// Keycodes that continue Caps Word, with shift applied.
|
||||
case KC_A ... KC_Z:
|
||||
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key.
|
||||
return true;
|
||||
|
||||
// Keycodes that continue Caps Word, without shifting.
|
||||
case KC_1 ... KC_0:
|
||||
case KC_P1 ... KC_P0:
|
||||
case KC_BSPC:
|
||||
case KC_MINS:
|
||||
case KC_UNDS:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false; // Deactivate Caps Word.
|
||||
}
|
||||
}
|
||||
101
keyboards/planck/keymaps/ariccb/features/caps_word.h
Normal file
101
keyboards/planck/keymaps/ariccb/features/caps_word.h
Normal file
@@ -0,0 +1,101 @@
|
||||
// Copyright 2021-2022 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
// Caps Word, activated by pressing both shift keys at the same time.
|
||||
//
|
||||
// This library implements "Caps Word", which is like conventional Caps Lock,
|
||||
// but automatically disables itself at the end of the word. This is useful for
|
||||
// typing all-caps identifiers like `MOD_MASK_ALT`.
|
||||
//
|
||||
// Caps Word is activated by pressing the left and right shift keys at the same
|
||||
// time. This way you don't need a dedicated key for using Caps Word. I've
|
||||
// tested that this works as expected with one-shot mods and Space Cadet Shift.
|
||||
// If your shift keys are mod-taps, activate Caps Word by holding both shift
|
||||
// mod-tap keys until the tapping term, release them, then begin typing.
|
||||
//
|
||||
// For full documentation, see
|
||||
// https://getreuer.info/posts/keyboards/caps-word
|
||||
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Call this function from `process_record_user()` to implement Caps Word.
|
||||
bool process_caps_word(uint16_t keycode, keyrecord_t* record);
|
||||
|
||||
// Activates or deactivates Caps Word. For instance activate Caps Word with a
|
||||
// combo by defining a `COMBO_ACTION` that calls `caps_word_set(true)`:
|
||||
//
|
||||
// void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
// switch(combo_index) {
|
||||
// case CAPS_COMBO:
|
||||
// if (pressed) {
|
||||
// caps_word_set(true); // Activate Caps Word.
|
||||
// }
|
||||
// break;
|
||||
//
|
||||
// // Other combos...
|
||||
// }
|
||||
// }
|
||||
void caps_word_set(bool active);
|
||||
|
||||
// Returns whether Caps Word is currently active.
|
||||
bool caps_word_get(void);
|
||||
|
||||
// An optional callback that gets called when Caps Word turns on or off. This is
|
||||
// useful to represent the current Caps Word state, e.g. by setting an LED or
|
||||
// playing a sound. In your keymap, define
|
||||
//
|
||||
// void caps_word_set_user(bool active) {
|
||||
// if (active) {
|
||||
// // Do something when Caps Word activates.
|
||||
// } else {
|
||||
// // Do something when Caps Word deactivates.
|
||||
// }
|
||||
// }
|
||||
void caps_word_set_user(bool active);
|
||||
|
||||
// An optional callback which is called on every key press while Caps Word is
|
||||
// active. When the key should be shifted (that is, a letter key), the callback
|
||||
// should call `add_weak_mods(MOD_BIT(KC_LSFT))` to shift the key. The callback
|
||||
// also determines whether the key should continue Caps Word. Returning true
|
||||
// continues the current "word", while returning false is "word breaking" and
|
||||
// deactivates Caps Word. The default callback is
|
||||
//
|
||||
// bool caps_word_press_user(uint16_t keycode) {
|
||||
// switch (keycode) {
|
||||
// // Keycodes that continue Caps Word, with shift applied.
|
||||
// case KC_A ... KC_Z:
|
||||
// add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key.
|
||||
// return true;
|
||||
//
|
||||
// // Keycodes that continue Caps Word, without shifting.
|
||||
// case KC_1 ... KC_0:
|
||||
// case KC_BSPC:
|
||||
// case KC_MINS:
|
||||
// case KC_UNDS:
|
||||
// return true;
|
||||
//
|
||||
// default:
|
||||
// return false; // Deactivate Caps Word.
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// To customize, copy the above function into your keymap and add/remove
|
||||
// keycodes to the above cases.
|
||||
//
|
||||
// NOTE: Outside of this callback, you can use `caps_word_set(false)` to
|
||||
// deactivate Caps Word.
|
||||
bool caps_word_press_user(uint16_t keycode);
|
||||
110
keyboards/planck/keymaps/ariccb/features/select_word.c
Normal file
110
keyboards/planck/keymaps/ariccb/features/select_word.c
Normal file
@@ -0,0 +1,110 @@
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
// For full documentation, see
|
||||
// https://getreuer.info/posts/keyboards/select-word
|
||||
|
||||
#include "select_word.h"
|
||||
|
||||
// Mac users, uncomment this line:
|
||||
// #define MAC_HOTKEYS
|
||||
|
||||
enum { STATE_NONE, STATE_SELECTED, STATE_WORD, STATE_FIRST_LINE, STATE_LINE };
|
||||
|
||||
bool process_select_word(uint16_t keycode, keyrecord_t* record,
|
||||
uint16_t sel_keycode) {
|
||||
static uint8_t state = STATE_NONE;
|
||||
|
||||
if (keycode == KC_LSFT || keycode == KC_RSFT) { return true; }
|
||||
|
||||
if (keycode == sel_keycode && record->event.pressed) { // On key press.
|
||||
const uint8_t mods = get_mods();
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
const uint8_t all_mods = mods | get_oneshot_mods();
|
||||
#else
|
||||
const uint8_t all_mods = mods;
|
||||
#endif // NO_ACTION_ONESHOT
|
||||
if ((all_mods & MOD_MASK_SHIFT) == 0) { // Select word.
|
||||
#ifdef MAC_HOTKEYS
|
||||
register_code(KC_LALT);
|
||||
#else
|
||||
register_code(KC_LCTL);
|
||||
#endif // MAC_HOTKEYS
|
||||
if (state == STATE_NONE) {
|
||||
tap_code(KC_RGHT);
|
||||
tap_code(KC_LEFT);
|
||||
}
|
||||
register_code(KC_LSFT);
|
||||
register_code(KC_RGHT);
|
||||
state = STATE_WORD;
|
||||
} else { // Select line.
|
||||
if (state == STATE_NONE) {
|
||||
clear_mods();
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
clear_oneshot_mods();
|
||||
#endif // NO_ACTION_ONESHOT
|
||||
#ifdef MAC_HOTKEYS
|
||||
register_code16(LCTL(KC_A));
|
||||
tap_code16(LSFT(KC_E));
|
||||
unregister_code16(LCTL(KC_A));
|
||||
#else
|
||||
tap_code(KC_HOME);
|
||||
tap_code16(LSFT(KC_END));
|
||||
#endif // MAC_HOTKEYS
|
||||
set_mods(mods);
|
||||
state = STATE_FIRST_LINE;
|
||||
} else {
|
||||
register_code(KC_DOWN);
|
||||
state = STATE_LINE;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// `sel_keycode` was released, or another key was pressed.
|
||||
switch (state) {
|
||||
case STATE_WORD:
|
||||
unregister_code(KC_RGHT);
|
||||
unregister_code(KC_LSFT);
|
||||
#ifdef MAC_HOTKEYS
|
||||
unregister_code(KC_LALT);
|
||||
#else
|
||||
unregister_code(KC_LCTL);
|
||||
#endif // MAC_HOTKEYS
|
||||
state = STATE_SELECTED;
|
||||
break;
|
||||
|
||||
case STATE_FIRST_LINE:
|
||||
state = STATE_SELECTED;
|
||||
break;
|
||||
|
||||
case STATE_LINE:
|
||||
unregister_code(KC_DOWN);
|
||||
state = STATE_SELECTED;
|
||||
break;
|
||||
|
||||
case STATE_SELECTED:
|
||||
if (keycode == KC_ESC) {
|
||||
tap_code(KC_RGHT);
|
||||
state = STATE_NONE;
|
||||
return false;
|
||||
}
|
||||
// Fallthrough.
|
||||
default:
|
||||
state = STATE_NONE;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
37
keyboards/planck/keymaps/ariccb/features/select_word.h
Normal file
37
keyboards/planck/keymaps/ariccb/features/select_word.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
// Select word/line button.
|
||||
//
|
||||
// Implements a button that selects the current word, assuming conventional text
|
||||
// editor hotkeys. Pressing it again extends the selection to the following
|
||||
// word. The effect is similar to word selection (W) in the Kakoune editor.
|
||||
//
|
||||
// Pressing the button with shift selects the current line, and pressing the
|
||||
// button again extends the selection to the following line.
|
||||
//
|
||||
// Note for Mac users: Windows/Linux editing hotkeys are assumed by default.
|
||||
// Uncomment the `#define MAC_HOTKEYS` line in select_word.c for Mac hotkeys.
|
||||
// The Mac implementation is untested, let me know if it has problems.
|
||||
//
|
||||
// For full documentation, see
|
||||
// https://getreuer.info/posts/keyboards/select-word
|
||||
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
bool process_select_word(uint16_t keycode, keyrecord_t* record,
|
||||
uint16_t sel_keycode);
|
||||
664
keyboards/planck/keymaps/ariccb/keymap.c
Normal file
664
keyboards/planck/keymaps/ariccb/keymap.c
Normal file
@@ -0,0 +1,664 @@
|
||||
/* Copyright 2021 Aric Crosson Bouwers
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
#include "features/select_word.h"
|
||||
#include "features/caps_word.h"
|
||||
|
||||
// using the Word Selection QMK Macro by Pascal Getreuer, found here: https://getreuer.info/posts/keyboards/select-word/index.html
|
||||
// THANKS Pascal for such amazing functionality!!
|
||||
|
||||
// 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_VCP 1
|
||||
#define _LOWER 2
|
||||
#define _RAISE 3
|
||||
#define _NUMPAD 4
|
||||
#define _FN 5
|
||||
#define _ADJUST 6
|
||||
#define _GAMING 7
|
||||
|
||||
#define MICMUTE LALT(KC_M)
|
||||
#define DESKTR LGUI(LCTL(KC_RGHT)) // move one virtual desktop to the right
|
||||
#define DESKTL LGUI(LCTL(KC_LEFT)) // move one virtual desktop to the left
|
||||
#define MTLCTL_F9 MT(MOD_LCTL, KC_F9)
|
||||
#define MTLSFT_F10 MT(MOD_LSFT, KC_F10)
|
||||
#define MTLALT_F11 MT(MOD_LALT, KC_F11)
|
||||
#define MTLGUI_Z MT(MOD_LGUI, KC_Z)
|
||||
#define MTLALT_PL MT(MOD_LALT, KC_MPLY)
|
||||
#define MTLALT_NXT MT(MOD_LALT, KC_MNXT)
|
||||
#define MTENTER MT(MOD_LCTL, KC_ENT)
|
||||
#define MTRSFTBSLS MT(MOD_RSFT, KC_BSLS)
|
||||
#define MTRCTLQUO MT(MOD_RCTL, KC_QUOT)
|
||||
#define MTTAB MT(MOD_LCTL | MOD_LGUI | MOD_LALT, KC_TAB)
|
||||
#define LTESC LT(_FN, KC_ESC)
|
||||
#define MTPLAY MT(MOD_RALT, KC_MPLY)
|
||||
#define KC_COPY LCTL(KC_C)
|
||||
#define KC_CUT LCTL(KC_X)
|
||||
#define KC_PASTE LCTL(KC_V)
|
||||
#define KC_WINPASTE LGUI(KC_V)
|
||||
#define KC_PTXT LCTL(LSFT(KC_V))
|
||||
#define KC_UNDO LCTL(KC_Z)
|
||||
#define KC_REDO LCTL(KC_Y)
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK_VCP,
|
||||
LOWER,
|
||||
RAISE,
|
||||
FN,
|
||||
ADJUST,
|
||||
NUMPAD,
|
||||
GAMING,
|
||||
EXT_NUM,
|
||||
EXT_GAMING,
|
||||
SELWORD,
|
||||
BRACES,
|
||||
BRACES2,
|
||||
ARROW,
|
||||
ALT_TAB
|
||||
};
|
||||
|
||||
// Define a type for as many tap dance states as you need
|
||||
typedef enum {
|
||||
TD_NONE,
|
||||
TD_UNKNOWN,
|
||||
TD_SINGLE_TAP,
|
||||
TD_SINGLE_HOLD,
|
||||
TD_DOUBLE_TAP
|
||||
} td_state_t;
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
td_state_t state;
|
||||
} td_tap_t;
|
||||
|
||||
// Our custom tap dance keys; add any other tap dance keys to this enum
|
||||
enum {
|
||||
UNDS_LOWER,
|
||||
PLAY_RAISE
|
||||
};
|
||||
|
||||
// Declare the functions to be used with your tap dance key(s)
|
||||
// Function associated with all tap dances
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state);
|
||||
|
||||
// Functions associated with individual tap dances
|
||||
void usl_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
void usl_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||
|
||||
/* ----------------------------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
// This is a completely modified layout that stikes a balance between muscle memory for keys, where I was coming from a standard
|
||||
// Qwerty keyboard, and efficiency gained by using layers. I've switched tab and esc because it's more natural to me this way, and
|
||||
// added layer switch on hold functionality for each key. Enter has moved to the key beside LOWER, to allow usage while still having
|
||||
// the right hand on the mouse.
|
||||
|
||||
// Lower incorporates a numpad on the right side, and all of the symbols included on the left. There is logic for the symbols needed for
|
||||
// calculators and math are located around the numpad, and coding symbols are placed in easy to remember spots.
|
||||
|
||||
// CAPS has moved to the Fn layer, and a few additional shortcut modifiers like CTRL_ALT_UP and DOWN for adding additional cursors in VSCode.
|
||||
// Play/Pause has a prime spot on the base layer, and the Fn version skips to next track
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* MIT Layout (QWERTY)
|
||||
*
|
||||
* ,------------------------------------------------------------------------.
|
||||
* |FN,Esc| q | w | e | r | t | y | u | i | o | p |Bsp |
|
||||
* |------------------------------------------------------------------------|
|
||||
|CSW,Tab| a | s | d | f | g | h | j | k | l | ; |Ctl,'|
|
||||
* |------------------------------------------------------------------------|
|
||||
* |Shift |Win,z| x | c | v | b | n | m | , | . | / |Sft,\|
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | |Ctl,Ent|LOWER| Space |RAISE|Alt,Play| | | |
|
||||
* `------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_planck_grid( /* QWERTY */
|
||||
LTESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
MTTAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MTRCTLQUO,
|
||||
KC_LSFT, MTLGUI_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MTRSFTBSLS,
|
||||
KC_NO, KC_NO, KC_NO, MTENTER, TD(UNDS_LOWER), KC_SPC, KC_SPC, MO(3), MTLALT_PL, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
/* MIT Layout (COLEMAK_VCP)
|
||||
*
|
||||
* ,------------------------------------------------------------------------.
|
||||
* |FN,ESC| q | w | f | d | b | j | l | u | y | ; | Bsp |
|
||||
* |------------------------------------------------------------------------|
|
||||
|CSW,Tab| a | r | s | t | g | m | n | e | i | o |Ctl,'|
|
||||
* |------------------------------------------------------------------------|
|
||||
* |Shift |Win,z| x | v | c | p | k | h | , | . | / |Sft,\|
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | |Ctl,Ent|LWR,_| Space |RAISE|Alt,Play| | | |
|
||||
* `------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK_VCP] = LAYOUT_planck_grid( /* COLEMAK_VCP */
|
||||
LTESC, KC_Q, KC_W, KC_F, KC_D, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||
MTTAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, MTRCTLQUO,
|
||||
KC_LSFT, MTLGUI_Z, KC_X, KC_V, KC_C, KC_P, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, MTRSFTBSLS,
|
||||
KC_NO, KC_NO, KC_NO, MTENTER, TD(UNDS_LOWER), KC_SPC, KC_SPC, MO(3), MTLALT_PL, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
/* MIT Layout (RAISE)
|
||||
*
|
||||
* ,----------------------------------------------------------------------------.
|
||||
* | ~ | ! | | | | | | Cut | Undo| Redo|P2TXT| Bsp |
|
||||
* |----------------------------------------------------------------------------|
|
||||
* | |Menu | | | | |ARROW |SELWORD|Copy|Paste|WinPst| " |
|
||||
* |----------------------------------------------------------------------------|
|
||||
* | |Vol+ |Vol- | Mute| | |Braces|Braces2| < | > | ? | ! |
|
||||
* |----------------------------------------------------------------------------|
|
||||
* | | | | |Adjust| | | | | | |
|
||||
* `----------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_planck_grid( /* RAISE */
|
||||
KC_TILD, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CUT, KC_UNDO, KC_REDO, KC_PTXT, KC_BSPC,
|
||||
KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ARROW, SELWORD, KC_COPY, KC_PASTE, KC_WINPASTE, KC_DQUO,
|
||||
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, BRACES, BRACES2, KC_LABK, KC_RABK, KC_QUES, KC_EXLM,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
/* MIT Layout (LOWER)
|
||||
* XZ
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ` | ! | # | $ | < | > | : | 7 | 8 | 9 | = | Bsp |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | ' | _ | ^ | % | ( | ) | M | 4 | 5 | 6 | - | + |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| | | & | " | { | } | @ | 1 | 2 | 3 | / | * |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | |MO(6),0| . | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_planck_grid( /* LOWER */
|
||||
KC_GRV, KC_EXLM, KC_HASH, KC_DLR, KC_LABK, KC_RABK, KC_COLN, KC_P7, KC_P8, KC_P9, KC_EQL, KC_BSPC,
|
||||
KC_QUOT, KC_UNDS, KC_CIRC, KC_PERC, KC_LPRN, KC_RPRN, KC_M, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PPLS,
|
||||
KC_TRNS, KC_PIPE, KC_AMPR, KC_DQUO, KC_LCBR, KC_RCBR, KC_AT, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PAST,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_PDOT, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
/* MIT Layout (GAMING)
|
||||
*.
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |ESC,`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |EXIT GAMING|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | TAB | Q | W | E | R | T | I | 4 | 5 | 6 | - | + |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| A | S | D | F | G | K | 1 | 2 | 3 | / | * |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | Ctl | Alt | SPACE | 0 | . | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_GAMING] = LAYOUT_planck_grid( /* GAMING */
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_P8, KC_9, KC_0, EXT_GAMING,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_I, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PPLS,
|
||||
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_K, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PAST,
|
||||
KC_NO, KC_NO, KC_NO, KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_P0, KC_PDOT, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
/* MIT Layout (FN)
|
||||
*
|
||||
* ,----------------------------------------------------------------------------.
|
||||
* | |Ctl,F9 |Sft,F10|Alt,F11| F12 |MyComp|Calc |home | up | end |PrtScr| Del |
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | F5 | F6 | F7 | F8 |DeskL |DeskR |left | down |right|ScrLck| CAPS|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 |ALT_TAB|MicM |pgup |LCA_dn| pgdn|Pse/Brk| Ins|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | | | | | | |Alt,MNext| | | |
|
||||
* `-----------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FN] = LAYOUT_planck_grid( /* FUNCTION */
|
||||
KC_TRNS, MTLCTL_F9, MTLSFT_F10, MTLALT_F11, KC_F12, KC_MYCM, KC_CALC, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_DEL,
|
||||
KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, DESKTL, DESKTR, KC_LEFT, KC_DOWN, KC_RGHT, KC_SLCK, KC_CAPS,
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, ALT_TAB, MICMUTE, KC_PGUP, LCA(KC_DOWN), KC_PGDN, KC_PAUSE, KC_INS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MTLALT_NXT, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
/* MIT Layout (ADJUST)
|
||||
*
|
||||
* ,-----------------------------------------------------------------------------.
|
||||
* |RGBtog|Ms3 | Ms2 |MsUp | Ms1 | Hue+| Hue- | Sat+| Sat- |Brt+ |Brt- | RESET|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* |RGBMod| MWL | MsL |MDn |MsR |GAMING| |AU_ON|AU_OFF|MU_ON|MU_OF| DEBUG|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | |MWLft|MWUp |NWDn |NWRght|QWERTY|CMK_VCP|MI_ON|MI_OF | | |MU_Mod|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | | |SLEEP| | | | | | | |
|
||||
* `-----------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_planck_grid( /* ADJUST LAYER */
|
||||
RGB_TOG, KC_BTN3, KC_BTN2, KC_MS_U, KC_BTN1, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RESET,
|
||||
RGB_MOD, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, GAMING, KC_NO, AU_ON, AU_OFF, MU_ON, MU_OFF, DEBUG,
|
||||
KC_TRNS, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, QWERTY, COLEMAK_VCP, MI_ON, MI_OFF, KC_TRNS, KC_TRNS, MU_MOD,
|
||||
KC_NO, KC_NO, KC_NO, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float layerswitch_song[][2] = SONG(PLANCK_SOUND);
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_COLEMAK_VCP[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
#endif
|
||||
|
||||
bool is_alt_tab_active = false;
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
||||
static bool is_this_layer_on = false;
|
||||
if (layer_state_cmp(state, 4) != is_this_layer_on) {
|
||||
is_this_layer_on = layer_state_cmp(state, 4);
|
||||
if (is_this_layer_on) {
|
||||
PLAY_SONG(layerswitch_song);
|
||||
}
|
||||
else {
|
||||
stop_all_notes();
|
||||
}
|
||||
}
|
||||
if (is_alt_tab_active) {
|
||||
unregister_code(KC_LALT);
|
||||
is_alt_tab_active = false;
|
||||
}
|
||||
return state;
|
||||
|
||||
switch (get_highest_layer(state)) {
|
||||
case _ADJUST:
|
||||
rgblight_setrgb (0xFF, 0x00, 0x00);
|
||||
break;
|
||||
case _LOWER:
|
||||
rgblight_setrgb (0x00, 0x00, 0xFF);
|
||||
break;
|
||||
case _NUMPAD:
|
||||
rgblight_setrgb (0x00, 0x00, 0xFF);
|
||||
break;
|
||||
case _RAISE:
|
||||
rgblight_setrgb (0x7A, 0x00, 0xFF);
|
||||
break;
|
||||
case _FN:
|
||||
rgblight_setrgb (0x00, 0xFF, 0x00);
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
rgblight_setrgb (0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
// void dance_media (qk_tap_dance_state_t *state, void *user_data)
|
||||
// if (state->count == 1) {
|
||||
// tap_code(KC_MPLY);
|
||||
// } else if (state->count == 2) {
|
||||
// tap_code (KC_MNXT);
|
||||
// } else if (state->count == 3) {
|
||||
// tap_code(KC_MPRV);
|
||||
// } else {
|
||||
// reset_tap_dance (state);
|
||||
// }
|
||||
// }
|
||||
|
||||
// qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// [0] = ACTION_TAP_DANCE_FN (dance_media),
|
||||
// };
|
||||
|
||||
// Determine the current tap dance state
|
||||
td_state_t cur_dance(qk_tap_dance_state_t *state) {
|
||||
if (state->interrupted) return TD_SINGLE_HOLD;
|
||||
if (state->count == 1) {
|
||||
if (!state->pressed) return TD_SINGLE_TAP;
|
||||
else return TD_SINGLE_HOLD;
|
||||
} else if (state->count == 2) return TD_DOUBLE_TAP;
|
||||
else return TD_UNKNOWN;
|
||||
}
|
||||
|
||||
// Initialize tap structure associated with example tap dance key
|
||||
static td_tap_t usl_tap_state = {
|
||||
.is_press_action = true,
|
||||
.state = TD_NONE
|
||||
};
|
||||
|
||||
// Functions that control what our tap dance key does
|
||||
void usl_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
usl_tap_state.state = cur_dance(state);
|
||||
switch (usl_tap_state.state) {
|
||||
case TD_SINGLE_TAP:
|
||||
tap_code16(KC_UNDS);
|
||||
break;
|
||||
case TD_SINGLE_HOLD:
|
||||
layer_on(_LOWER);
|
||||
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
break;
|
||||
case TD_DOUBLE_TAP:
|
||||
// Check to see if the layer is already set
|
||||
if (layer_state_is(_LOWER)) {
|
||||
// If already set, then switch it off
|
||||
layer_off(_LOWER);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
#endif
|
||||
} else {
|
||||
// If not already set, then switch the layer on
|
||||
layer_on(_LOWER);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(layerswitch_song);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void usl_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// If the key was held down and now is released then switch off the layer
|
||||
if (usl_tap_state.state == TD_SINGLE_HOLD) {
|
||||
layer_off(_LOWER);
|
||||
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
usl_tap_state.state = TD_NONE;
|
||||
}
|
||||
|
||||
// Associate our tap dance key with its functionality
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[UNDS_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, usl_finished, usl_reset, 175)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!process_select_word(keycode, record, SELWORD)) { return false; }
|
||||
if (!process_caps_word(keycode, record)) { return false; }
|
||||
|
||||
const uint8_t mods = get_mods();
|
||||
const uint8_t oneshot_mods = get_oneshot_mods();
|
||||
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_CAPS:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
register_code(KC_CAPS);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case GAMING:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_GAMING);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(layerswitch_song);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_GAMING:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_GAMING);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK_VCP:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK_VCP);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BRACES: // Types (), or {}, and puts cursor between braces.
|
||||
if (record->event.pressed) {
|
||||
clear_mods(); // Temporarily disable mods.
|
||||
clear_oneshot_mods();
|
||||
if ((mods | oneshot_mods) & MOD_MASK_SHIFT) {
|
||||
SEND_STRING("{}");
|
||||
} else {
|
||||
SEND_STRING("<>");
|
||||
}
|
||||
tap_code(KC_LEFT); // Move cursor between braces.
|
||||
set_mods(mods); // Restore mods.
|
||||
}
|
||||
return false;
|
||||
case BRACES2: // Types [], or <>, and puts cursor between braces.
|
||||
if (record->event.pressed) {
|
||||
clear_mods(); // Temporarily disable mods.
|
||||
clear_oneshot_mods();
|
||||
if ((mods | oneshot_mods) & MOD_MASK_SHIFT) {
|
||||
SEND_STRING("()");
|
||||
} else {
|
||||
SEND_STRING("[]");
|
||||
}
|
||||
tap_code(KC_LEFT); // Move cursor between braces.
|
||||
set_mods(mods); // Restore mods.
|
||||
}
|
||||
return false;
|
||||
case ARROW: // Arrow macro, types -> or =>.
|
||||
if (record->event.pressed) {
|
||||
if ((mods | oneshot_mods) & MOD_MASK_SHIFT) { // Is shift held?
|
||||
del_mods(MOD_MASK_SHIFT); // Temporarily delete shift.
|
||||
del_oneshot_mods(MOD_MASK_SHIFT);
|
||||
SEND_STRING("->");
|
||||
set_mods(mods); // Restore mods.
|
||||
} else {
|
||||
SEND_STRING("=>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case ALT_TAB: // super alt tab macro
|
||||
if (record->event.pressed) {
|
||||
if (!is_alt_tab_active) {
|
||||
is_alt_tab_active = true;
|
||||
register_code(KC_LALT);
|
||||
}
|
||||
register_code(KC_TAB);
|
||||
} else {
|
||||
unregister_code(KC_TAB);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
enum combo_events {
|
||||
EM_EMAIL,
|
||||
EM_WORK_EMAIL,
|
||||
HTML_P,
|
||||
HTML_TITLE,
|
||||
HTML_DIV,
|
||||
HTML_HTML,
|
||||
HTML_HEAD,
|
||||
HTML_BODY,
|
||||
HTML_FOOTER,
|
||||
HTML_A_HREF,
|
||||
HTML_IMG,
|
||||
CSS_STYLE,
|
||||
HTML_GENERIC_TAG,
|
||||
CTLRGHT,
|
||||
CTLLEFT,
|
||||
COMBO_LENGTH
|
||||
};
|
||||
uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead!
|
||||
|
||||
const uint16_t PROGMEM email_combo[] = {KC_E, KC_M, COMBO_END};
|
||||
const uint16_t PROGMEM email_work_combo[] = {KC_E, KC_K, COMBO_END};
|
||||
const uint16_t PROGMEM html_p_combo[] = {KC_P, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_title_combo[] = {KC_T, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_div_combo[] = {KC_D, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_html_combo[] = {KC_Q, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_head_combo[] = {KC_W, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_body_combo[] = {KC_R, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_footer_combo[] = {KC_X, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_a_href_combo[] = {KC_A, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_img_combo[] = {KC_F, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM css_style_combo[] = {KC_S, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM html_generic_tag_combo[] = {KC_G, KC_DOT, COMBO_END};
|
||||
const uint16_t PROGMEM ctrrght_combo[] = {KC_RGHT, KC_DOWN, COMBO_END};
|
||||
const uint16_t PROGMEM ctrleft_combo[] = {KC_LEFT, KC_DOWN, COMBO_END};
|
||||
// const uint8_t combo_mods = get_mods();
|
||||
// const uint8_t combo_oneshot_mods = get_oneshot_mods();
|
||||
|
||||
combo_t key_combos[] = {
|
||||
[EM_EMAIL] = COMBO_ACTION(email_combo),
|
||||
[EM_WORK_EMAIL] = COMBO_ACTION(email_work_combo),
|
||||
[HTML_P] = COMBO_ACTION(html_p_combo),
|
||||
[HTML_TITLE] = COMBO_ACTION(html_title_combo),
|
||||
[HTML_DIV] = COMBO_ACTION(html_div_combo),
|
||||
[HTML_HTML] = COMBO_ACTION(html_html_combo),
|
||||
[HTML_HEAD] = COMBO_ACTION(html_head_combo),
|
||||
[HTML_BODY] = COMBO_ACTION(html_body_combo),
|
||||
[HTML_FOOTER] = COMBO_ACTION(html_footer_combo),
|
||||
[HTML_A_HREF] = COMBO_ACTION(html_a_href_combo),
|
||||
[HTML_IMG] = COMBO_ACTION(html_img_combo),
|
||||
[CSS_STYLE] = COMBO_ACTION(css_style_combo),
|
||||
[HTML_GENERIC_TAG] = COMBO_ACTION(html_generic_tag_combo),
|
||||
[CTLRGHT] = COMBO_ACTION(ctrrght_combo),
|
||||
[CTLLEFT] = COMBO_ACTION(ctrleft_combo),
|
||||
};
|
||||
/* COMBO_ACTION(x) is same as COMBO(x, KC_NO) */
|
||||
|
||||
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
switch(combo_index) {
|
||||
case EM_EMAIL:
|
||||
if (pressed) {
|
||||
SEND_STRING("aricbouwers@outlook.com");
|
||||
}
|
||||
break;
|
||||
case EM_WORK_EMAIL:
|
||||
if (pressed) {
|
||||
SEND_STRING("acrossonbouwers@rjc.ca");
|
||||
}
|
||||
break;
|
||||
case HTML_DIV:
|
||||
if (pressed) {
|
||||
SEND_STRING("<div></div>");
|
||||
for (int i = 0; i < 6; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_P:
|
||||
if (pressed) {
|
||||
SEND_STRING("<p></p>");
|
||||
for (int i = 0; i < 4; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_TITLE:
|
||||
if (pressed) {
|
||||
SEND_STRING("<title></title>");
|
||||
for (int i = 0; i < 8; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CSS_STYLE:
|
||||
if (pressed) {
|
||||
SEND_STRING("<style></style>");
|
||||
for (int i = 0; i < 8; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_HTML:
|
||||
if (pressed) {
|
||||
SEND_STRING("<html lang=\"en\"></html>");
|
||||
for (int i = 0; i < 7; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_HEAD:
|
||||
if (pressed) {
|
||||
SEND_STRING("<head></head>");
|
||||
for (int i = 0; i < 7; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_BODY:
|
||||
if (pressed) {
|
||||
SEND_STRING("<body></body>");
|
||||
for (int i = 0; i < 7; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_FOOTER:
|
||||
if (pressed) {
|
||||
SEND_STRING("<footer></footer>");
|
||||
for (int i = 0; i < 9; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_A_HREF:
|
||||
if (pressed) {
|
||||
SEND_STRING("<a href=\"link_goes_here\">name_of_link_goes_here</a>");
|
||||
tap_code16(KC_HOME);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
tap_code16(KC_RGHT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_IMG:
|
||||
if (pressed) {
|
||||
SEND_STRING("<img src=\"image_source_or_link_goes_here\" alt=\"name_if_cant_load\" width=\"num_pixels\" height=\"num_pixels\">");
|
||||
tap_code16(KC_HOME);
|
||||
for (int i = 0; i < 11; i++) {
|
||||
tap_code16(KC_RGHT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HTML_GENERIC_TAG:
|
||||
if (pressed) {
|
||||
SEND_STRING("<TAG></TAG>");
|
||||
tap_code16(KC_ESC);
|
||||
for (int i = 0; i < 9; i++) {
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
tap_code16(LCTL(KC_D));
|
||||
tap_code16(LCTL(KC_D));
|
||||
tap_code16(KC_BSPC);
|
||||
}
|
||||
break;
|
||||
case CTLLEFT:
|
||||
if (pressed) {
|
||||
tap_code16(C(KC_LEFT));
|
||||
}
|
||||
break;
|
||||
case CTLRGHT:
|
||||
if (pressed) {
|
||||
tap_code16(C(KC_RGHT));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
78
keyboards/planck/keymaps/ariccb/readme.md
Normal file
78
keyboards/planck/keymaps/ariccb/readme.md
Normal file
@@ -0,0 +1,78 @@
|
||||
```
|
||||
QWERTY LAYER
|
||||
* ,------------------------------------------------------------------------.
|
||||
* |FN,Esc| q | w | e | r | t | y | u | i | o | p |Bsp |
|
||||
* |------------------------------------------------------------------------|
|
||||
|CSW,Tab| a | s | d | f | g | h | j | k | l | ; |Ctl,'|
|
||||
* |------------------------------------------------------------------------|
|
||||
* |Shift |Win,z| x | c | v | b | n | m | , | . | / |Sft,\|
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | |Ctl,Ent|LOWER| Space |RAISE|Alt,Play| | | |
|
||||
* `------------------------------------------------------------------------'
|
||||
|
||||
COLEMAK_VCP(default) LAYER
|
||||
* ,------------------------------------------------------------------------.
|
||||
* |FN,ESC| q | w | f | d | b | j | l | u | y | ; | Bsp |
|
||||
* |------------------------------------------------------------------------|
|
||||
|CSW,Tab| a | r | s | t | g | m | n | e | i | o |Ctl,'|
|
||||
* |------------------------------------------------------------------------|
|
||||
* |Shift |Win,z| x | v | c | p | k | h | , | . | / |Sft,\|
|
||||
* |------------------------------------------------------------------------|
|
||||
* | | | |Ctl,Ent|LWR,_| Space |RAISE|Alt,Play| | | |
|
||||
* `------------------------------------------------------------------------'
|
||||
|
||||
LOWER LAYER
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ` | ! | # | $ | < | > | : | 7 | 8 | 9 | = | Bsp |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | ' | _ | ^ | % | ( | ) | M | 4 | 5 | 6 | - | + |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| | | & | " | { | } | @ | 1 | 2 | 3 | / | * |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | |MO(6),0| . | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
|
||||
RAISED LAYER
|
||||
* ,-----------------------------------------------------------------------------.
|
||||
* | ~ | ! | | | | | | Cut | Undo| Redo|P2TXT| Bsp |
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | |Menu | | | | | ARROW |SELWORD|Copy|Paste|WinPst| " |
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | |Vol+ |Vol- | Mute| | | Braces|Braces2| < | > | ? | ! |
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | | | |Adjust| | | | | | |
|
||||
* `-----------------------------------------------------------------------------'
|
||||
|
||||
FN LAYER
|
||||
* ,----------------------------------------------------------------------------.
|
||||
* | |Ctl,F9 |Sft,F10|Alt,F11| F12 |MyComp|Calc |home | up | end |PrtScr| Del |
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | F5 | F6 | F7 | F8 |DeskL |DeskR |left | down |right|ScrLck| CAPS|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | F1 | F2 | F3 | F4 |ALT_TAB| MicM|pgup |LCA_dn| pgdn|Pse/Brk| Ins|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | | | | | | |Alt,MNext| | | |
|
||||
* `-----------------------------------------------------------------------------'
|
||||
|
||||
GAMING LAYER
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |ESC,`| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |EXIT GAMING|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | TAB | Q | W | E | R | T | I | 4 | 5 | 6 | - | + |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |Shift| A | S | D | F | G | K | 1 | 2 | 3 | / | * |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | Ctl | Alt | SPACE | 0 | . | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
|
||||
ADJUST LAYER
|
||||
* ,-----------------------------------------------------------------------------.
|
||||
* |RGBtog|Ms3 | Ms2 |MsUp | Ms1 | Hue+| Hue- | Sat+| Sat- |Brt+ |Brt- | RESET|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* |RGBMod| MWL | MsL |MDn |MsR |GAMING| |AU_ON|AU_OFF|MU_ON|MU_OF| DEBUG|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | |MWLft|MWUp |NWDn |NWRght|QWERTY|CMK_VCP|MI_ON|MI_OF | | |MU_Mod|
|
||||
* |-----------------------------------------------------------------------------|
|
||||
* | | | |SLEEP| | | | | | | |
|
||||
* `-----------------------------------------------------------------------------'
|
||||
```
|
||||
10
keyboards/planck/keymaps/ariccb/rules.mk
Normal file
10
keyboards/planck/keymaps/ariccb/rules.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
BOOTMAGIC_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
BACKLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
DIP_SWITCH_ENABLE = no
|
||||
COMBO_ENABLE = yes
|
||||
|
||||
SRC += features/select_word.c
|
||||
SRC += features/caps_word.c
|
||||
@@ -144,7 +144,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -174,9 +174,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -205,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifndef LIGHT_CONFIG_H
|
||||
#ifndef KEYBOARD_planck_light
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 3
|
||||
#endif
|
||||
@@ -40,5 +39,3 @@
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q ,
|
||||
// LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) ,
|
||||
MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) ,
|
||||
KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT ,
|
||||
KC_LSFT, DE_F, DE_V, DE_UDIA, DE_ADIA, DE_ODIA, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT ,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL
|
||||
),
|
||||
|
||||
@@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[1] = LAYOUT_planck_grid(
|
||||
DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT ,
|
||||
_______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ ,
|
||||
_______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ ,
|
||||
DE_DEG, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, DE_ACUT ,
|
||||
_______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ ,
|
||||
_______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
@@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[4] = LAYOUT_planck_grid(
|
||||
XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX ,
|
||||
KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
|
||||
_______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
|
||||
KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
|
||||
_______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
|
||||
_______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______
|
||||
),
|
||||
|
||||
@@ -128,8 +128,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[5] = LAYOUT_planck_grid(
|
||||
XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX ,
|
||||
_______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ ,
|
||||
_______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ ,
|
||||
_______, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ ,
|
||||
_______, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ ,
|
||||
_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -4,43 +4,43 @@
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
// Disable all RGB effects
|
||||
#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#define DISABLE_RGB_MATRIX_BREATHING
|
||||
#define DISABLE_RGB_MATRIX_BAND_SAT
|
||||
#define DISABLE_RGB_MATRIX_BAND_VAL
|
||||
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#undef ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#undef ENABLE_RGB_MATRIX_BREATHING
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#undef ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#undef ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#undef ENABLE_RGB_MATRIX_SPLASH
|
||||
#undef ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
// Most tactile encoders have detents every 4 stages
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
AUDIO_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = lite
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
COMMAND_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#pragma once
|
||||
|
||||
#ifndef NO_DEBUG
|
||||
#define NO_DEBUG
|
||||
@@ -28,7 +27,7 @@
|
||||
|
||||
#define LEADER_TIMEOUT 300
|
||||
|
||||
#ifndef LIGHT_CONFIG_H
|
||||
#ifndef KEYBOARD_planck_light
|
||||
#define BACKLIGHT_BREATHING
|
||||
#endif
|
||||
|
||||
@@ -42,6 +41,3 @@
|
||||
* borrowed from basic keymap */
|
||||
|
||||
#define _____ KC_NO
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
@@ -14,7 +14,6 @@ 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.
|
||||
API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
#define KC_PC_CUT LCTL(KC_X)
|
||||
#define KC_PC_COPY LCTL(KC_C)
|
||||
#define KC_PC_PASTE LCTL(KC_V)
|
||||
#define ES_LESS_MAC KC_GRAVE
|
||||
#define ES_GRTR_MAC LSFT(KC_GRAVE)
|
||||
#define ES_LABK_MAC KC_GRAVE
|
||||
#define ES_RABK_MAC LSFT(KC_GRAVE)
|
||||
#define ES_BSLS_MAC ALGR(KC_6)
|
||||
#define NO_PIPE_ALT KC_GRAVE
|
||||
#define NO_BSLS_ALT KC_EQUAL
|
||||
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -169,6 +169,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# 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)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_META] = LAYOUT_planck_grid(
|
||||
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SRC, XXXXXXX,
|
||||
XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_F10, KC_F11, KC_F12, HK_AF9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
@@ -167,6 +167,10 @@ void matrix_scan_user(void) {
|
||||
SEQ_ONE_KEY(KC_S) {
|
||||
tap_code16(G(C(S(KC_4))));
|
||||
}
|
||||
// Record Screen
|
||||
SEQ_TWO_KEYS(KC_S, KC_S) {
|
||||
tap_code16(S(G(KC_5)));
|
||||
}
|
||||
// 1Pass browser
|
||||
SEQ_ONE_KEY(KC_A) {
|
||||
tap_code16(G(A(KC_BSLS)));
|
||||
@@ -187,5 +191,13 @@ void matrix_scan_user(void) {
|
||||
SEQ_ONE_KEY(KC_ENT) {
|
||||
tap_code16(S(G(A(KC_F))));
|
||||
}
|
||||
// Focus file tree
|
||||
SEQ_ONE_KEY(KC_TAB) {
|
||||
tap_code16(G(KC_1));
|
||||
}
|
||||
// Caps-lock
|
||||
SEQ_TWO_KEYS(KC_TAB, KC_TAB) {
|
||||
tap_code16(KC_CAPS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SRC += muse.c
|
||||
|
||||
BOOTMAGIC_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
|
||||
@@ -40,12 +40,6 @@ enum planck_keycodes {
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define KC_____ KC_TRNS
|
||||
#define KC_XXXX KC_NO
|
||||
#define KC_LOWR LOWER
|
||||
#define KC_RASE RAISE
|
||||
|
||||
/**
|
||||
* Custom Corvec Bindings
|
||||
*
|
||||
@@ -76,54 +70,54 @@ enum planck_keycodes {
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_COLEMAK] = KC_KEYMAP(
|
||||
[_COLEMAK] = LAYOUT_planck_grid(
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
|
||||
KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y ,KC_SCLN,KC_BSPC,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
RESC, A , R , S , T , D , H , N , E , I , O ,TQTD,
|
||||
KC_RESC, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O ,KC_TQTD,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,RSFT,
|
||||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,SDEL,TALT,TGUI,RCTL
|
||||
KC_LCTL,KC_LGUI,KC_WOBL,KC_LALT,KC_LENT, KC_SPC, KC_SPC,RAISE,KC_SDEL,KC_TALT,KC_TGUI,KC_RCTL
|
||||
),
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
[_QWERTY] = LAYOUT_planck_grid(
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
|
||||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSPC,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
RESC, A , S , D , F , G , H , J , K , L ,SCLN,TQTD,
|
||||
KC_RESC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_TQTD,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,RALT,SAPP,RGUI,RCTL
|
||||
KC_LCTL,KC_LGUI,KC_WOBL,KC_LALT,KC_LENT, KC_SPC, KC_SPC,RAISE,KC_RALT,KC_SAPP,KC_RGUI,KC_RCTL
|
||||
),
|
||||
|
||||
[_LOWER] = KC_KEYMAP(
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
|
||||
____,LPRN,RPRN,LBRC,RBRC,XXXX,LEFT,DOWN, UP ,RGHT,XXXX,MINS,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,PGDN,PGUP,END ,BSLS,____,
|
||||
____,____,____,____,____,____,____,____,____,____,____,____
|
||||
[_LOWER] = LAYOUT_planck_grid(
|
||||
KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______,
|
||||
_______,KC_LPRN,KC_RPRN,KC_LBRC,KC_RBRC,XXXXXXX,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT,XXXXXXX,KC_MINS,
|
||||
_______,KC_BSLS,KC_TILD,KC_PIPE,KC_EQL ,KC_UNDS,KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_BSLS,_______,
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
|
||||
),
|
||||
|
||||
[_LEANDOWN] = KC_KEYMAP(
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
|
||||
____,LPRN,RPRN,LBRC,RBRC,LCBR,LCBR,DLR ,PERC,CIRC,____,____,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,EXLM, AT ,HASH,BSLS,____,
|
||||
____,____,____,____,____,____,____,____,LEFT,DOWN, UP ,RGHT
|
||||
[_LEANDOWN] = LAYOUT_planck_grid(
|
||||
KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______,
|
||||
_______,KC_LPRN,KC_RPRN,KC_LBRC,KC_RBRC,KC_LCBR,KC_LCBR,KC_DLR ,KC_PERC,KC_CIRC,_______,_______,
|
||||
_______,KC_BSLS,KC_TILD,KC_PIPE,KC_EQL ,KC_UNDS,KC_HOME,KC_EXLM, KC_AT ,KC_HASH,KC_BSLS,_______,
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
|
||||
),
|
||||
|
||||
[_RAISE] = KC_KEYMAP(
|
||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,____,
|
||||
____,LPRN,RPRN,LCBR,RCBR,XXXX,XXXX, 4 , 5 , 6 ,PPLS,MINS,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,XXXX, 1 , 2 , 3 ,PAST,____,
|
||||
____,____,____,____,____,____,____,____,____,____,____,____
|
||||
[_RAISE] = LAYOUT_planck_grid(
|
||||
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______,
|
||||
_______,KC_LPRN,KC_RPRN,KC_LCBR,KC_RCBR,XXXXXXX,XXXXXXX, KC_4 , KC_5 , KC_6 ,KC_PPLS,KC_MINS,
|
||||
_______,KC_BSLS,KC_TILD,KC_PIPE,KC_EQL ,KC_UNDS,XXXXXXX, KC_1 , KC_2 , KC_3 ,KC_PAST,_______,
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
|
||||
),
|
||||
|
||||
[_WOBBLE] = KC_KEYMAP(
|
||||
GRV , F1 , F2 , F3 , F4 , NO ,MUTE,VOLD,VOLU, NO , NO , DEL,
|
||||
, F5 , F6 , F7 , F8 , NO ,MPRV,MPLY,MSTP,MNXT, NO ,BSLS,
|
||||
, F9 , F10, F11, F12, NO , NO , NO , NO , INS,PSCR, ,
|
||||
, , , , , , , , , , ,
|
||||
[_WOBBLE] = LAYOUT_planck_grid(
|
||||
KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NO ,KC_MUTE,KC_VOLD,KC_VOLU, KC_NO , KC_NO , KC_DEL,
|
||||
_______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_NO ,KC_MPRV,KC_MPLY,KC_MSTP,KC_MNXT, KC_NO ,KC_BSLS,
|
||||
_______, KC_F9 , KC_F10, KC_F11, KC_F12, KC_NO , KC_NO , KC_NO , KC_NO , KC_INS,KC_PSCR,_______,
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
API_SYSEX_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
|
||||
28
keyboards/planck/keymaps/csc027/config.h
Normal file
28
keyboards/planck/keymaps/csc027/config.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright 2021 Constantine Chen @csc027
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#define USB_POLLING_INTERVAL_MS 1
|
||||
|
||||
#if defined(TAP_CODE_DELAY)
|
||||
# undef TAP_CODE_DELAY
|
||||
#endif
|
||||
#define TAP_CODE_DELAY 10
|
||||
@@ -1,4 +1,4 @@
|
||||
BOOTMAGIC_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
COMMAND_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -1,19 +1,38 @@
|
||||
/* Copyright 2021 David Rambo
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define A_BSPC LALT(KC_BSPC)
|
||||
#define A_LEFT LALT(KC_LEFT)
|
||||
#define A_RGHT LALT(KC_RGHT)
|
||||
#define C_TAB LCTL(KC_TAB)
|
||||
#define GSL LGUI(S(KC_LEFT))
|
||||
#define GSR LGUI(S(KC_RGHT))
|
||||
#define CTLPGUP LCTL(KC_PGUP) // back one tab in Brave
|
||||
#define CTLPGDN LCTL(KC_PGDN) // forward one tab in Brave
|
||||
#define G_TAB LGUI(KC_TAB)
|
||||
#define G_GRV LGUI(KC_GRV)
|
||||
#define SftEnt SFT_T(KC_ENT)
|
||||
#define NAV LT(2, KC_TAB)
|
||||
#define RECT LCA_T(KC_DEL) // Ctrl+Alt is the basis for Rectangle WM shortcuts
|
||||
|
||||
#define _COLEMAK 0
|
||||
#define _SYMBOL 1
|
||||
#define _NAVIGATION 2
|
||||
enum custom_layers {
|
||||
_COLEMAK,
|
||||
_SYMBOL,
|
||||
_NAVIGATION,
|
||||
}
|
||||
|
||||
//tapdance declarations
|
||||
enum {
|
||||
@@ -40,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||
NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt ,
|
||||
KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
RECT , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Symbol
|
||||
@@ -49,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | Home | End | ScUp | ScDn | BRMD | BRMU | -_ |Pg Up | | / | |
|
||||
* | | Home | End | | | BRMD | BRMU | -_ |Pg Up | | / | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | `~ | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
@@ -58,15 +77,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC,
|
||||
KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL ,
|
||||
_______, KC_HOME, KC_END , _______, _______, KC_BRMD, KC_BRMU, KC_MINS, KC_PGUP, _______, _______, _______,
|
||||
KC_GRV, _______, _______, _______, A_BSPC , _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE
|
||||
_______, KC_GRV , _______, _______, _______ , _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE
|
||||
),
|
||||
|
||||
/* Navigation*/
|
||||
|
||||
[_NAVIGATION] = LAYOUT_planck_grid(
|
||||
_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______,
|
||||
_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______,
|
||||
_______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______,
|
||||
_______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______,
|
||||
_______, _______, _______, _______, _______, _______, G_TAB , A_BSPC , KC_HOME, KC_END, G_GRV , _______,
|
||||
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -263,7 +263,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -293,9 +293,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -324,6 +325,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
/* Copyright 2015-2021 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
# define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) }
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -33,4 +47,3 @@
|
||||
|
||||
// Most tactile encoders have detents every 4 stages
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
/* Copyright 2015-2021 Jack Humbert
|
||||
*
|
||||
* 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
|
||||
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -286,9 +286,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -317,6 +318,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -133,6 +133,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -19,3 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#undef BACKLIGHT_LEVELS
|
||||
#define BACKLIGHT_LEVELS 15
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL+5
|
||||
@@ -18,35 +18,25 @@
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
bool isGame = false;
|
||||
bool isMusic = false;
|
||||
bool qwertGame = false;
|
||||
|
||||
|
||||
enum planck_layers {
|
||||
_COLEMAK,
|
||||
_GAME,
|
||||
_MUSIC,
|
||||
_QWERTGAME,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
GCTOGG,
|
||||
MCTOGG,
|
||||
QGCTOGG,
|
||||
LOWER,
|
||||
RAISE,
|
||||
LENNY,
|
||||
COMMENTHEAD,
|
||||
RICKANDMORT,
|
||||
MARIO,
|
||||
MARIOE,
|
||||
OVERWATCH,
|
||||
DOOM,
|
||||
DISNEY,
|
||||
NUMBERONE,
|
||||
CABBAGE,
|
||||
OLDSPICE,
|
||||
PAREN
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -69,14 +59,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt |lenny |Lower | shift|space |Raise | macro|macro2|macro3|QWERTY|
|
||||
* | Ctrl | GUI | Alt |PAREN |Lower | shift|space |Raise | Left | Down | Up | Right|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL,
|
||||
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_MINS,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LENNY, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, COMMENTHEAD, RICKANDMORT, KC_LEFT, KC_RGHT
|
||||
KC_LCTL, KC_LGUI, KC_LALT, PAREN, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
@@ -93,8 +83,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_LOWER] = LAYOUT_planck_grid(
|
||||
_______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, _______, S(KC_EQL),
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_UNDS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV, KC_MNXT, _______, KC_UNDS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
@@ -105,30 +95,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | bl- | bl+ | GCTG |
|
||||
* | | | | | | | | | | | GCTG |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_planck_grid(
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, MCTOGG, GCTOGG
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, GCTOGG
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |EEPRst| Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap| | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_planck_grid(
|
||||
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
|
||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, COLEMAK, _______, _______, _______,
|
||||
EEP_RST, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
|
||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
@@ -137,102 +127,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL,
|
||||
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_MINS,
|
||||
KC_LCTL, RAISE, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
KC_LCTL, QGCTOGG, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
[_MUSIC] = LAYOUT_planck_grid(
|
||||
MARIO, MARIOE, OVERWATCH, DOOM, DISNEY, NUMBERONE, CABBAGE, OLDSPICE, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
[_QWERTGAME] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
|
||||
KC_LCTL, QGCTOGG, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float guitar[][2] = SONG(GUITAR_SOUND);
|
||||
float mario[][2] = SONG(MARIO_THEME);
|
||||
float marioe[][2] = SONG(MARIO_GAMEOVER);
|
||||
float overwatch[][2] = SONG(OVERWATCH_THEME);
|
||||
float doom[][2] = SONG(E1M1_DOOM);
|
||||
float disney[][2] = SONG(DISNEY_SONG);
|
||||
float numberone[][2] = SONG(NUMBER_ONE);
|
||||
float cabbage[][2] = SONG(CABBAGE_SONG);
|
||||
float oldspice[][2] = SONG(OLD_SPICE);
|
||||
#endif
|
||||
|
||||
void setLayer(int layer) {
|
||||
if (layer == _COLEMAK) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(marioe);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_set(0);
|
||||
#endif
|
||||
} else if (layer == _GAME) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(mario);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_GAME);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_set(15);
|
||||
#endif
|
||||
} else if (layer == _MUSIC) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(guitar);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_MUSIC);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_set(1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_set(0);
|
||||
backlight_set(0);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case GCTOGG:
|
||||
if (record->event.pressed) {
|
||||
if (isGame) {
|
||||
if (isMusic)
|
||||
setLayer(_MUSIC);
|
||||
else
|
||||
setLayer(_COLEMAK);
|
||||
isGame = false;
|
||||
} else {
|
||||
setLayer(_GAME);
|
||||
isGame = true;
|
||||
}
|
||||
if (!isGame) {
|
||||
set_single_persistent_default_layer(_GAME);
|
||||
isGame = true;
|
||||
}
|
||||
else {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
isGame = false;
|
||||
qwertGame = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MCTOGG:
|
||||
if (record->event.pressed) {
|
||||
if (isMusic) {
|
||||
if (isGame)
|
||||
setLayer(_GAME);
|
||||
else
|
||||
setLayer(_COLEMAK);
|
||||
isMusic = false;
|
||||
} else {
|
||||
setLayer(_MUSIC);
|
||||
isMusic = true;
|
||||
}
|
||||
case QGCTOGG:
|
||||
if (record->event.pressed) {
|
||||
if (!qwertGame) {
|
||||
set_single_persistent_default_layer(_QWERTGAME);
|
||||
qwertGame = true;
|
||||
} else {
|
||||
set_single_persistent_default_layer(_GAME);
|
||||
qwertGame = false;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
@@ -253,85 +195,44 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LENNY:
|
||||
case PAREN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("()");
|
||||
}
|
||||
return false; break;
|
||||
case COMMENTHEAD:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("// ---------------------------------------------------------------");
|
||||
}
|
||||
return false; break;
|
||||
case RICKANDMORT:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("// ***************************************************************");
|
||||
}
|
||||
return false; break;
|
||||
case MARIO:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(mario);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case MARIOE:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(marioe);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case OVERWATCH:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(overwatch);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case DOOM:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(doom);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case DISNEY:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(disney);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case NUMBERONE:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(numberone);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case CABBAGE:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(cabbage);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
case OLDSPICE:
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(oldspice);
|
||||
#endif
|
||||
}
|
||||
return false; break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case _GAME:
|
||||
rgblight_sethsv_noeeprom(0, UINT8_MAX, RGBLIGHT_LIMIT_VAL);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL+5);
|
||||
break;
|
||||
case _QWERTGAME:
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD+2);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
rgblight_sethsv_noeeprom(0, 0, 0);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
isGame = false;
|
||||
qwertGame = false;
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_level(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblight_sethsv_noeeprom(0, 0, 0);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
CONSOLE_ENABLE = no
|
||||
BACKLIGHT_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# 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)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -50,6 +50,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// eeconfig_init();
|
||||
//}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
@@ -11,7 +11,6 @@ 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.
|
||||
API_SYSEX_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
|
||||
73
keyboards/planck/keymaps/dvz/config.h
Normal file
73
keyboards/planck/keymaps/dvz/config.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/* Copyright 2021 Milan Düwel
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
/*#define DEFAULT_LAYER_SONGS {
|
||||
SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}*/
|
||||
|
||||
#define PING_SOUND Q__NOTE(_A6), WD_NOTE(_E7)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
// Most tactile encoders have detents every 4 stages
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
||||
#define COMBO_COUNT 4
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define DAC_SAMPLE_MAX 65535/2
|
||||
#endif
|
||||
|
||||
#define RGBLIGHT_LAYERS
|
||||
#define RGBLIGHT_SAT_STEP 5
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_SLEEP
|
||||
#define RGBLED_NUM 9
|
||||
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
||||
#define RGBLIGHT_RAINBOW_SWIRL_RANGE 127
|
||||
280
keyboards/planck/keymaps/dvz/keymap.c
Normal file
280
keyboards/planck/keymaps/dvz/keymap.c
Normal file
@@ -0,0 +1,280 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
#include "keymap_german.h"
|
||||
|
||||
enum combos {
|
||||
AE,
|
||||
OE,
|
||||
UE,
|
||||
SZ
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM ae_combo[] = {KC_A, KC_E, COMBO_END};
|
||||
const uint16_t PROGMEM oe_combo[] = {KC_O, KC_E, COMBO_END};
|
||||
const uint16_t PROGMEM ue_combo[] = {KC_U, KC_E, COMBO_END};
|
||||
const uint16_t PROGMEM sz_combo[] = {KC_S, DE_Z, COMBO_END};
|
||||
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
[AE] = COMBO(ae_combo, DE_AE),
|
||||
[OE] = COMBO(oe_combo, DE_OE),
|
||||
[UE] = COMBO(ue_combo, DE_UE),
|
||||
[SZ] = COMBO(sz_combo, DE_SS)
|
||||
};
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTZ,
|
||||
_NUMPD,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTZ = SAFE_RANGE,
|
||||
NUMPD,
|
||||
SCROLL
|
||||
};
|
||||
|
||||
bool scroll = false;
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float ping_song[][2] = SONG(PING_SOUND);
|
||||
#endif
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTZ
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | RtEnc| Q | W | E | R | T | Z | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | + | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | SfTab| Y | X | C | V | B | N | M | , | . | Up |SfEnt |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | NumPd| Alt | Num | Space | Sym | Del | Left | Down |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTZ] = LAYOUT_planck_grid(
|
||||
SCROLL, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, DE_MINS,
|
||||
LSFT_T(KC_TAB),DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SFTENT,
|
||||
KC_LCTL, KC_LGUI, NUMPD, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
/* Numpad
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | 7 | 8 | 9 | / | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | NLCK | 4 | 5 | 6 | - | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | 1 | 2 | 3 | + | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | . | 0 | , |NumOFF| Enter |Raise | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUMPD] = LAYOUT_planck_grid(
|
||||
SFT_T(KC_PASTE),KC_P7, KC_P8, KC_P9, DE_SLSH, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_NLCK, KC_P4, KC_P5, KC_P6, DE_MINS, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_P1, KC_P2, KC_P3, DE_PLUS, _______, _______, _______, _______, _______, _______, _______,
|
||||
CTL_T(KC_COPY),KC_DOT, KC_P0, KC_COMM, NUMPD, KC_ENT, KC_ENT, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ^ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | F10 | F11 | F12 | F13 | F14 | F15 | | | |Pg Up | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Home |Pg Dn | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_planck_grid(
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, _______, _______,
|
||||
_______, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | ! | " | § | $ | % | & | / | ( | ) | = | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ° | | | | | | | | ? | [ | ] | ' | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | \ | < | > | { | } | Vol+ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Brt- | Vol- | Brt+ |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_planck_grid(
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC,
|
||||
KC_TILD, _______, _______, _______, _______, _______, DE_PIPE, DE_QUES, DE_LBRC, DE_RBRC, DE_QUOT, DE_HASH,
|
||||
_______, _______, _______, _______, _______, DE_BSLS, DE_LABK, DE_RABK, DE_LCBR, DE_RCBR, KC_VOLU, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_BRIU
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* v------------------------RGB CONTROL--------------------v
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |PowOff| |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_planck_grid(
|
||||
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
|
||||
KC_POWER,_______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
/*case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;*/
|
||||
case NUMPD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(ping_song);
|
||||
#endif
|
||||
if (layer_state_is(_NUMPD)) {
|
||||
layer_off(_NUMPD);
|
||||
} else {
|
||||
layer_on(_NUMPD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SCROLL:
|
||||
if (record->event.pressed) {
|
||||
scroll = true;
|
||||
} else {
|
||||
scroll = false;
|
||||
}
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
if (layer_state_is(_NUMPD)){
|
||||
if (clockwise) {
|
||||
tap_code(KC_RIGHT);
|
||||
} else {
|
||||
tap_code(KC_LEFT);
|
||||
}
|
||||
} else if (scroll) { //scroll fast mode
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else {
|
||||
if (clockwise) {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
#else
|
||||
tap_code(KC_PGDN);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
tap_code(KC_MS_WH_UP);
|
||||
#else
|
||||
tap_code(KC_PGUP);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const rgblight_segment_t PROGMEM numbers_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{3, 4, HSV_GREEN}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM symbols_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{2, 5, HSV_PURPLE}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM numpad_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{5, 4, HSV_RED} // Light 4 LEDs, starting with LED 6
|
||||
);
|
||||
const rgblight_segment_t PROGMEM config_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{2, 6, HSV_YELLOW}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
numbers_layer,
|
||||
symbols_layer,
|
||||
numpad_layer, // Overrides other layers
|
||||
config_layer
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
if (!(layer_state_is(_NUMPD))) {
|
||||
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
rgblight_set_layer_state(2, layer_state_cmp(state, 1));
|
||||
rgblight_set_layer_state(0, layer_state_cmp(state, 2));
|
||||
rgblight_set_layer_state(1, layer_state_cmp(state, 3));
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, 4));
|
||||
return state;
|
||||
}
|
||||
11
keyboards/planck/keymaps/dvz/readme.md
Normal file
11
keyboards/planck/keymaps/dvz/readme.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# devilzmods's german Planck Layout
|
||||
|
||||
- QWERTZ
|
||||
- Lefthand Numpad layer (toggle)
|
||||
- Standard Numbers (left)
|
||||
- Symbols (right)
|
||||
- Settings
|
||||
|
||||
This layout feature "rolling umlauts". Typing ae, oe, ue, sz respectively gets recognized and spits out ä, ö, ü, ß. For this, your systems keyboard layout/language has to be set to DE/German
|
||||
|
||||
The layout is also designed around a rotary encoder in the top left corner that switches between slow and fast scrolling in the default layer by pressing it down while turning. In the numpad layer it scrolls left/right and pressing it down holds shift to select while scrolling.
|
||||
5
keyboards/planck/keymaps/dvz/rules.mk
Normal file
5
keyboards/planck/keymaps/dvz/rules.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
SRC += muse.c
|
||||
|
||||
COMBO_ENABLE = yes
|
||||
#VIA_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -187,7 +187,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -226,6 +226,7 @@ void encoder_update(bool clockwise) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
# 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)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -185,7 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -291,7 +291,7 @@ void encoder_update(bool clockwise) {
|
||||
}
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@@ -316,6 +316,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
46
keyboards/planck/keymaps/foreveranapple/config.h
Normal file
46
keyboards/planck/keymaps/foreveranapple/config.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* Copyright 2015-2021 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
# define DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
// Most tactile encoders have detents every 4 stages
|
||||
#define ENCODER_RESOLUTION 4
|
||||
413
keyboards/planck/keymaps/foreveranapple/keymap.c
Normal file
413
keyboards/planck/keymaps/foreveranapple/keymap.c
Normal file
@@ -0,0 +1,413 @@
|
||||
/* Copyright 2015-2021 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_OSX,
|
||||
_NIXQWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
OSX,
|
||||
NIXQWERTY,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
BACKLIT,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl |Brite | Alt | GUI |Raise | Space |Lower | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* OSX - Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | CMD |Brite | Alt | CTRL |Raise | Space |Lower | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_OSX] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LGUI, BACKLIT, KC_LALT, KC_LCTL, RAISE, KC_SPC, KC_SPC, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_planck_grid(
|
||||
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
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_planck_grid(
|
||||
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
|
||||
),
|
||||
|
||||
/* NixQwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl |Brite | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NIXQWERTY] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_planck_grid(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_planck_grid(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_PLOVER] = LAYOUT_planck_grid(
|
||||
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 (Lower + Raise)
|
||||
* v------------------------RGB CONTROL--------------------v
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|NixQty| OSX |Plover|Colemk|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_planck_grid(
|
||||
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL,
|
||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, NIXQWERTY, OSX, PLOVER, COLEMAK,
|
||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, DVORAK, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case OSX:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_OSX);
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NIXQWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_NIXQWERTY);
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
#ifdef KEYBOARD_planck_rev5
|
||||
writePinLow(E6);
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
#ifdef KEYBOARD_planck_rev5
|
||||
writePinHigh(E6);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#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_SONG(plover_gb_song);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool muse_mode = false;
|
||||
uint8_t last_muse_note = 0;
|
||||
uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
muse_offset++;
|
||||
} else {
|
||||
muse_offset--;
|
||||
}
|
||||
} else {
|
||||
if (clockwise) {
|
||||
muse_tempo+=1;
|
||||
} else {
|
||||
muse_tempo-=1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (clockwise) {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
#else
|
||||
tap_code(KC_PGDN);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
tap_code(KC_MS_WH_UP);
|
||||
#else
|
||||
tap_code(KC_PGUP);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
static bool play_sound = false;
|
||||
#endif
|
||||
if (active) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (play_sound) { PLAY_SONG(plover_song); }
|
||||
#endif
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (play_sound) { PLAY_SONG(plover_gb_song); }
|
||||
#endif
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
#ifdef AUDIO_ENABLE
|
||||
play_sound = true;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
if (active) {
|
||||
muse_mode = true;
|
||||
} else {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
if (muse_mode) {
|
||||
if (muse_counter == 0) {
|
||||
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
||||
if (muse_note != last_muse_note) {
|
||||
stop_note(compute_freq_for_midi_note(last_muse_note));
|
||||
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
||||
last_muse_note = muse_note;
|
||||
}
|
||||
}
|
||||
muse_counter = (muse_counter + 1) % muse_tempo;
|
||||
} else {
|
||||
if (muse_counter) {
|
||||
stop_all_notes();
|
||||
muse_counter = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
3
keyboards/planck/keymaps/foreveranapple/readme.md
Normal file
3
keyboards/planck/keymaps/foreveranapple/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# The Almost Default Planck Layout
|
||||
|
||||
Simple changes right now, just some key shifts. Nothing major.
|
||||
2
keyboards/planck/keymaps/foreveranapple/rules.mk
Normal file
2
keyboards/planck/keymaps/foreveranapple/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
SRC += muse.c
|
||||
AUDIO_ENABLED = yes
|
||||
@@ -4,7 +4,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
@@ -137,7 +137,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RIGHT)) {
|
||||
if (clockwise) {
|
||||
@@ -167,9 +167,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -198,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -279,7 +279,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -309,9 +309,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -340,6 +341,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -1,39 +1,27 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
/* Copyright 2021 Gun Pinyo
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
/* Tapping this number of times holds the key until tapped once again. */
|
||||
#define ONESHOT_TAP_TOGGLE 7
|
||||
/* Time (in ms) before the one shot key is released */
|
||||
#define ONESHOT_TIMEOUT 5000
|
||||
|
||||
/* Audio */
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
/* Copyright 2021 Gun Pinyo
|
||||
*
|
||||
* 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
|
||||
@@ -14,8 +14,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* modified by Gun Pinyo */
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
@@ -25,141 +23,276 @@ enum planck_layers {
|
||||
LY_0100, LY_0101, LY_0110, LY_0111,
|
||||
LY_1000, LY_1001, LY_1010, LY_1011,
|
||||
LY_1100, LY_1101, LY_1110, LY_1111,
|
||||
LY_THAI_A, LY_THAI_B, LY_THAI_C,
|
||||
LY_SANDBOX, LY_STICK,
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
FN_A = SAFE_RANGE,
|
||||
FN_B,
|
||||
FN_C,
|
||||
FN_D,
|
||||
MIN_KC = SAFE_RANGE,
|
||||
FUNC_A, FUNC_B, FUNC_C, FUNC_D,
|
||||
SANDBOX, STICK,
|
||||
LTHAI_A, LTHAI_B, LTHAI_C,
|
||||
LSW0110, LSW1111, LSW0100,
|
||||
USER_NAME, USER_EMAIL,
|
||||
MAX_KC,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
#define KC_L2_0 KC_LSFT
|
||||
#define KC_L3_0 KC_LCTL
|
||||
#define KC_L3_1 KC_LALT
|
||||
#define KC_L3_2 KC_LGUI
|
||||
|
||||
#define MFN_R1 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define MFN_R2 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
#define MFN_R3 XXXXXXX, FN_A, FN_B, FN_C, XXXXXXX, XXXXXXX
|
||||
#define MFN_R4 XXXXXXX, KC_LCTL, KC_LSFT, KC_LALT, FN_D, XXXXXXX
|
||||
#define UNUSED_LAYER {\
|
||||
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R1},\
|
||||
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R2},\
|
||||
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R3},\
|
||||
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MFN_R4}},
|
||||
#define MC(kc) LCTL(kc)
|
||||
#define MA(kc) LALT(kc)
|
||||
#define MG(kc) LGUI(kc) // ModGui, for i3 shortcuts
|
||||
#define KC_R2_1 FUNC_A
|
||||
#define KC_R2_2 FUNC_B
|
||||
#define KC_R2_3 FUNC_C
|
||||
#define KC_R2_4 FUNC_D
|
||||
|
||||
#define KC_R2_5 KC_RSFT
|
||||
#define KC_R3_0 KC_R2_4
|
||||
#define KC_R3_1 KC_SPC
|
||||
|
||||
#define LAYOUT_gunp( k00, k01, k02, k03, k04, k05, \
|
||||
k10, k11, k12, k13, k14, k15, \
|
||||
k20, k21, k22, k23, k24, k25, \
|
||||
k30, k31, k32, k33, k34, k35) \
|
||||
LAYOUT_ortho_4x12( \
|
||||
k00,k01,k02,k03,k04,k05, LSW0110, KC_LEFT, KC_BSPC, KC_RIGHT,XXXXXXX, XXXXXXX,\
|
||||
k10,k11,k12,k13,k14,k15, LSW1111, LTHAI_A, LTHAI_B, LTHAI_C, XXXXXXX, XXXXXXX,\
|
||||
k20,k21,k22,k23,k24,k25, LSW0100, KC_R2_1, KC_R2_2, KC_R2_3, KC_R2_4, KC_R2_5,\
|
||||
k30,k31,k32,k33,k34,k35, KC_R3_0, KC_R3_1, KC_ENT, KC_RGUI, KC_RALT, KC_RCTL)
|
||||
|
||||
#define UNUSED_LAYER LAYOUT_gunp(\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX),
|
||||
|
||||
#define F1_F12_LAYER(M) LAYOUT_gunp(\
|
||||
S(M(KC_F7 )), S(M(KC_F8 )), M(KC_F7 ), M(KC_F8 ), M(KC_F9 ), S(M(KC_F9 )),\
|
||||
S(M(KC_F4 )), S(M(KC_F5 )), M(KC_F4 ), M(KC_F5 ), M(KC_F6 ), S(M(KC_F6 )),\
|
||||
S(M(KC_F1 )), S(M(KC_F2 )), M(KC_F1 ), M(KC_F2 ), M(KC_F3 ), S(M(KC_F3 )),\
|
||||
S(M(KC_F10)), S(M(KC_F11)), M(KC_F10), M(KC_F11), M(KC_F12), S(M(KC_F12))),
|
||||
|
||||
#define MC(kc) LCTL(kc)
|
||||
#define MA(kc) LALT(kc)
|
||||
#define MG(kc) LGUI(kc)
|
||||
#define MSC(kc) LSFT(LCTL(kc))
|
||||
#define MSA(kc) LSFT(LALT(kc))
|
||||
#define MCA(kc) LCTL(LALT(kc))
|
||||
#define XX XXXXXXX
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[LY_0000] = LAYOUT_planck_grid(
|
||||
KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB,
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, FN_A, FN_B, FN_C, XX, KC_LSFT,
|
||||
XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX
|
||||
[LY_0000] = LAYOUT_ortho_4x12(
|
||||
KC_PGUP, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB,
|
||||
KC_PGDN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, STICK,
|
||||
KC_L2_0, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M,
|
||||
KC_R2_1, KC_R2_2, KC_R2_3, KC_UP, KC_R2_5,
|
||||
KC_L3_0, KC_L3_1, KC_L3_2, KC_ESCAPE, KC_BSPACE, KC_ENTER,
|
||||
KC_R3_0, KC_R3_1, KC_PSCREEN, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
[LY_1000] = LAYOUT_planck_grid(
|
||||
UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1,
|
||||
UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2,
|
||||
KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4,
|
||||
[LY_1000] = LAYOUT_gunp(
|
||||
XXXXXXX, KC_PERC, KC_QUES, KC_EXLM, KC_GRV, XXXXXXX,
|
||||
XXXXXXX, KC_AT, KC_COMM, KC_DOT, KC_QUOT, KC_EQL,
|
||||
KC_L2_0, KC_DLR, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS,
|
||||
KC_L3_0, KC_L3_1, KC_L3_2, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[LY_0010] = LAYOUT_planck_grid(
|
||||
UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1,
|
||||
UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2,
|
||||
UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4,
|
||||
[LY_0010] = LAYOUT_gunp(
|
||||
XXXXXXX, KC_AMPR, KC_PIPE, KC_TILD, KC_CIRC, XXXXXXX,
|
||||
XXXXXXX, KC_LCBR, KC_LBRC, KC_LPRN, KC_LT, KC_SLSH,
|
||||
KC_L2_0, KC_RCBR, KC_RBRC, KC_RPRN, KC_GT, KC_BSLS,
|
||||
KC_L3_0, KC_L3_1, KC_L3_2, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[LY_1010] = LAYOUT_planck_grid(
|
||||
UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1,
|
||||
UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2,
|
||||
UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3,
|
||||
UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4
|
||||
[LY_1010] = LAYOUT_gunp(
|
||||
XXXXXXX, KC_HASH, KC_7, KC_8, KC_9, XXXXXXX,
|
||||
XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_PLUS,
|
||||
KC_L2_0, KC_0, KC_1, KC_2, KC_3, KC_MINS,
|
||||
KC_L3_0, KC_L3_1, KC_L3_2, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[LY_0100] = LAYOUT_planck_grid(
|
||||
KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1,
|
||||
KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2,
|
||||
KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3,
|
||||
KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4,
|
||||
[LY_0100] = LAYOUT_gunp(
|
||||
XXXXXXX, MC(KC_G), KC_HOME, KC_UP, KC_END, MC(KC_UP),
|
||||
XXXXXXX, KC_PGUP, KC_LEFT, KC_DOWN, KC_RIGHT, MC(KC_DOWN),
|
||||
XXXXXXX, KC_PGDN, MC(KC_S), MC(KC_A), MC(KC_Z), MSC(KC_Z),
|
||||
XXXXXXX, XXXXXXX, MC(KC_LEFT), MC(KC_F), MC(KC_RIGHT), XXXXXXX
|
||||
),
|
||||
[LY_1100] = LAYOUT_planck_grid(
|
||||
KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1,
|
||||
KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2,
|
||||
KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3,
|
||||
KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4,
|
||||
[LY_1100] = LAYOUT_gunp(
|
||||
XXXXXXX, MSC(KC_G), S(KC_HOME), S(KC_UP), S(KC_END), MSC(KC_UP),
|
||||
XXXXXXX, S(KC_PGUP), S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), MSC(KC_DOWN),
|
||||
XXXXXXX, S(KC_PGDN), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L),
|
||||
XXXXXXX, XXXXXXX, MSC(KC_LEFT), MC(KC_R), MSC(KC_RIGHT), XXXXXXX
|
||||
),
|
||||
[LY_0110] = LAYOUT_planck_grid(
|
||||
MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1,
|
||||
MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2,
|
||||
MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3,
|
||||
MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4
|
||||
[LY_0110] = F1_F12_LAYER()
|
||||
[LY_1110] = F1_F12_LAYER(MG)
|
||||
|
||||
[LY_0001] = LAYOUT_gunp(
|
||||
MC(KC_H), MC(KC_0), MSC(KC_PGUP), KC_BRIU, MSC(KC_PGDN), KC_VOLU,
|
||||
MSC(KC_T), MC(KC_PLUS), MC(KC_PGUP), KC_BRID, MC(KC_PGDN), KC_VOLD,
|
||||
OSM(MOD_LSFT), MC(KC_MINS), MA(KC_LEFT), MC(KC_T), MA(KC_RIGHT), KC_MUTE,
|
||||
OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), MC(KC_W), KC_DELETE, KC_APP
|
||||
),
|
||||
[LY_1110] = LAYOUT_planck_grid(
|
||||
MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1,
|
||||
MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2,
|
||||
MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3,
|
||||
MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4
|
||||
[LY_1101] = LAYOUT_gunp(
|
||||
SANDBOX, XXXXXXX, AU_TOG, KC_LOCK, RGB_TOG, RESET,
|
||||
KC_WAKE, KC_CLCK, USER_NAME, USER_EMAIL, RGB_MOD, DEBUG,
|
||||
KC_SLEP, KC_NLCK, DM_REC1, DM_PLY1, XXXXXXX, EEP_RST,
|
||||
KC_PWR, KC_SLCK, DM_REC2, DM_PLY2, DM_RSTP, KC_INSERT
|
||||
),
|
||||
[LY_1111] = LAYOUT_planck_grid(
|
||||
KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1,
|
||||
KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2,
|
||||
KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3,
|
||||
KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4,
|
||||
[LY_1111] = LAYOUT_gunp(
|
||||
KC_ACL1, KC_ACL0, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
|
||||
KC_ACL2, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
|
||||
KC_MPRV, KC_BTN5, KC_MRWD, KC_MPLY, KC_MFFD, KC_BTN3,
|
||||
KC_MNXT, KC_BTN4, KC_PAUSE, KC_MSTP, KC_BTN1, KC_BTN2
|
||||
),
|
||||
[LY_1101] = LAYOUT_planck_grid(
|
||||
XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1,
|
||||
XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2,
|
||||
XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3,
|
||||
XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4,
|
||||
),
|
||||
[LY_0011] = LAYOUT_planck_grid(
|
||||
UC(L'็'), UC(L'์'), UC(L'่'), UC(L'้'), UC(L'๊'), UC(L'๋'), MFN_R1,
|
||||
UC(L'โ'), UC(L'แ'), UC(L'เ'), UC(L'า'), UC(L'ั'), UC(L'ะ'), MFN_R2,
|
||||
UC(L'ไ'), UC(L'ใ'), UC(L'ิ'), UC(L'ี'), UC(L'ึ'), UC(L'ื'), MFN_R3,
|
||||
UC(L'ๅ'), UC(L'ฺ'), UC(L'ํ'), UC(L'ุ'), UC(L'ู'), UC(L'ำ'), MFN_R4,
|
||||
),
|
||||
[LY_1011] = LAYOUT_planck_grid(
|
||||
UC(L'ฐ'), UC(L'ฎ'), UC(L'ฏ'), UC(L'ฮ'), UC(L'ข'), UC(L'ฃ'), MFN_R1,
|
||||
UC(L'ถ'), UC(L'ด'), UC(L'ต'), UC(L'อ'), UC(L'ก'), UC(L'จ'), MFN_R2,
|
||||
UC(L'ภ'), UC(L'บ'), UC(L'ป'), UC(L'ส'), UC(L'ห'), UC(L'ฉ'), MFN_R3,
|
||||
UC(L'ฯ'), UC(L'ผ'), UC(L'ฝ'), UC(L'ศ'), UC(L'ษ'), UC(L'ๆ'), MFN_R4,
|
||||
),
|
||||
[LY_0111] = LAYOUT_planck_grid(
|
||||
UC(L'ฒ'), UC(L'ฤ'), UC(L'ฦ'), UC(L'ม'), UC(L'ค'), UC(L'ฅ'), MFN_R1,
|
||||
UC(L'ณ'), UC(L'ร'), UC(L'ล'), UC(L'น'), UC(L'ว'), UC(L'ง'), MFN_R2,
|
||||
UC(L'ญ'), UC(L'ช'), UC(L'ซ'), UC(L'ย'), UC(L'ท'), UC(L'ฑ'), MFN_R3,
|
||||
UC(L'ฌ'), UC(L'ฬ'), UC(L'ฟ'), UC(L'พ'), UC(L'ธ'), UC(L'ฆ'), MFN_R4,
|
||||
),
|
||||
[LY_0001] = UNUSED_LAYER
|
||||
[LY_0101] = UNUSED_LAYER
|
||||
[LY_0111] = UNUSED_LAYER
|
||||
[LY_1011] = UNUSED_LAYER
|
||||
|
||||
[LY_1001] = UNUSED_LAYER
|
||||
[LY_0101] = UNUSED_LAYER
|
||||
[LY_0011] = UNUSED_LAYER
|
||||
|
||||
/* mapping from US QWERTY to TH Kedmanee */
|
||||
[LY_THAI_A] = LAYOUT_gunp(
|
||||
S(KC_G), KC_PIPE, KC_8, KC_COMM, S(KC_A), KC_QUES,
|
||||
S(KC_I), KC_SCLN, KC_QUOT, KC_O, KC_I, KC_RBRC,
|
||||
S(KC_P), S(KC_T), KC_M, KC_P, KC_EQL, KC_COLN,
|
||||
KC_LT, S(KC_S), S(KC_R), KC_GT, KC_R, KC_A
|
||||
),
|
||||
[LY_THAI_B] = LAYOUT_gunp(
|
||||
S(KC_N), S(KC_H), KC_J, KC_H, S(KC_U), S(KC_J),
|
||||
S(KC_F), KC_C, KC_G, KC_K, KC_Y, KC_T,
|
||||
KC_DOT, KC_W, KC_B, KC_U, KC_7, KC_N,
|
||||
KC_1, S(KC_B), S(KC_Y), KC_E, KC_6, KC_CIRC
|
||||
),
|
||||
[LY_THAI_C] = LAYOUT_gunp(
|
||||
KC_4, KC_BSLS, KC_MINS, S(KC_V), S(KC_E), S(KC_D),
|
||||
KC_5, KC_0, KC_D, KC_V, KC_F, KC_9,
|
||||
S(KC_L), S(KC_K), KC_L, KC_S, KC_LBRC, KC_X,
|
||||
S(KC_O), KC_Q, KC_LCBR, S(KC_C), KC_Z, KC_SLSH
|
||||
),
|
||||
[LY_SANDBOX] = LAYOUT_ortho_4x12(
|
||||
KC_LCBR, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_RCBR,
|
||||
KC_LBRC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_RBRC,
|
||||
KC_LPRN,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_M,KC_COMM,KC_DOT,KC_SCLN,KC_COLN,KC_RPRN,
|
||||
KC_LT , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GT
|
||||
),
|
||||
[LY_STICK] = UNUSED_LAYER // as a gateway to other persistant layers
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#define NUM_LANGS 2
|
||||
#define LANG_ENG 0
|
||||
#define LANG_THAI 1
|
||||
|
||||
uint16_t cur_layer = LY_0000;
|
||||
uint16_t cur_lang = LANG_ENG;
|
||||
bool is_layer_persistant = false;
|
||||
|
||||
void change_layer(uint16_t new_layer) {
|
||||
if(cur_layer != new_layer) {
|
||||
layer_off(cur_layer);
|
||||
layer_on(new_layer);
|
||||
cur_layer = new_layer;
|
||||
}
|
||||
}
|
||||
|
||||
void change_lang(uint16_t lang) {
|
||||
while(lang != cur_lang) {
|
||||
SEND_STRING(SS_LGUI(" "));
|
||||
cur_lang = (cur_lang + 1) % NUM_LANGS;
|
||||
}
|
||||
}
|
||||
|
||||
void user_panic(void) {
|
||||
SEND_STRING("Planck Keyboard: User Panic!");
|
||||
}
|
||||
|
||||
void update_env_thai(void) {
|
||||
if(LY_THAI_A <= cur_layer && cur_layer <= LY_THAI_C) {
|
||||
change_lang(LANG_THAI);
|
||||
} else {
|
||||
change_lang(LANG_ENG);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t get_persistant_layer_from_keycode(uint16_t keycode) {
|
||||
switch(keycode) {
|
||||
case FUNC_A: return LY_1000;
|
||||
case FUNC_B: return LY_1010;
|
||||
case FUNC_C: return LY_0010;
|
||||
case FUNC_D: return LY_0000;
|
||||
case LTHAI_A: return LY_THAI_A;
|
||||
case LTHAI_B: return LY_THAI_B;
|
||||
case LTHAI_C: return LY_THAI_C;
|
||||
case LSW0110: return LY_0110;
|
||||
case LSW1111: return LY_1111;
|
||||
case LSW0100: return LY_0100;
|
||||
}
|
||||
return 0; // this line is unreachable but be here to make the complier happy
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
if(!is_layer_persistant && FUNC_A <= keycode && keycode <= FUNC_D) {
|
||||
uint16_t mask = 1 << (3 - (keycode - FUNC_A));
|
||||
uint16_t cur_layer_code = cur_layer - LY_0000;
|
||||
if(!(LY_0000 <= cur_layer && cur_layer <= LY_1111))
|
||||
user_panic();
|
||||
if(!(cur_layer_code & mask) == record->event.pressed)
|
||||
change_layer((mask ^ cur_layer_code) + LY_0000);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!(record->event.pressed))
|
||||
return !(MIN_KC <= keycode && keycode <= MAX_KC);
|
||||
|
||||
switch(keycode) {
|
||||
case USER_NAME:
|
||||
SEND_STRING("Gun Pinyo");
|
||||
return false;
|
||||
|
||||
case USER_EMAIL:
|
||||
SEND_STRING("gunpinyo@gmail.com");
|
||||
return false;
|
||||
|
||||
case SANDBOX:
|
||||
case STICK:
|
||||
change_layer(keycode == STICK ? LY_STICK : LY_SANDBOX);
|
||||
change_lang(LANG_ENG);
|
||||
is_layer_persistant = true;
|
||||
return false;
|
||||
|
||||
case FUNC_A: case FUNC_B: case FUNC_C: case FUNC_D:
|
||||
case LTHAI_A: case LTHAI_B: case LTHAI_C:
|
||||
case LSW0110: case LSW1111: case LSW0100:
|
||||
if(is_layer_persistant) {
|
||||
change_layer(get_persistant_layer_from_keycode(keycode));
|
||||
update_env_thai();
|
||||
// `FUNC_D` resets the layer configuration when `is_layer_persistant`
|
||||
is_layer_persistant = keycode != FUNC_D;
|
||||
if(!is_layer_persistant) {
|
||||
clear_keyboard();
|
||||
layer_clear();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void rgb_matrix_indicators_kb(void) {
|
||||
// `42` is the index of the middle light at the bottom row (in planck light)
|
||||
// it is disabled because it does not have a cover, hence irritates my eyes
|
||||
rgb_matrix_set_color(42, 0, 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint16_t cur_layer_code = 0;
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
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);
|
||||
float tone_ly_normal[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_ly_spacial[][2] = SONG(DVORAK_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
#endif
|
||||
|
||||
void startup_user() {
|
||||
_delay_ms(20); // gets rid of tick
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_startup);
|
||||
#endif
|
||||
@@ -168,22 +301,6 @@ void startup_user() {
|
||||
void shutdown_user() {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t mask = 1 << (3 - (keycode - FN_A));
|
||||
if (!process_record_dynamic_macro(keycode, record))
|
||||
return false;
|
||||
if(FN_A <= keycode && keycode <= FN_D) {
|
||||
if(!(cur_layer_code & mask) == record->event.pressed) {
|
||||
layer_off(cur_layer_code + LY_0000);
|
||||
cur_layer_code ^= mask;
|
||||
layer_on(cur_layer_code + LY_0000);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,24 +1,78 @@
|
||||
# GunP Planck Layout
|
||||
## TODO:
|
||||
- fix the problem between builtin dynamic macros
|
||||
and my custom layout switching mechanism.
|
||||
- implement Thai layers.
|
||||
```
|
||||
{8| Gun Pinyo |8} "with no modifiers or with Shift" {8| Gun Pinyo |8}
|
||||
{0| Del | Q | W | F | P | G | J | L | U | Y | K | Tab |0}
|
||||
{0|BkSpc| A | R | S | T | D | H | N | E | I | O |Enter|0}
|
||||
{0|Shift| Z | X | C | V | B | M |FN_A |FN_B |FN_C |FN_D |Shift|0}
|
||||
{0| XXX | F21 | F22 | Esc |Space| F23 | F24 | Ctr |Shift| Alt | Gui | XXX |0}
|
||||

|
||||
|
||||
{8| "with FN_A" |8} {8| "with FN_A, FN_C" |8} {8| "with FN_C" |8}
|
||||
{0| ∃ / } ) ] > |0} {0| ⊗ ⊕ 7 8 9 ┻ |0} {0| × * ? ! ` # |0}
|
||||
{0| ∀ \ { ( [ < |0} {0| ⊚ 0 1 2 3 ┃ |0} {0| → - , .\' = |0}
|
||||
{0| & | @ ~ $ ^ |0} {0| ┏ ┓ 4 5 6 ┳ |0} {0| ∘ + ; :\" _ |0}
|
||||
{0| F1 ..... F6 |0} {0| ┗ ┛ ┫ ━ ┣ ╋ |0} {0| F7 .... F12 |0}
|
||||
# gunp layout for Planck keyboards
|
||||
|
||||
* Layout Maintainer: [Gun Pinyo](https://github.com/gunpinyo)
|
||||
|
||||
This is my personal layout for Planck keyboards. Almost all of important
|
||||
information is already in the picture of the cheat sheet above. There is also a
|
||||
text-version of this cheat sheet at the end of this readme file. If both of them
|
||||
are not the same, then please trust the text-version more because the picture is
|
||||
just a screenshot of the text.
|
||||
|
||||
The base layer is `LY-0000`. Next, we custom keycodes called `FuncA`, `FuncB`,
|
||||
`FuncC`, and `FuncD` (`FuncX` for short) which will switch to layout `LY-ABCD`
|
||||
depending on the binary state of each `FuncX` where the corresponded binary
|
||||
digit is a boolean "keycode `FuncX` is currently being pressed". This mechanism
|
||||
allows us to access up to 16 different layers, however, only some of them have
|
||||
been used. A layer matches regex `LY-....` is currently used if and only if the
|
||||
cheat sheet mentions it.
|
||||
|
||||
Once each of these non-based layers activates (by a combination of `FuncX`
|
||||
keycodes):
|
||||
- the left-half (rows 0-3, columns 0-5) will switch according to its
|
||||
individual keymap on cheat sheet,
|
||||
- the right-half (rows 0-3, columns 6-11) will switch to the `RIGHT-HALF`
|
||||
keymap such that keycodes that matches the regex `(L....|Thai[ABC])` are
|
||||
disabled and (partially) being replaced by `FuncX` keycodes on the same
|
||||
position of the base layer and keycodes in binary numbers there are
|
||||
disabled.
|
||||
|
||||
Another keycode in the base layer is `Stick`. When it is press, the rules of
|
||||
keyboard change into persistent mode. Here, the right-half is exactly the
|
||||
`RIGHT-HALF` keymap in the cheat sheet. Keycodes in left-half are all no-op
|
||||
initially and can be changed to other layers by tapping on the corresponded
|
||||
keycodes `(L....|Thai[ABC])`. To switch back to the normal rules governed by
|
||||
`FuncX` press a `Relax` keycode.
|
||||
|
||||
Remark:
|
||||
- Layers `LY-Thai[ABC]` are only accessible via persistent mode.
|
||||
- This layout doesn't employ any transparent keycode, therefore, empty
|
||||
keycodes (including dummy keycodes `XXX`) are all no-op.
|
||||
- Prefixes `S-`, `C-`, `A-`, and `G-` are combinators for `sft-🠜`, `ctl-🠜`,
|
||||
`alt-🠜`, and `gui-🠜`, respectively.
|
||||
- All keycodes that starts with a capital letter are custom keycodes. Except
|
||||
single letters which stand for their alphabet.
|
||||
- There is a conflict with dynamic macro (QMK's feature) with my layer
|
||||
switching mechanisms, so I disable it but keep its keycodes there for later
|
||||
implementation.
|
||||
|
||||
{8| "with FN_ACD" |8} {8| "with FN_CD" |8} {8| "with FN_BCD" |8}
|
||||
{0| ฐ ฎ ฏ ฮ ข ฃ |0} {0| ็ ์ ่ ้ ๊ ๋ |0} {0| ฒ ฤ ฦ ม ค ฅ |0}
|
||||
{0| ถ ด ต อ ก จ |0} {0| โ แ เ า ั ะ |0} {0| ณ ร ล น ว ง |0}
|
||||
{0| ภ บ ป ส ห ฉ |0} {0| ไ ใ ิ ี ึ ื |0} {0| ญ ช ซ ย ท ฑ |0}
|
||||
{0| ฯ ผ ฝ ศ ษ ๆ |0} {0| ๅ ฺ ํ ุ ู ำ |0} {0| ฌ ฬ ฟ พ ธ ฆ |0}
|
||||
```
|
||||
{H| "LY-0000": base-layer -- "`[🠝]` here becomes `FuncD` in other layers" |H} {H| "RIGHT-HALF": "when `Stick` is on" |H}
|
||||
{8| pgup| Q | W | F | P | G | J | L | U | Y | K | tab |8} {8| L0110| [🠜] |bkspc| [🠞] | XXX | XXX |8}
|
||||
{8| pgdn| A | R | S | T | D | H | N | E | I | O |Stick|8} {8| L1111|ThaiA|ThaiB|ThaiC| XXX | XXX |8}
|
||||
{8|sft-🠜| Z | X | C | V | B | M |FuncA|FuncB|FuncC| [🠝] |sft-🠞|8} {8| L0100|L1000|L1010|L0010|Relax|sft-🠞 |8}
|
||||
{8|ctl-🠜|alt-🠜|gui-🠜| esc |bkspc|enter|FuncD|space|print| [🠜] | [🠟] | [🠞] |8} {8| Relax|space|enter|gui-🠞|alt-🠞|ctl-🠞 |8}
|
||||
|
||||
{H| "LY-0100": "col0 as no-op" |H} {H| "LY-1101" -- "Email: gunpinyo@gmail.com" |H} {x| "LY-0110" -- "gunpinyo" |x}
|
||||
{8| C-G home [🠝] end C-[🠝] |8} {8| Sandbox XXX AudTog KeyLock RgbTog QmkReset |8} {✜| S-f7 S-f8 f7 f8 f9 S-f9 |✜}
|
||||
{8| pgup [🠜] [🠟] [🠞] C-[🠟] |8} {8| wake caplock MyName Email RgbMod QmkDebug |8} {✜| S-f4 S-f5 f4 f5 f6 S-f6 |✜}
|
||||
{8| pgdn C-S C-A C-Z SC-Z |8} {8| sleep numlock DmRec1 DmPlay1 XXX QmkEepRst |8} {✜| S-f1 S-f2 f1 f2 f3 S-f3 |✜}
|
||||
{8| C-[🠜] C-F C-[🠞] |8} {8| power scrlock DmRec2 DmPlay2 DmStop insert |8} {✜|S-f10 S-f11 f10f11f12 S-f12|✜}
|
||||
|
||||
{8| "LY-1000" |8} {8| "LY-1010" |8} {8| "LY-0010" |8} {H| "LY-1111" - "powered by QMK firmware" |H}
|
||||
{H| % ? ! ` |H} {H| # 7 8 9 |H} {H| & | ~ ^ |H} {8| msAC1 msAC0 scr-🠜 mov-🠝 scr-🠞 scr-🠝 |8}
|
||||
{H| @ , . ' = |H} {H| * 4 5 6 + |H} {H| { [ ( < / |H} {8| msAC2 XXX mov-🠜 mov-🠟 mov-🠞 scr-🠟 |8}
|
||||
{H| $ ; : \" _ |H} {H| 0 1 2 3 - |H} {H| } ] ) > \ |H} {8| mPrev btn-🠝 mRWD mPlay mFFD btn-✜ |8}
|
||||
{8| mNext btn-🠟 pause mStop btn-🠜 btn-🠞 |8}
|
||||
1. evdev pc105 (US: qwerty, TH: kedmanee) 5. "LY-1110" is `G-`+"LY-0110"
|
||||
2. `G-space` is used to switch XKB layout 6. "LY-1100" is `S-`+"LY-0100" except [C-S, C-A, C-Z, SC-Z, C-F] which become
|
||||
3. when `Stick` is off, layer switchers other than `FuncX` are disabled [C-X, C-C, C-V, C-L, C-R] respectively
|
||||
4. ["LY-1000", "LY-1010", "LY-0010"] omit col0 and row3, but they have all `mod-🠜` from the base-layer, the rest are no-op
|
||||
|
||||
{H| "LY-0001" -- "`mod#🠜` is oneshot-mod" |H} {8| "LY-ThaiA" |8} {8| "LY-ThaiB" |8} {8| "LY-ThaiC" |8}
|
||||
{8| C-H C-0 SC-pgup bri-🠝 SC-pgdn vol-🠝 |8} {H| ฌ ฅ ค ม ฤ ฦ |H} {H| ์ ็ ่ ้ ๊ ๋ |H} {H| ภ ฃ ข ฮ ฎ ฏ |H}
|
||||
{8| SC-T C-[+] C-pgup bri-🠟 C-pgdn vol-🠟 |8} {H| ณ ว ง น ร ล |H} {H| โ แ เ า ั ะ |H} {H| ถ จ ก อ ด ต |H}
|
||||
{8| sft#🠜 C-[-] A-[🠜] C-T A-[🠞] vol-✜ |8} {H| ญ ธ ท ย ชซ |H} {H| ใ ไ ิ ี ึ ื |H} {H| ศ ษ ส ห บ ป |H}
|
||||
{8| ctl#🠜 alt#🠜 gui#🠜 C-W delete menu |8} {H| ฒ ฆ ฑ ฬ พฟ |H} {H| ๅ ฺ ํ ำ ุ ู |H} {H| ฯ ๆ ฐ ฉ ผ ฝ |H}
|
||||
```
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
# 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 = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if NKRO_ENABLE doesn't work, see here:
|
||||
# https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = yes # Audio output
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
||||
DEBOUNCE_TYPE = sym_defer_pk
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pushd ~/git-repos/qmk_firmware/
|
||||
rm -rf keyboards/planck/keymaps/gunp/
|
||||
cp -rf ~/Documents/qmk-planck/ keyboards/planck/keymaps/gunp/
|
||||
if [[ $1 == "dfu" ]]; then
|
||||
# sudo dfu-programmer atmega32u4 erase --force
|
||||
# sudo dfu-programmer atmega32u4 flash .build/planck_rev4_gunp.hex
|
||||
# sudo dfu-programmer atmega32u4 reset
|
||||
sudo make planck/rev4:gunp:dfu
|
||||
# bash ~/bin/gunp-kb-layout-reset
|
||||
else
|
||||
make planck/rev4:gunp:clean
|
||||
make planck/rev4:gunp:all
|
||||
fi
|
||||
popd
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
|
||||
BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # console for debug(+400)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
|
||||
BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = no # audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # console for debug(+400)
|
||||
|
||||
@@ -51,16 +51,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_planck_grid( /* Right */
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_planck_grid( /* Left */
|
||||
KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC,
|
||||
KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
@@ -89,7 +89,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@@ -119,9 +119,10 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
#ifdef AUDIO_ENABLE
|
||||
@@ -150,6 +151,7 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
|
||||
50
keyboards/planck/keymaps/inkwell/config.h
Normal file
50
keyboards/planck/keymaps/inkwell/config.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright 2021 Kevin Hartley
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
// Most tactile encoders have detents every 4 stages
|
||||
#define ENCODER_RESOLUTION 4
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 10
|
||||
#define MOUSEKEY_MAX_SPEED 12
|
||||
182
keyboards/planck/keymaps/inkwell/keymap.c
Normal file
182
keyboards/planck/keymaps/inkwell/keymap.c
Normal file
@@ -0,0 +1,182 @@
|
||||
/* Copyright 2015-2017 Jack Humbert
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ECDR | Ctrl | Alt | GUI |Space |Lower |Raise |Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_planck_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
RSFT_T(KC_MPLY), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, LOWER, RAISE, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* v-------NUM PAD------v
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | ! | @ | # | * | / | 7 | 8 | 9 | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Del | $ | % | ^ | + | - | 4 | 5 | 6 | [ | ] | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Shift | & | ? | : | ~ | . | 1 | 2 | 3 | < | > |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ECDR | Ctrl | Alt | GUI |Space |Lower |Raise | 0 | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_planck_grid(
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_ASTR, KC_PSLS, KC_7, KC_8, KC_9, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_ESC, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_LBRC, KC_RBRC, KC_PEQL,
|
||||
KC_LSFT, KC_AMPR, KC_QUES, KC_COLN, KC_TILD, KC_DOT, KC_1, KC_2, KC_3, KC_LABK, KC_RABK, KC_ENT,
|
||||
RSFT_T(KC_MPLY), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, LOWER, RAISE, KC_0, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |SLEEP | BR- | BR+ | << | PLAY | >> | MUTE | VOL- | VOL+ | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | " | \ | [ | ] | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Shift | F7 | F8 | F9 | F10 | F11 | F12 | ? | : | < | > |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ECDR | Ctrl | Alt | GUI |Space |Lower |Raise |Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_planck_grid(
|
||||
KC_SLEP, KC_BRID, KC_BRIU, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_DQT, KC_BSLS, KC_LBRC, KC_RBRC, KC_PEQL,
|
||||
KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_QUES, KC_COLN, KC_LABK, KC_RABK, KC_ENT,
|
||||
RSFT_T(KC_MPLY), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, LOWER, RAISE, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* v--------MOUSE CONTROL------v
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Reset | | | | | | |MSE-1 |MSE-2 |MSE-S0|MSE-S1| Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | CALC | MAIL | MDIA |Debug | | |MSE-L |MSE-D |MSE-U |MSE-R |RGB-TG|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Shift | | | | | | | | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ECDR | Ctrl | Alt | GUI |Space |Lower |Raise |Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_planck_grid(
|
||||
RESET, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_BTN2, KC_ACL1, KC_ACL2, KC_BSPC ,
|
||||
_______, KC_CALC, KC_MAIL, KC_MSEL, DEBUG, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, RGB_TOG,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT,
|
||||
RSFT_T(KC_MPLY), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, LOWER, RAISE, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (get_mods() & MOD_BIT(KC_RSFT)) {
|
||||
// ZOOM
|
||||
// Store which mods are held
|
||||
uint8_t mod_state = get_mods();
|
||||
// Ignore all shift keys
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
if (clockwise) {
|
||||
tap_code16(LGUI(KC_PPLS));
|
||||
} else {
|
||||
tap_code16(LGUI(KC_PMNS));
|
||||
}
|
||||
// Add back shift keys
|
||||
set_mods(mod_state);
|
||||
} else if (get_mods() & MOD_BIT(KC_LSFT)) {
|
||||
// SCROLL X
|
||||
uint8_t mod_state = get_mods();
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
if (clockwise) {
|
||||
tap_code16(KC_WH_L);
|
||||
} else {
|
||||
tap_code16(KC_WH_R);
|
||||
}
|
||||
set_mods(mod_state);
|
||||
} else {
|
||||
// SCROLL Y
|
||||
if (clockwise) {
|
||||
tap_code(KC_WH_U);
|
||||
} else {
|
||||
tap_code(KC_WH_D);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (get_mods() & MOD_BIT(KC_RSFT)) {
|
||||
// ZOOM
|
||||
uint8_t mod_state = get_mods();
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
if (clockwise) {
|
||||
tap_code16(LGUI(KC_PPLS));
|
||||
} else {
|
||||
tap_code16(LGUI(KC_PMNS));
|
||||
}
|
||||
set_mods(mod_state);
|
||||
} else if (get_mods() & MOD_BIT(KC_LSFT)) {
|
||||
// BRIGHTNESS
|
||||
uint8_t mod_state = get_mods();
|
||||
del_mods(MOD_MASK_SHIFT);
|
||||
if (clockwise) {
|
||||
tap_code16(KC_PAUSE);
|
||||
} else {
|
||||
tap_code16(KC_SCROLLLOCK);
|
||||
}
|
||||
set_mods(mod_state);
|
||||
} else {
|
||||
// VOLUME
|
||||
if (clockwise) {
|
||||
tap_code(KC__VOLUP);
|
||||
} else {
|
||||
tap_code(KC__VOLDOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
19
keyboards/planck/keymaps/inkwell/readme.md
Normal file
19
keyboards/planck/keymaps/inkwell/readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# The Inkwell Planck Layout
|
||||
|
||||
*/
|
||||
Plank keymap with Base, Lower, Raise, and Adjust layers, and 1 encoder.
|
||||
|
||||
Features:
|
||||
- Number Pad
|
||||
- Symbol Pad
|
||||
- Function Pad
|
||||
- Programming utilities: ()[]{}<>
|
||||
- Mouse Control
|
||||
- Encoder:
|
||||
- Volume (default turn)
|
||||
- Brightness (shift+turn)
|
||||
- Scroll Y(RSE+turn)
|
||||
- Scroll X (RSE+shift+turn)
|
||||
- Zoom (push+turn)
|
||||
- Play/Pause (double click)
|
||||
/*
|
||||
3
keyboards/planck/keymaps/inkwell/rules.mk
Normal file
3
keyboards/planck/keymaps/inkwell/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
SRC += muse.c
|
||||
ENCODER_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
3
keyboards/planck/keymaps/ishtob/rule.mk → keyboards/planck/keymaps/ishtob/rules.mk
Executable file → Normal file
3
keyboards/planck/keymaps/ishtob/rule.mk → keyboards/planck/keymaps/ishtob/rules.mk
Executable file → Normal file
@@ -2,7 +2,7 @@
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
@@ -12,7 +12,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
AUDIO_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
# SERIAL_LINK_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user