summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/action.c7
-rw-r--r--tmk_core/common/avr/bootloader.c8
-rw-r--r--tmk_core/common/command.c11
3 files changed, 14 insertions, 12 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 08ef22eb97..d485b46c77 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -155,9 +155,10 @@ void process_action(keyrecord_t *record, action_t action)
action.key.mods<<4;
if (event.pressed) {
if (mods) {
- if (IS_MOD(action.key.code)) {
+ if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
// e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless.
- // this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT)
+ // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT).
+ // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO).
add_mods(mods);
} else {
add_weak_mods(mods);
@@ -168,7 +169,7 @@ void process_action(keyrecord_t *record, action_t action)
} else {
unregister_code(action.key.code);
if (mods) {
- if (IS_MOD(action.key.code)) {
+ if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
del_mods(mods);
} else {
del_weak_mods(mods);
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c
index fb9bf2d1c3..ad547b9853 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/tmk_core/common/avr/bootloader.c
@@ -38,7 +38,7 @@
* | | | |
* = = = =
* | | 32KB-4KB | | 128KB-8KB
- * 0x6000 +---------------+ 0x1FC00 +---------------+
+ * 0x7000 +---------------+ 0x1E000 +---------------+
* | Bootloader | 4KB | Bootloader | 8KB
* 0x7FFF +---------------+ 0x1FFFF +---------------+
*
@@ -64,8 +64,8 @@
#define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE)
-/*
- * Entering the Bootloader via Software
+/*
+ * Entering the Bootloader via Software
* http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
*/
#define BOOTLOADER_RESET_KEY 0xB007B007
@@ -137,7 +137,7 @@ void bootloader_jump_after_watchdog_reset(void)
#if 0
/* Jumping To The Bootloader
* http://www.pjrc.com/teensy/jump_to_bootloader.html
- *
+ *
* This method doen't work when using LUFA. idk why.
* - needs to initialize more regisers or interrupt setting?
*/
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index 54d6117fd1..f3e1bf6234 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -261,7 +261,10 @@ static void print_status(void)
#ifdef BOOTMAGIC_ENABLE
static void print_eeconfig(void)
{
-#ifndef NO_PRINT
+
+// Print these variables if NO_PRINT or USER_PRINT are not defined.
+#if !defined(NO_PRINT) && !defined(USER_PRINT)
+
print("default_layer: "); print_dec(eeconfig_read_default_layer()); print("\n");
debug_config_t dc;
@@ -381,9 +384,6 @@ static bool command_common(uint8_t code)
debug_mouse = true;
} else {
print("\ndebug: off\n");
- debug_matrix = false;
- debug_keyboard = false;
- debug_mouse = false;
}
break;
@@ -571,7 +571,8 @@ static uint8_t mousekey_param = 0;
static void mousekey_param_print(void)
{
-#ifndef NO_PRINT
+// Print these variables if NO_PRINT or USER_PRINT are not defined.
+#if !defined(NO_PRINT) && !defined(USER_PRINT)
print("\n\t- Values -\n");
print("1: delay(*10ms): "); pdec(mk_delay); print("\n");
print("2: interval(ms): "); pdec(mk_interval); print("\n");