mirror of
https://github.com/qmk/qmk_firmware
synced 2025-01-07 23:41:41 +00:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a6d1db2c27 | ||
|
244e1c5a57 | ||
|
3f680a93eb | ||
|
ed2dd3b59c | ||
|
fe3bfd91c1 | ||
|
743449472e | ||
|
b65e214375 | ||
|
6bf2c07715 | ||
|
232ef75783 | ||
|
9712501bf3 | ||
|
db35065e14 | ||
|
b1f11636c6 |
@ -221,7 +221,6 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||
SRC += drivers/avr/hd44780.c
|
||||
OPT_DEFS += -DHD44780_ENABLE
|
||||
@ -232,11 +231,15 @@ ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/dynamic_keymap.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LEADER_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
OPT_DEFS += -DLEADER_ENABLE
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
$(QUANTUM_DIR)/keycode_config.c
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
@ -251,5 +254,5 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
|
||||
$(QUANTUM_DIR)/split_common/split_util.c \
|
||||
$(QUANTUM_DIR)/split_common/i2c.c \
|
||||
$(QUANTUM_DIR)/split_common/serial.c
|
||||
$(QUANTUM_DIR)/split_common/serial.c
|
||||
endif
|
||||
|
@ -119,8 +119,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
* `#define FORCE_NKRO`
|
||||
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
|
||||
* `#define PREVENT_STUCK_MODIFIERS`
|
||||
* stores the layer a key press came from so the same layer is used when the key is released, regardless of which layers are enabled
|
||||
* `#define STRICT_LAYER_RELEASE`
|
||||
* force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases)
|
||||
|
||||
## Behaviors That Can Be Configured
|
||||
|
||||
|
@ -70,6 +70,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
||||
* Do not write obvious comments
|
||||
* If you not sure if a comment is obvious, go ahead and include it.
|
||||
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
|
||||
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
|
||||
|
||||
# General Guidelines
|
||||
|
||||
|
@ -57,6 +57,7 @@ Hold down the Bootmagic key (Space by default) and the desired hotkey while plug
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI keys |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides (for macOS)|
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and Left GUI |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Left Alt and GUI swap |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap `\` and Backspace |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||
|
@ -5,7 +5,7 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to
|
||||
That's what `KC_LEAD` does. Here's an example:
|
||||
|
||||
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
|
||||
2. Include the line `#define LEADER_TIMEOUT 300` somewhere in your keymap.c file, probably near the top. The 300 there is 300ms -- that's how long you have for the sequence of keys following the leader. You can tweak this value for comfort, of course.
|
||||
2. Include the line `#define LEADER_TIMEOUT 300` in your config.h. The 300 there is 300ms -- that's how long you have for the sequence of keys following the leader. You can tweak this value for comfort, of course.
|
||||
3. Within your `matrix_scan_user` function, do something like this:
|
||||
|
||||
```
|
||||
@ -39,3 +39,11 @@ void matrix_scan_user(void) {
|
||||
As you can see, you have a few function. You can use `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS`, `SEQ_THREE_KEYS` up to `SEQ_FIVE_KEYS` for longer sequences.
|
||||
|
||||
Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
|
||||
|
||||
## Adding Leader Key Support in the `rules.mk`
|
||||
|
||||
To add support for Leader Key you simply need to add a single line to your keymap's `rules.mk`:
|
||||
|
||||
```
|
||||
LEADER_ENABLE = yes
|
||||
```
|
||||
|
@ -271,6 +271,7 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap `\` and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides|
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
@ -129,6 +129,7 @@ Comparing against our keymap we can see that the pressed key is KC_NLCK. From he
|
||||
<!-- FIXME: Magic happens between here and process_record -->
|
||||
|
||||
##### Process Record
|
||||
|
||||
The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in rule.mk or elsewhere, only a subset of the functions below will be included in final firmware.
|
||||
|
||||
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/tmk_core/common/action.c#L172)
|
||||
@ -146,7 +147,6 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
||||
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_music.c#L114)
|
||||
* [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_tap_dance.c#L136)
|
||||
* [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_leader.c#L38)
|
||||
* [`bool process_chording(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_chording.c#L41)
|
||||
* [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_combo.c#L115)
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicode.c#L22)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_ucis.c#L91)
|
||||
|
@ -43,9 +43,6 @@
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER 1up Keyboards
|
||||
#define PRODUCT Sweet16
|
||||
#define DESCRIPTION 4x4 grid
|
||||
#define DESCRIPTION 4x4 grid
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
@ -43,9 +43,6 @@
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN B1
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
@ -55,4 +52,4 @@
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -41,9 +41,6 @@
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 20
|
||||
|
@ -43,9 +43,6 @@
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
@ -55,4 +52,4 @@
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -43,8 +43,6 @@
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN F4
|
||||
#ifdef RGB_DI_PIN
|
||||
|
@ -59,9 +59,6 @@
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 16
|
||||
|
@ -38,6 +38,3 @@
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
@ -4,8 +4,6 @@
|
||||
#include "action_layer.h"
|
||||
#include "keymap_colemak.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
#define ALPH 0
|
||||
#define NUMS 1
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -30,8 +30,7 @@ the Free Software Foundation, either version 2 of the License, or
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,6 +1,5 @@
|
||||
#define ONESHOT_TIMEOUT 3000
|
||||
#define TAPPING_TERM 200
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
#define FORCE_NKRO
|
||||
#define LEADER_TIMEOUT 1000
|
||||
|
||||
|
@ -3,3 +3,4 @@ NKRO_ENABLE = true
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
LEADER_ENABLE = yes
|
||||
|
@ -37,7 +37,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -47,9 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
@ -47,9 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
@ -47,9 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
@ -47,9 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
@ -19,10 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
volatile uint8_t runonce = true;
|
||||
static uint16_t my_timer;
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
my_timer = timer_read();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
if (runonce && timer_elapsed(my_timer) > 1000) {
|
||||
runonce = false;
|
||||
|
@ -47,8 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
|
45
keyboards/bigswitch/keymaps/wanleg/config.h
Normal file
45
keyboards/bigswitch/keymaps/wanleg/config.h
Normal file
@ -0,0 +1,45 @@
|
||||
/* Copyright 2018 wanleg
|
||||
*
|
||||
* 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
|
||||
|
||||
// place overrides here
|
||||
#undef MATRIX_ROW_PINS
|
||||
#define MATRIX_ROW_PINS { B4 }
|
||||
#undef MATRIX_COL_PINS
|
||||
#define MATRIX_COL_PINS { B6 }
|
||||
//#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#undef DIODE_DIRECTION
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BREATHING_PERIOD 5
|
||||
|
||||
/* for Tap Dance */
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 700
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
//#define DEBOUNCING_DELAY 5
|
||||
#undef DEBOUNCING_DELAY
|
||||
#define DEBOUNCING_DELAY 2
|
||||
|
||||
// set flashing LED with QMK DFU
|
||||
#define QMK_LED B0
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2016 Jack Humbert
|
||||
/* Copyright 2018 wanleg
|
||||
*
|
||||
* 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
|
||||
@ -13,20 +13,15 @@
|
||||
* 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 "wanleg.h"
|
||||
|
||||
#ifndef PROCESS_CHORDING_H
|
||||
#define PROCESS_CHORDING_H
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
TD(CAD_TD) \
|
||||
),
|
||||
};
|
||||
|
||||
#include "quantum.h"
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
// Chording stuff
|
||||
#define CHORDING_MAX 4
|
||||
bool chording = false;
|
||||
|
||||
uint8_t chord_keys[CHORDING_MAX] = {0};
|
||||
uint8_t chord_key_count = 0;
|
||||
uint8_t chord_key_down = 0;
|
||||
|
||||
bool process_chording(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#endif
|
||||
}
|
7
keyboards/bigswitch/keymaps/wanleg/rules.mk
Normal file
7
keyboards/bigswitch/keymaps/wanleg/rules.mk
Normal file
@ -0,0 +1,7 @@
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
|
||||
#If using a ProMicro and it has the QMK DFU bootloader instead of Caterina,
|
||||
#run "make <keyboard>:<keymap> dfu=qmk" when compiling to ensure it is flagged properly after being flashed
|
||||
ifeq ($(strip $(dfu)), qmk)
|
||||
BOOTLOADER = qmk-dfu
|
||||
endif
|
@ -46,9 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN F6
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user