aboutsummaryrefslogtreecommitdiff
path: root/users/konstantin
diff options
context:
space:
mode:
authorKonstantin Đorđević <vomindoraan@gmail.com>2019-01-27 17:46:54 +0100
committerDrashna Jaelre <drashna@live.com>2019-01-27 08:46:54 -0800
commit6ba0b818e9ab8830610ab2a74515227884f93abc (patch)
treeb6a8761351604b6fe222b0e0196d24c447d4db97 /users/konstantin
parent5c1d4baec4a178df3845c724ec48f8e9bba47b74 (diff)
downloadqmk_firmware-6ba0b818e9ab8830610ab2a74515227884f93abc.tar.gz
qmk_firmware-6ba0b818e9ab8830610ab2a74515227884f93abc.zip
[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
Diffstat (limited to 'users/konstantin')
-rw-r--r--users/konstantin/config.h1
-rw-r--r--users/konstantin/konstantin.c5
-rw-r--r--users/konstantin/konstantin.h10
-rw-r--r--users/konstantin/rules.mk1
4 files changed, 14 insertions, 3 deletions
diff --git a/users/konstantin/config.h b/users/konstantin/config.h
index d03333f05..800b8e49b 100644
--- a/users/konstantin/config.h
+++ b/users/konstantin/config.h
@@ -14,6 +14,7 @@
14 14
15#define NO_ACTION_FUNCTION 15#define NO_ACTION_FUNCTION
16#define NO_ACTION_MACRO 16#define NO_ACTION_MACRO
17#define NO_ACTION_ONESHOT
17 18
18#define PERMISSIVE_HOLD 19#define PERMISSIVE_HOLD
19#define TAPPING_TERM 200 20#define TAPPING_TERM 200
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c
index 977111c1f..47596279c 100644
--- a/users/konstantin/konstantin.c
+++ b/users/konstantin/konstantin.c
@@ -3,8 +3,9 @@
3#ifdef LAYER_NUMPAD 3#ifdef LAYER_NUMPAD
4static void toggle_numpad(void) { 4static void toggle_numpad(void) {
5 layer_invert(L_NUMPAD); 5 layer_invert(L_NUMPAD);
6 bool num_lock = host_keyboard_leds() & 1<<USB_LED_NUM_LOCK; 6 bool numpad_on = IS_LAYER_ON(L_NUMPAD);
7 if (num_lock != (bool)IS_LAYER_ON(L_NUMPAD)) { 7 bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
8 if (num_lock_on != numpad_on) {
8 tap_code(KC_NLCK); // Toggle Num Lock to match layer state 9 tap_code(KC_NLCK); // Toggle Num Lock to match layer state
9 } 10 }
10} 11}
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h
index 06081496b..f67f9f1b7 100644
--- a/users/konstantin/konstantin.h
+++ b/users/konstantin/konstantin.h
@@ -25,6 +25,16 @@
25 25
26#define LCT_CPS LCTL_T(KC_CAPS) 26#define LCT_CPS LCTL_T(KC_CAPS)
27 27
28#ifdef SEND_STRING_CLEAN
29 #undef SEND_STRING
30 #define SEND_STRING(...) { \
31 uint8_t ss_mods = get_mods(); \
32 clear_mods(); \
33 send_string_P(PSTR(__VA_ARGS__)); \
34 set_mods(ss_mods); \
35 }
36#endif
37
28enum keycodes_user { 38enum keycodes_user {
29 CLEAR = SAFE_RANGE, 39 CLEAR = SAFE_RANGE,
30#ifdef LAYER_NUMPAD 40#ifdef LAYER_NUMPAD
diff --git a/users/konstantin/rules.mk b/users/konstantin/rules.mk
index 7f25a8107..d2522b952 100644
--- a/users/konstantin/rules.mk
+++ b/users/konstantin/rules.mk
@@ -2,7 +2,6 @@ BOOTMAGIC_ENABLE = no
2COMMAND_ENABLE = yes 2COMMAND_ENABLE = yes
3CONSOLE_ENABLE = yes 3CONSOLE_ENABLE = yes
4EXTRAKEY_ENABLE = yes 4EXTRAKEY_ENABLE = yes
5KEYBOARD_SHARED_EP = yes # TODO: Disable once Command is fixed
6MOUSEKEY_ENABLE = yes 5MOUSEKEY_ENABLE = yes
7NKRO_ENABLE = yes 6NKRO_ENABLE = yes
8TAP_DANCE_ENABLE = yes 7TAP_DANCE_ENABLE = yes