Make `PREVENT_STUCK_MODIFIERS` the default (#3107)
* Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.pull/3939/head 0.6.120
parent
b65e214375
commit
743449472e
@ -1,2 +1,3 @@
|
|||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
UNICODE_ENABLE = yes
|
UNICODE_ENABLE = yes
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
//GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut.
|
//GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut.
|
||||||
#define GRAVE_ESC_CTRL_OVERRIDE
|
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
//Delay matrix scan for tap dance, reduce to activate modifier keys faster.
|
//Delay matrix scan for tap dance, reduce to activate modifier keys faster.
|
||||||
//#define TAPPING_TERM 200
|
//#define TAPPING_TERM 200
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = no
|
||||||
UNICODE_ENABLE = no
|
UNICODE_ENABLE = no
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
//GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut.
|
//GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut.
|
||||||
#define GRAVE_ESC_CTRL_OVERRIDE
|
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
//Delay matrix scan for tap dance, reduce to activate modifier keys faster.
|
//Delay matrix scan for tap dance, reduce to activate modifier keys faster.
|
||||||
//#define TAPPING_TERM 200
|
//#define TAPPING_TERM 200
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,2 +0,0 @@
|
|||||||
#include "../../config.h"
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
@ -1,8 +1,6 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#ifndef CONFIG_USER_H
|
||||||
#define CONFIG_USER_H
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#define IGNORE_MOD_TAP_INTERRUPT
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef LAE3_KEYMAP_H
|
|
||||||
#define LAE3_KEYMAP_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,6 +1,5 @@
|
|||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
// for the broken board
|
// for the broken board
|
||||||
#undef MATRIX_COL_PINS
|
#undef MATRIX_COL_PINS
|
||||||
#define MATRIX_COL_PINS { F1, F0, B0, B2, F4, F5, F6, F7, D4, D6, B4, D7 }
|
#define MATRIX_COL_PINS { F1, F0, B0, B2, F4, F5, F6, F7, D4, D6, B4, D7 }
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,11 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1 +1,2 @@
|
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../config.h"
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
|
|
||||||
#endif
|
|
@ -0,0 +1 @@
|
|||||||
|
LEADER_ENABLE = yes
|
@ -1,3 +1,2 @@
|
|||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
UNICODE_ENABLE = yes
|
UNICODE_ENABLE = yes
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
@ -1 +1,2 @@
|
|||||||
TAP_DANCE_ENABLE=yes
|
TAP_DANCE_ENABLE=yes
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Ergodox EZ for OS X
|
# Ergodox EZ for OS X
|
||||||
|
|
||||||
This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
|
This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
|
||||||
|
|
||||||
If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/).
|
Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/).
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
/* Copyright 2016 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 "process_chording.h"
|
|
||||||
|
|
||||||
bool keys_chord(uint8_t keys[]) {
|
|
||||||
uint8_t keys_size = sizeof(keys)/sizeof(keys[0]);
|
|
||||||
bool pass = true;
|
|
||||||
uint8_t in = 0;
|
|
||||||
for (uint8_t i = 0; i < chord_key_count; i++) {
|
|
||||||
bool found = false;
|
|
||||||
for (uint8_t j = 0; j < keys_size; j++) {
|
|
||||||
if (chord_keys[i] == (keys[j] & 0xFF)) {
|
|
||||||
in++; // detects key in chord
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (found)
|
|
||||||
continue;
|
|
||||||
if (chord_keys[i] != 0) {
|
|
||||||
pass = false; // makes sure rest are blank
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (pass && (in == keys_size));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_chording(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
if (keycode >= QK_CHORDING && keycode <= QK_CHORDING_MAX) {
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (!chording) {
|
|
||||||
chording = true;
|
|
||||||
for (uint8_t i = 0; i < CHORDING_MAX; i++)
|
|
||||||
chord_keys[i] = 0;
|
|
||||||
chord_key_count = 0;
|
|
||||||
chord_key_down = 0;
|
|
||||||
}
|
|
||||||
chord_keys[chord_key_count] = (keycode & 0xFF);
|
|
||||||
chord_key_count++;
|
|
||||||
chord_key_down++;
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
if (chording) {
|
|
||||||
chord_key_down--;
|
|
||||||
if (chord_key_down == 0) {
|
|
||||||
chording = false;
|
|
||||||
// Chord Dictionary
|
|
||||||
if (keys_chord((uint8_t[]){KC_ENTER, KC_SPACE})) {
|
|
||||||
register_code(KC_A);
|
|
||||||
unregister_code(KC_A);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (uint8_t i = 0; i < chord_key_count; i++) {
|
|
||||||
register_code(chord_keys[i]);
|
|
||||||
unregister_code(chord_keys[i]);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
/* Copyright 2016 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PROCESS_CHORDING_H
|
|
||||||
#define PROCESS_CHORDING_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
|
||||||
|
|
||||||
// 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
|
|
@ -1,4 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
|
||||||
#define PERMISSIVE_HOLD
|
#define PERMISSIVE_HOLD
|
||||||
|
Loading…
Reference in new issue