mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-12-04 17:05:17 +00:00
Compare commits
4 Commits
c3c401f91d
...
be9f6e679b
Author | SHA1 | Date | |
---|---|---|---|
|
be9f6e679b | ||
|
b53356f7ab | ||
|
c402bac023 | ||
|
a030e8094f |
41
keyboards/crkbd/keymaps/md40/config.h
Normal file
41
keyboards/crkbd/keymaps/md40/config.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 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
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 300
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
38
keyboards/crkbd/keymaps/md40/keymap.c
Normal file
38
keyboards/crkbd/keymaps/md40/keymap.c
Normal file
@ -0,0 +1,38 @@
|
||||
// Copyright 2021 Shane Dowling (@shano)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
||||
#define KC_FN MO(_FN)
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_FN,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
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_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
KC_ESCC, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ESC ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
KC_LALT,KC_LGUI,KC_SPC , KC_ENTS,KC_FN,KC_FN
|
||||
// `----+----+----' `+---+----+----'c
|
||||
),
|
||||
[_FN] = LAYOUT(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
_______,KC_1, KC_2 ,KC_3, KC_4,KC_5, KC_6,KC_7,KC_8,KC_9,KC_0,KC_BSPC,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
_______,KC_EXCLAIM,KC_AT,KC_HASH,KC_DOLLAR,KC_PERCENT, KC_LEFT,KC_DOWN, KC_UP ,KC_RIGHT,KC_LBRC,KC_RBRC,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
_______, KC_CIRCUMFLEX , KC_AMPR , KC_ASTERISK , KC_LEFT_PAREN , KC_RIGHT_PAREN , KC_MINUS,KC_PLUS,KC_EQL,KC_PIPE,KC_GRAVE,KC_BACKSLASH,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
_______,_______,_______ , _______,_______,_______
|
||||
// `----+----+----' `----+----+----'
|
||||
)
|
||||
};
|
||||
|
19
keyboards/crkbd/keymaps/md40/readme.md
Normal file
19
keyboards/crkbd/keymaps/md40/readme.md
Normal file
@ -0,0 +1,19 @@
|
||||
# MD40: Minimally Disruptive 40% Keymap
|
||||
|
||||
This keymap is an attempt to go from a standard keyboard layout to a 40% keyboard with minimal disruption.
|
||||
|
||||
Some aims:
|
||||
- Two layers only
|
||||
- Existing keyboard positions where possible
|
||||
- Exceptions where it's not possible
|
||||
- Exceptions where it makes sense
|
||||
|
||||
Supports crkbd only.
|
||||
|
||||
## Base Layer
|
||||
|
||||
![Base Layer](https://i.imgur.com/hXLP6ush.png)
|
||||
|
||||
## Fn Layer
|
||||
|
||||
![Base Layer](https://i.imgur.com/Sozd1p8h.png)
|
8
keyboards/crkbd/keymaps/md40/rules.mk
Normal file
8
keyboards/crkbd/keymaps/md40/rules.mk
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
# 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 # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
NKRO_ENABLE = no # Enable N-Key Rollover
|
@ -7,3 +7,7 @@
|
||||
#define TAPPING_TERM 230
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
// Handle master/slave detection on low cost Promicro
|
||||
#ifdef __AVR__
|
||||
# define SPLIT_USB_DETECT
|
||||
#endif
|
||||
|
84
keyboards/gmmk/numpad/config.h
Normal file
84
keyboards/gmmk/numpad/config.h
Normal file
@ -0,0 +1,84 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
* Modified 2022 by rustedaperture for qmk_firmware
|
||||
*
|
||||
* 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 SLIDER_PIN B0
|
||||
#define MIDI_ADVANCED
|
||||
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define SPI_DRIVER SPIDQ
|
||||
#define SPI_SCK_PIN B3
|
||||
#define SPI_MOSI_PIN B5
|
||||
#define SPI_MISO_PIN B4
|
||||
|
||||
#define DRIVER_1_CS B12
|
||||
#define DRIVER_1_EN A15
|
||||
#define DRIVER_1_PW_EN B13
|
||||
|
||||
#define DRIVER_COUNT 1
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 31
|
||||
|
||||
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B6
|
||||
#define WEAR_LEVELING_BACKING_SIZE 2048
|
||||
|
||||
#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
|
||||
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
#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
|
26
keyboards/gmmk/numpad/halconf.h
Normal file
26
keyboards/gmmk/numpad/halconf.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
* Modified 2022 by rustedaperture for qmk_firmware
|
||||
*
|
||||
* 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 HAL_USE_SPI TRUE
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
#define HAL_USE_ADC TRUE
|
||||
|
||||
|
||||
#include_next <halconf.h>
|
51
keyboards/gmmk/numpad/info.json
Normal file
51
keyboards/gmmk/numpad/info.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"keyboard_name": "GMMK Numpad",
|
||||
"manufacturer": "Glorious",
|
||||
"url": "https://www.gloriousgaming.com/products/gmmk-numpad",
|
||||
"maintainer": "GloriousThrall",
|
||||
"usb": {
|
||||
"vid": "0x320F",
|
||||
"pid": "0x5088",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "A2", "pin_b": "A1"}
|
||||
]
|
||||
},
|
||||
"processor": "WB32F3G71",
|
||||
"bootloader": "wb32-dfu",
|
||||
"diode_direction": "ROW2COL",
|
||||
"matrix_pins": {
|
||||
"rows": ["A3", "A4", "A5", "A6", "A7"],
|
||||
"cols": ["B7", "B1", "B10", "B11"]
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label": "NUM", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "/", "matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"label": "*", "matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"label": "-", "matrix": [0, 3], "x": 3, "y": 0},
|
||||
|
||||
{"label": "7", "matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"label": "8", "matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"label": "9", "matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"label": "+", "matrix": [1, 3], "x": 3, "y": 1, "h": 2},
|
||||
|
||||
{"label": "4", "matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"label": "5", "matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"label": "6", "matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"label": "CALC", "matrix": [2, 3], "x": 3, "y": 2},
|
||||
|
||||
{"label": "1", "matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"label": "2", "matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"label": "3", "matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"label": "RET", "matrix": [3, 3], "x": 3, "y": 3, "h": 2},
|
||||
|
||||
{"label": "0", "matrix": [4, 0], "x": 0, "y": 4, "w": 2},
|
||||
{"label": ".", "matrix": [4, 3], "x": 3, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
60
keyboards/gmmk/numpad/keymaps/default/keymap.c
Normal file
60
keyboards/gmmk/numpad/keymaps/default/keymap.c
Normal file
@ -0,0 +1,60 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
* Modified 2022 by rustedaperture for qmk_firmware
|
||||
|
||||
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 "analog.h"
|
||||
#include "qmk_midi.h"
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// NUM / * -
|
||||
// 7 8 9 +
|
||||
// 4 5 6 ENCODER
|
||||
// 1 2 3 RET
|
||||
// 0 .
|
||||
|
||||
[0] = LAYOUT(
|
||||
MO(1), KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_P4, KC_P5, KC_P6, KC_CALC,
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_P0, KC_PDOT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
_______, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, RGB_VAI, KC_P9, KC_PPLS,
|
||||
RGB_RMOD, KC_P5, RGB_MOD, KC_CALC,
|
||||
KC_P1, RGB_VAD, KC_P3, KC_PENT,
|
||||
RGB_TOG, QK_BOOT
|
||||
)
|
||||
};
|
||||
|
||||
// Potentiometer Slider, MIDI Control
|
||||
|
||||
uint8_t divisor = 0;
|
||||
|
||||
void slider(void) {
|
||||
if (divisor++) { /* only run the slider function 1/256 times it's called */
|
||||
return;
|
||||
}
|
||||
midi_send_cc(&midi_device, 2, 0x3E, 0x7F + (analogReadPin(SLIDER_PIN) >> 3));
|
||||
}
|
||||
|
||||
void housekeeping_task_user(void) {
|
||||
slider();
|
||||
}
|
79
keyboards/gmmk/numpad/keymaps/via/keymap.c
Normal file
79
keyboards/gmmk/numpad/keymaps/via/keymap.c
Normal file
@ -0,0 +1,79 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
Modified 2022 by rustedaperture for qmk_firmware
|
||||
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 "analog.h"
|
||||
#include "qmk_midi.h"
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// NUM / * -
|
||||
// 7 8 9 +
|
||||
// 4 5 6 ENCODER
|
||||
// 1 2 3 RET
|
||||
// 0 .
|
||||
|
||||
[0] = LAYOUT(
|
||||
MO(1), KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_P4, KC_P5, KC_P6, KC_CALC,
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_P0, KC_PDOT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
_______, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, RGB_VAI, KC_P9, KC_PPLS,
|
||||
RGB_RMOD, KC_P5, RGB_MOD, KC_CALC,
|
||||
KC_P1, RGB_VAD, KC_P3, KC_PENT,
|
||||
RGB_TOG, QK_BOOT
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______
|
||||
),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }
|
||||
};
|
||||
|
||||
// Potentiometer Slider, MIDI Control
|
||||
|
||||
uint8_t divisor = 0;
|
||||
|
||||
void slider(void) {
|
||||
if (divisor++) { /* only run the slider function 1/256 times it's called */
|
||||
return;
|
||||
}
|
||||
midi_send_cc(&midi_device, 2, 0x3E, 0x7F + (analogReadPin(SLIDER_PIN) >> 3));
|
||||
}
|
||||
|
||||
void housekeeping_task_user(void) {
|
||||
slider();
|
||||
}
|
2
keyboards/gmmk/numpad/keymaps/via/rules.mk
Normal file
2
keyboards/gmmk/numpad/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
VIA_ENABLE=yes
|
||||
ENCODER_MAP_ENABLE=yes
|
133
keyboards/gmmk/numpad/matrix.c
Normal file
133
keyboards/gmmk/numpad/matrix.c
Normal file
@ -0,0 +1,133 @@
|
||||
// Copyright 2023 Cameron Varley (@RustedAperture)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
/*
|
||||
* scan matrix
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "debounce.h"
|
||||
#include "quantum.h"
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
||||
|
||||
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||
#define MATRIX_ROW_SHIFTER ((matrix_row_t)1)
|
||||
|
||||
static inline void setPinOutput_writeLow(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
setPinOutput(pin);
|
||||
writePinLow(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void setPinOutput_writeHigh(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
setPinOutput(pin);
|
||||
writePinHigh(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void setPinInputHigh_atomic(pin_t pin) {
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
setPinInputHigh(pin);
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint8_t readMatrixPin(pin_t pin) {
|
||||
if (pin != NO_PIN) {
|
||||
return readPin(pin);
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool select_col(uint8_t col) {
|
||||
pin_t pin = col_pins[col];
|
||||
if (pin != NO_PIN) {
|
||||
setPinOutput_writeLow(pin);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col) {
|
||||
pin_t pin = col_pins[col];
|
||||
if (pin != NO_PIN) {
|
||||
# ifdef MATRIX_UNSELECT_DRIVE_HIGH
|
||||
setPinOutput_writeHigh(pin);
|
||||
# else
|
||||
setPinInputHigh_atomic(pin);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
static void unselect_cols(void) {
|
||||
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
unselect_col(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__attribute__((weak)) void matrix_init_custom(void) {
|
||||
unselect_cols();
|
||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
if (row_pins[x] != NO_PIN) {
|
||||
setPinInputHigh_atomic(row_pins[x]);
|
||||
}
|
||||
}
|
||||
setPinInputHigh_atomic(B8);
|
||||
}
|
||||
|
||||
__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter) { // Start with a clear matrix row
|
||||
bool key_pressed = false;
|
||||
|
||||
// Select col
|
||||
if (!select_col(current_col)) { // select col
|
||||
return; // skip NO_PIN col
|
||||
}
|
||||
matrix_output_select_delay();
|
||||
|
||||
// For each row...
|
||||
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
|
||||
// Check row pin state
|
||||
if (current_col == 3 && row_index == 2 && readMatrixPin(B8) == 1) {
|
||||
current_matrix[row_index] |= row_shifter;
|
||||
key_pressed = !readMatrixPin(B8);
|
||||
} else if (readMatrixPin(row_pins[row_index]) == 0) {
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= row_shifter;
|
||||
key_pressed = true;
|
||||
} else {
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~row_shifter;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect col
|
||||
unselect_col(current_col);
|
||||
matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH
|
||||
}
|
||||
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
static matrix_row_t temp_matrix[MATRIX_ROWS] = {0};
|
||||
|
||||
matrix_row_t row_shifter = MATRIX_ROW_SHIFTER;
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
matrix_read_rows_on_col(temp_matrix, current_col, row_shifter);
|
||||
}
|
||||
|
||||
bool changed = memcmp(current_matrix, temp_matrix, sizeof(temp_matrix)) != 0;
|
||||
if (changed) {
|
||||
memcpy(current_matrix, temp_matrix, sizeof(temp_matrix));
|
||||
}
|
||||
return changed;
|
||||
}
|
26
keyboards/gmmk/numpad/mcuconf.h
Normal file
26
keyboards/gmmk/numpad/mcuconf.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
* Modified 2022 by rustedaperture for qmk_firmware
|
||||
*
|
||||
* 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_next <mcuconf.h>
|
||||
|
||||
#undef WB32_SPI_USE_QSPI
|
||||
#define WB32_SPI_USE_QSPI TRUE
|
||||
|
||||
// #undef WB32_ADC_USE_ADC1
|
||||
#define WB32_ADC_USE_ADC1 TRUE
|
136
keyboards/gmmk/numpad/numpad.c
Normal file
136
keyboards/gmmk/numpad/numpad.c
Normal file
@ -0,0 +1,136 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
* Modified 2022 by rustedaperture for qmk_firmware
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
|
||||
/* Each AW20216 channel is controlled by a register at some offset between 0x00
|
||||
* and 0xD7 inclusive.
|
||||
* See drivers/awinic/aw20216.h for the mapping between register offsets and
|
||||
* driver pin locations.
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, CS4_SW1, CS5_SW1, CS6_SW1 }, // 0 NUM
|
||||
{0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 1 /
|
||||
{0, CS7_SW1, CS8_SW1, CS9_SW1 }, // 2 *
|
||||
{0, CS7_SW2, CS8_SW2, CS9_SW2 }, // 3 -
|
||||
{0, CS4_SW3, CS5_SW3, CS6_SW3 }, // 4 7
|
||||
{0, CS4_SW4, CS5_SW4, CS6_SW4 }, // 5 8
|
||||
{0, CS7_SW3, CS8_SW3, CS9_SW3 }, // 6 9
|
||||
{0, CS7_SW4, CS8_SW4, CS9_SW4 }, // 7 +
|
||||
{0, CS4_SW5, CS5_SW5, CS6_SW5 }, // 8 4
|
||||
{0, CS4_SW6, CS5_SW6, CS6_SW6 }, // 9 5
|
||||
{0, CS7_SW5, CS8_SW5, CS9_SW5 }, // 10 6
|
||||
{0, CS4_SW7, CS5_SW7, CS6_SW7 }, // 11 1
|
||||
{0, CS4_SW8, CS5_SW8, CS6_SW8 }, // 12 2
|
||||
{0, CS7_SW7, CS8_SW7, CS9_SW7 }, // 13 3
|
||||
{0, CS7_SW8, CS8_SW8, CS9_SW8 }, // 14 ENTER
|
||||
{0, CS4_SW9, CS5_SW9, CS6_SW9 }, // 15 0
|
||||
{0, CS7_SW9, CS8_SW9, CS9_SW9 }, // 16 .
|
||||
{0, CS1_SW1, CS2_SW1, CS3_SW1 }, // 17 LED18
|
||||
{0, CS1_SW2, CS2_SW2, CS3_SW2 }, // 18 LED19
|
||||
{0, CS1_SW3, CS2_SW3, CS3_SW3 }, // 19 LED20
|
||||
{0, CS1_SW4, CS2_SW4, CS3_SW4 }, // 20 LED21
|
||||
{0, CS1_SW5, CS2_SW5, CS3_SW5 }, // 21 LED22
|
||||
{0, CS1_SW6, CS2_SW6, CS3_SW6 }, // 22 LED23
|
||||
{0, CS1_SW7, CS2_SW7, CS3_SW7 }, // 23 LED24
|
||||
{0, CS10_SW1, CS11_SW1, CS12_SW1 }, // 24 LED27
|
||||
{0, CS10_SW2, CS11_SW2, CS12_SW2 }, // 25 LED28
|
||||
{0, CS10_SW3, CS11_SW3, CS12_SW3 }, // 26 LED29
|
||||
{0, CS10_SW4, CS11_SW4, CS12_SW4 }, // 27 LED30
|
||||
{0, CS10_SW5, CS11_SW5, CS12_SW5 }, // 28 LED31
|
||||
{0, CS10_SW6, CS11_SW6, CS12_SW6 }, // 29 LED32
|
||||
{0, CS10_SW7, CS11_SW7, CS12_SW7 }, // 30 LED33
|
||||
};
|
||||
|
||||
led_config_t g_led_config = {{
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 4, 5, 6, 7 },
|
||||
{ 8, 9, 10, NO_LED},
|
||||
{ 11, 12, 13, 14 },
|
||||
{ 15, NO_LED, NO_LED, 16 }
|
||||
}, {
|
||||
{45, 0 }, // 0 NUM
|
||||
{90, 0 }, // 1 /
|
||||
{134, 0 }, // 2 *
|
||||
{179, 0 }, // 3 -
|
||||
{45, 16 }, // 4 7
|
||||
{90, 16 }, // 5 8
|
||||
{134, 16 }, // 6 9
|
||||
{179, 24 }, // 7 +
|
||||
{45, 32 }, // 8 4
|
||||
{90, 32 }, // 9 5
|
||||
{134, 32 }, // 10 6
|
||||
{45, 48 }, // 11 1
|
||||
{90, 48 }, // 12 2
|
||||
{134, 48 }, // 13 3
|
||||
{179, 56 }, // 14 ENTER
|
||||
{67, 64 }, // 15 0
|
||||
{134, 64 }, // 16 .
|
||||
{0, 0 }, // 17 LED18
|
||||
{0, 11 }, // 18 LED19
|
||||
{0, 21 }, // 19 LED20
|
||||
{0, 32 }, // 20 LED21
|
||||
{0, 43 }, // 21 LED22
|
||||
{0, 53 }, // 22 LED23
|
||||
{0, 64 }, // 23 LED24
|
||||
{224, 0 }, // 24 LED27
|
||||
{224, 11 }, // 25 LED28
|
||||
{224, 21 }, // 26 LED29
|
||||
{224, 32 }, // 27 LED30
|
||||
{224, 43 }, // 28 LED31
|
||||
{224, 53 }, // 29 LED32
|
||||
{224, 64 } // 30 LED33
|
||||
}, {
|
||||
4, 4, 4, 4,
|
||||
4, 4, 4, 4,
|
||||
4, 4, 4,
|
||||
4, 4, 4, 4,
|
||||
4, 4,
|
||||
2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2
|
||||
} };
|
||||
|
||||
# ifdef DRIVER_1_PW_EN
|
||||
|
||||
void keyboard_pre_init_user(void) {
|
||||
wait_ms(2000);
|
||||
setPinOutput(DRIVER_1_PW_EN);
|
||||
writePinHigh(DRIVER_1_PW_EN);
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
21
keyboards/gmmk/numpad/post_config.h
Normal file
21
keyboards/gmmk/numpad/post_config.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* Copyright 2022 by rustedaperture
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifndef TAP_CODE_DELAY
|
||||
# define TAP_CODE_DELAY 10
|
||||
#endif
|
40
keyboards/gmmk/numpad/readme.md
Normal file
40
keyboards/gmmk/numpad/readme.md
Normal file
@ -0,0 +1,40 @@
|
||||
# GMMK NUMPAD
|
||||
|
||||
![GMMK NUMPAD](https://i.imgur.com/JV4C5os.png)
|
||||
|
||||
A 17 Key macropad made and sold by Glorious LLC, equipped with a WB32 microcontroller, with support for a rotary encoder.
|
||||
|
||||
* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall)
|
||||
* Hardware Supported: GMMK Numpad
|
||||
* Hardware Availability: [GloriousPCGaming.com](https://www.gloriousgaming.com/products/gmmk-numpad)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make gmmk/numpad:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make gmmk/numpad:default:flash
|
||||
|
||||
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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the Num key and plug in the keyboard
|
||||
* **Keycode in layout**: Press the Num+Del key which is mapped to `QK_BOOT`
|
||||
* **Physical switch**: Pinhole located ubnde the zero key press while inserting the USB
|
||||
* **From Glorious Core Firmware**: Press Enter+Plus at the same time while plugging in the USB
|
||||
|
||||
## Slider
|
||||
|
||||
The slider is currently compatible with [Midi2Vol](https://github.com/jesusvallejo/Midi2Vol), [Midi Mixer (Windows)](https://github.com/jpwilliams/midi-mixer-releases/releases), [Midi2Lightroom (Mac)](https://rsjaffe.github.io/MIDI2LR/), and [ControllerMate (Mac)](https://www.orderedbytes.com/controllermate/)
|
||||
|
||||
## Encoder Button
|
||||
|
||||
The Button is set to KC_CALC by default and is located at 2,3 on the matrix
|
||||
|
||||
## Broken
|
||||
|
||||
* Bluetooth functionality
|
26
keyboards/gmmk/numpad/rules.mk
Normal file
26
keyboards/gmmk/numpad/rules.mk
Normal file
@ -0,0 +1,26 @@
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Enable N-Key Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
ENCODER_ENABLE = yes
|
||||
KEYBOARD_SHARED_EP = yes
|
||||
MIDI_ENABLE = yes
|
||||
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = AW20216
|
||||
|
||||
EEPROM_DRIVER = wear_leveling
|
||||
WEAR_LEVELING_DRIVER = spi_flash
|
||||
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += analog.c \
|
||||
matrix.c
|
@ -20,11 +20,11 @@
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_preonic_grid(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, M_OS,
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MEDIA, SYMBOL, KC_SPC, QK_LEAD, ARROW, FUNCT, XXXXXXX, KC_RALT, QK_LEAD),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MEDIA, SYMBOL, KC_SPC, QK_LEAD, ARROW, FUNCT, KC_RALT, XXXXXXX, HITBOX),
|
||||
|
||||
[_SYMBOL] = LAYOUT_preonic_grid(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
@ -47,15 +47,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_HITBOX] = LAYOUT_preonic_grid(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_U, KC_I, KC_O, KC_P, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, KC_A, KC_S, KC_D, XXXXXXX, XXXXXXX, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_W, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, HITBOX),
|
||||
|
||||
[_FUNCT] = LAYOUT_preonic_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,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||
_______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______,
|
||||
M_SFTY, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, KC_CAPS,
|
||||
_______, _______, _______, _______, _______, _______, M_AEST, _______, _______, _______, _______, M_OS ),
|
||||
_______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, KC_CAPS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[_KEEB] = LAYOUT_preonic_grid(
|
||||
CK_TOGG, AU_TOGG, MU_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
CK_TOGG, AU_TOGG, MU_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, HITBOX,
|
||||
M_USSR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, BL_TOGG, BL_STEP, BL_UP, BL_DOWN, BL_BRTG, _______, _______, _______, _______, _______, _______,
|
||||
RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______,
|
||||
|
@ -41,7 +41,6 @@ uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {
|
||||
}
|
||||
// End: Written by Chris Lewis
|
||||
|
||||
static int shift_int = 0;
|
||||
uint8_t current_os,
|
||||
mod_primary_mask,
|
||||
fade_interval,
|
||||
@ -53,8 +52,6 @@ Color underglow,
|
||||
flashState flash_state = no_flash;
|
||||
fadeState fade_state = add_fade;
|
||||
activityState state = boot;
|
||||
bool aesthetic = false,
|
||||
shifty = false;
|
||||
|
||||
float song_ussr[][2] = SONG(USSR_ANTHEM);
|
||||
|
||||
@ -208,7 +205,7 @@ void set_os (uint8_t os, bool update) {
|
||||
flash_color = underglow;
|
||||
flash_state = flash_off;
|
||||
state = boot;
|
||||
num_extra_flashes_off = 1;
|
||||
num_extra_flashes_off = 3;
|
||||
}
|
||||
|
||||
// register GUI if Mac or Ctrl if other
|
||||
@ -245,17 +242,6 @@ void sec_mod(bool press) {
|
||||
}
|
||||
}
|
||||
|
||||
// register Meh if Win or Hyper if other
|
||||
// KC_MEH/HYPR registers both sides, causes issues with some apps
|
||||
// I'll do it myself, then
|
||||
void meh_hyper(bool press) {
|
||||
if (current_os == OS_WIN) {
|
||||
(press) ? register_mods(L_BIT_MEH) : unregister_mods(L_BIT_MEH);
|
||||
} else {
|
||||
(press) ? register_mods(L_BIT_HYPR) : unregister_mods(L_BIT_HYPR);
|
||||
}
|
||||
}
|
||||
|
||||
void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
|
||||
if (use_shift) {
|
||||
register_code(KC_LSFT);
|
||||
@ -441,56 +427,6 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (aesthetic) {
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_0:
|
||||
case KC_SPACE ... KC_SLASH:
|
||||
if (record->event.pressed) {
|
||||
state = active;
|
||||
velocikey_accelerate();
|
||||
tap_code(keycode);
|
||||
tap_code(KC_SPACE);
|
||||
}
|
||||
return false;
|
||||
|
||||
case KC_BACKSPACE:
|
||||
if (record->event.pressed) {
|
||||
state = active;
|
||||
velocikey_accelerate();
|
||||
tap_code(keycode);
|
||||
tap_code(keycode);
|
||||
}
|
||||
return false;
|
||||
default: // Do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (shifty) {
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_Z:
|
||||
if (record->event.pressed) {
|
||||
shift_int += (rand() % 5);
|
||||
int shift = ((shift_int % 2) == 1) ? true : false;
|
||||
state = active;
|
||||
velocikey_accelerate();
|
||||
(shift) ? register_code(KC_LSFT) : NULL;
|
||||
tap_code(keycode);
|
||||
(shift) ? unregister_code(KC_LSFT) : NULL;
|
||||
}
|
||||
return false;
|
||||
case KC_SPC:
|
||||
if (record->event.pressed) {
|
||||
state = active;
|
||||
velocikey_accelerate();
|
||||
tap_code(keycode);
|
||||
}
|
||||
return false;
|
||||
default: // Do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
case M_USSR:
|
||||
@ -509,29 +445,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
register_unicode(0x2014); // —
|
||||
}
|
||||
return false;
|
||||
case M_LMHYP:
|
||||
case M_EHYPR:
|
||||
(keycode = M_LMHYP) ? (record->event.pressed) ? layer_on(_ARROW) : layer_off(_ARROW) : NULL;
|
||||
meh_hyper(record->event.pressed);
|
||||
return false;
|
||||
|
||||
case M_SFTY:
|
||||
if(record->event.pressed){
|
||||
num_extra_flashes_off = (shifty) ? 1 : 0;
|
||||
shifty = !shifty;
|
||||
flash_color = underglow;
|
||||
flash_state = flash_off;
|
||||
return false;
|
||||
}
|
||||
|
||||
case M_AEST:
|
||||
if(record->event.pressed){
|
||||
num_extra_flashes_off = (aesthetic) ? 1 : 0;
|
||||
aesthetic = !aesthetic;
|
||||
flash_color = underglow;
|
||||
flash_state = flash_off;
|
||||
return false;
|
||||
}
|
||||
|
||||
default:
|
||||
if (record->event.pressed) {
|
||||
|
@ -4,14 +4,12 @@
|
||||
|
||||
#define EECONFIG_USERSPACE (uint8_t *)20
|
||||
|
||||
#define SYMBOL MO(1)
|
||||
#define MEDIA MO(2)
|
||||
#define ARROW MO(3)
|
||||
#define FUNCT MO(4)
|
||||
#define KEEB MO(5)
|
||||
|
||||
#define L_BIT_MEH MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
|
||||
#define L_BIT_HYPR MOD_BIT(KC_LCTL) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
|
||||
#define SYMBOL MO(_SYMBOL)
|
||||
#define MEDIA MO(_MEDIA)
|
||||
#define ARROW MO(_ARROW)
|
||||
#define FUNCT MO(_FUNCT)
|
||||
#define KEEB MO(_KEEB)
|
||||
#define HITBOX TT(_HITBOX)
|
||||
|
||||
#define LED_FLASH_DELAY 150
|
||||
|
||||
@ -30,6 +28,7 @@ enum {
|
||||
_ARROW,
|
||||
_FUNCT,
|
||||
_KEEB,
|
||||
_HITBOX,
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@ -68,10 +67,6 @@ enum custom_keycodes {
|
||||
M_OS,
|
||||
M_DASH,
|
||||
M_USSR,
|
||||
M_EHYPR,
|
||||
M_LMHYP,
|
||||
M_SFTY,
|
||||
M_AEST,
|
||||
};
|
||||
|
||||
void velocikey_accelerate(void);
|
||||
|
Loading…
Reference in New Issue
Block a user