[Keymap] Update personal userspace and keymaps (#4963)

* Remove duplicated or unnecessary definitions in config.h and rules.mk

* Use IS_HOST_LED_ON() macro

* Add mouse acceleration to kbd6x:konstantin keymap

* Clear and restore mods when sending macros

* Make SEND_STRING_CLEAN a config option

* Add NO_ACTION_ONESHOT to userspace config
This commit is contained in:
Konstantin Đorđević 2019-01-27 17:46:54 +01:00 committed by Drashna Jaelre
parent 5c1d4baec4
commit 6ba0b818e9
7 changed files with 17 additions and 26 deletions

View File

@ -1,3 +1,4 @@
#pragma once
#define LAYER_FN
#define SEND_STRING_CLEAN

View File

@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*
* MutVoDVoUPlyPrvNxtMWMWM4 M5
*
* MW
* MW MAcl2
*
*/
[L_FN] = LAYOUT(
@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL,
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______,
_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______,
XXXXXXX, _______, _______, KC_WH_D, _______, _______, XXXXXXX
XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX
),
/* RCtrl layer

View File

@ -4,24 +4,3 @@
#define LAYER_FN
#define LAYER_NUMPAD
#define MAGIC_KEY_LAYER0_ALT1 BSLS
#define MAGIC_KEY_BOOTLOADER ESC
#define MOUSEKEY_DELAY 50
#define MOUSEKEY_INTERVAL 15
#define MOUSEKEY_MAX_SPEED 4
#define MOUSEKEY_TIME_TO_MAX 50
#define MOUSEKEY_WHEEL_MAX_SPEED 1
#define MOUSEKEY_WHEEL_TIME_TO_MAX 50
#define NO_ACTION_FUNCTION
#define NO_ACTION_MACRO
#define PERMISSIVE_HOLD
#define TAPPING_TERM 200
#define TAPPING_TOGGLE 2
#define UNICODE_CYCLE_PERSIST false
#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX
#define UNICODE_WINC_KEY KC_RGUI

View File

@ -14,6 +14,7 @@
#define NO_ACTION_FUNCTION
#define NO_ACTION_MACRO
#define NO_ACTION_ONESHOT
#define PERMISSIVE_HOLD
#define TAPPING_TERM 200

View File

@ -3,8 +3,9 @@
#ifdef LAYER_NUMPAD
static void toggle_numpad(void) {
layer_invert(L_NUMPAD);
bool num_lock = host_keyboard_leds() & 1<<USB_LED_NUM_LOCK;
if (num_lock != (bool)IS_LAYER_ON(L_NUMPAD)) {
bool numpad_on = IS_LAYER_ON(L_NUMPAD);
bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
if (num_lock_on != numpad_on) {
tap_code(KC_NLCK); // Toggle Num Lock to match layer state
}
}

View File

@ -25,6 +25,16 @@
#define LCT_CPS LCTL_T(KC_CAPS)
#ifdef SEND_STRING_CLEAN
#undef SEND_STRING
#define SEND_STRING(...) { \
uint8_t ss_mods = get_mods(); \
clear_mods(); \
send_string_P(PSTR(__VA_ARGS__)); \
set_mods(ss_mods); \
}
#endif
enum keycodes_user {
CLEAR = SAFE_RANGE,
#ifdef LAYER_NUMPAD

View File

@ -2,7 +2,6 @@ BOOTMAGIC_ENABLE = no
COMMAND_ENABLE = yes
CONSOLE_ENABLE = yes
EXTRAKEY_ENABLE = yes
KEYBOARD_SHARED_EP = yes # TODO: Disable once Command is fixed
MOUSEKEY_ENABLE = yes
NKRO_ENABLE = yes
TAP_DANCE_ENABLE = yes