diff options
| author | Jun Wako <wakojun@gmail.com> | 2015-09-24 12:29:11 +0900 |
|---|---|---|
| committer | Jun Wako <wakojun@gmail.com> | 2015-09-24 12:29:11 +0900 |
| commit | fdc38ef3f92af7adeeb4de49550d8838c8a39b5c (patch) | |
| tree | a20c7a06111e5f674d94e8ba48a82d16b2e3e07f /common/command.c | |
| parent | f6d56675f9f981c5464f0ca7a1fbb0162154e8c5 (diff) | |
| download | qmk_firmware-fdc38ef3f92af7adeeb4de49550d8838c8a39b5c.tar.gz qmk_firmware-fdc38ef3f92af7adeeb4de49550d8838c8a39b5c.zip | |
Squashed 'tmk_core/' changes from dc0e46e..57d27a8
57d27a8 Merge branch 'core_update_150924' into core
024abe3 core: Fix NKRO ifdef
7aa2d30 core: Fix for disabling NKRO in Boot protocol
95651fd core: Fix message print of debug command
c20cd29 lufa: Fix endpoint bank mode for ATMega32u2
82ac21f next_usb: Fix next_kbd_set_leds()
537d9c7 Change to KC_BOOTLOADER(KC_BTLD)
f2b3772 Add an assignable RESET key
fc99257 Fix parenthesis
e852582 Fix weak modifier clear in action macro
c2a6c5c core: Fix lufa suspend callback(#234)
fa548c5 usb_usb: Ignore error usage(0x01-03) report
513d95c usb_usb: Support locking key indicator LED
cd78802 core: Add keymap section ldscript for ATMega32U2
70c9abd Add description for non-US keys on keycode.h
538c192 lufa: Fix console flush #223
87628c9 Revert "Make action_for_key a weak symbol"
3c0a1ba Make action_for_key a weak symbol
6bb0d7d ibm4704_usb: Fix protocol handling
b6ef5cf Add keyboard_setup() and matrix_setup()
f4bb8b2 ibm4704_usb: Fix interrupt of clock(rising edge)
0c1fcc1 usb_usb: Change debug LED pin config
595710d Reduce code size of magic commands
6bed174 Add description of AVR bootloader and boot section
54c6a01 Merge commit 'f6d56675f9f981c5464f0ca7a1fbb0162154e8c5'
d18d42e Merge branch 'core-update2' into core
febec88 Add compile options '-fdata-sections'
git-subtree-dir: tmk_core
git-subtree-split: 57d27a8e39173a589b4abae74851f95c39940174
Diffstat (limited to 'common/command.c')
| -rw-r--r-- | common/command.c | 198 |
1 files changed, 93 insertions, 105 deletions
diff --git a/common/command.c b/common/command.c index fbaa9f2d7..d59bb01bb 100644 --- a/common/command.c +++ b/common/command.c | |||
| @@ -112,30 +112,33 @@ bool command_console_extra(uint8_t code) | |||
| 112 | ***********************************************************/ | 112 | ***********************************************************/ |
| 113 | static void command_common_help(void) | 113 | static void command_common_help(void) |
| 114 | { | 114 | { |
| 115 | print("\n\n----- Command Help -----\n"); | 115 | print("\n\t- Magic -\n" |
| 116 | print("c: enter console mode\n"); | 116 | "d: debug\n" |
| 117 | print("d: toggle debug enable\n"); | 117 | "x: debug matrix\n" |
| 118 | print("x: toggle matrix debug\n"); | 118 | "k: debug keyboard\n" |
| 119 | print("k: toggle keyboard debug\n"); | 119 | "m: debug mouse\n" |
| 120 | print("m: toggle mouse debug\n"); | 120 | "v: version\n" |
| 121 | #ifdef SLEEP_LED_ENABLE | 121 | "s: status\n" |
| 122 | print("z: toggle sleep LED test\n"); | 122 | "c: console mode\n" |
| 123 | "0-4: layer0-4(F10-F4)\n" | ||
| 124 | "Paus: bootloader\n" | ||
| 125 | |||
| 126 | #ifdef KEYBOARD_LOCK_ENABLE | ||
| 127 | "Caps: Lock\n" | ||
| 128 | #endif | ||
| 129 | |||
| 130 | #ifdef BOOTMAGIC_ENABLE | ||
| 131 | "e: eeprom\n" | ||
| 123 | #endif | 132 | #endif |
| 124 | print("v: print device version & info\n"); | 133 | |
| 125 | print("t: print timer count\n"); | ||
| 126 | print("s: print status\n"); | ||
| 127 | print("e: print eeprom config\n"); | ||
| 128 | #ifdef NKRO_ENABLE | 134 | #ifdef NKRO_ENABLE |
| 129 | print("n: toggle NKRO\n"); | 135 | "n: NKRO\n" |
| 136 | #endif | ||
| 137 | |||
| 138 | #ifdef SLEEP_LED_ENABLE | ||
| 139 | "z: sleep LED test\n" | ||
| 130 | #endif | 140 | #endif |
| 131 | print("0/F10: switch to Layer0 \n"); | 141 | ); |
| 132 | print("1/F1: switch to Layer1 \n"); | ||
| 133 | print("2/F2: switch to Layer2 \n"); | ||
| 134 | print("3/F3: switch to Layer3 \n"); | ||
| 135 | print("4/F4: switch to Layer4 \n"); | ||
| 136 | print("PScr: power down/remote wake-up\n"); | ||
| 137 | print("Caps: Lock Keyboard(Child Proof)\n"); | ||
| 138 | print("Paus: jump to bootloader\n"); | ||
| 139 | } | 142 | } |
| 140 | 143 | ||
| 141 | #ifdef BOOTMAGIC_ENABLE | 144 | #ifdef BOOTMAGIC_ENABLE |
| @@ -191,6 +194,7 @@ static bool command_common(uint8_t code) | |||
| 191 | print_eeconfig(); | 194 | print_eeconfig(); |
| 192 | break; | 195 | break; |
| 193 | #endif | 196 | #endif |
| 197 | #ifdef KEYBOARD_LOCK_ENABLE | ||
| 194 | case KC_CAPSLOCK: | 198 | case KC_CAPSLOCK: |
| 195 | if (host_get_driver()) { | 199 | if (host_get_driver()) { |
| 196 | host_driver = host_get_driver(); | 200 | host_driver = host_get_driver(); |
| @@ -202,6 +206,7 @@ static bool command_common(uint8_t code) | |||
| 202 | print("Unlocked.\n"); | 206 | print("Unlocked.\n"); |
| 203 | } | 207 | } |
| 204 | break; | 208 | break; |
| 209 | #endif | ||
| 205 | case KC_H: | 210 | case KC_H: |
| 206 | case KC_SLASH: /* ? */ | 211 | case KC_SLASH: /* ? */ |
| 207 | command_common_help(); | 212 | command_common_help(); |
| @@ -212,58 +217,56 @@ static bool command_common(uint8_t code) | |||
| 212 | debug_mouse = false; | 217 | debug_mouse = false; |
| 213 | debug_enable = false; | 218 | debug_enable = false; |
| 214 | command_console_help(); | 219 | command_console_help(); |
| 215 | print("\nEnter Console Mode\n"); | ||
| 216 | print("C> "); | 220 | print("C> "); |
| 217 | command_state = CONSOLE; | 221 | command_state = CONSOLE; |
| 218 | break; | 222 | break; |
| 219 | case KC_PAUSE: | 223 | case KC_PAUSE: |
| 220 | clear_keyboard(); | 224 | clear_keyboard(); |
| 221 | print("\n\nJump to bootloader... "); | 225 | print("\n\nbootloader... "); |
| 222 | _delay_ms(1000); | 226 | _delay_ms(1000); |
| 223 | bootloader_jump(); // not return | 227 | bootloader_jump(); // not return |
| 224 | print("not supported.\n"); | ||
| 225 | break; | 228 | break; |
| 226 | case KC_D: | 229 | case KC_D: |
| 227 | if (debug_enable) { | 230 | if (debug_enable) { |
| 228 | print("\nDEBUG: disabled.\n"); | 231 | print("\ndebug: off\n"); |
| 229 | debug_matrix = false; | 232 | debug_matrix = false; |
| 230 | debug_keyboard = false; | 233 | debug_keyboard = false; |
| 231 | debug_mouse = false; | 234 | debug_mouse = false; |
| 232 | debug_enable = false; | 235 | debug_enable = false; |
| 233 | } else { | 236 | } else { |
| 234 | print("\nDEBUG: enabled.\n"); | 237 | print("\ndebug: on\n"); |
| 235 | debug_enable = true; | 238 | debug_enable = true; |
| 236 | } | 239 | } |
| 237 | break; | 240 | break; |
| 238 | case KC_X: // debug matrix toggle | 241 | case KC_X: // debug matrix toggle |
| 239 | debug_matrix = !debug_matrix; | 242 | debug_matrix = !debug_matrix; |
| 240 | if (debug_matrix) { | 243 | if (debug_matrix) { |
| 241 | print("\nDEBUG: matrix enabled.\n"); | 244 | print("\nmatrix: on\n"); |
| 242 | debug_enable = true; | 245 | debug_enable = true; |
| 243 | } else { | 246 | } else { |
| 244 | print("\nDEBUG: matrix disabled.\n"); | 247 | print("\nmatrix: off\n"); |
| 245 | } | 248 | } |
| 246 | break; | 249 | break; |
| 247 | case KC_K: // debug keyboard toggle | 250 | case KC_K: // debug keyboard toggle |
| 248 | debug_keyboard = !debug_keyboard; | 251 | debug_keyboard = !debug_keyboard; |
| 249 | if (debug_keyboard) { | 252 | if (debug_keyboard) { |
| 250 | print("\nDEBUG: keyboard enabled.\n"); | 253 | print("\nkeyboard: on\n"); |
| 251 | debug_enable = true; | 254 | debug_enable = true; |
| 252 | } else { | 255 | } else { |
| 253 | print("\nDEBUG: keyboard disabled.\n"); | 256 | print("\nkeyboard: off\n"); |
| 254 | } | 257 | } |
| 255 | break; | 258 | break; |
| 256 | case KC_M: // debug mouse toggle | 259 | case KC_M: // debug mouse toggle |
| 257 | debug_mouse = !debug_mouse; | 260 | debug_mouse = !debug_mouse; |
| 258 | if (debug_mouse) { | 261 | if (debug_mouse) { |
| 259 | print("\nDEBUG: mouse enabled.\n"); | 262 | print("\nmouse: on\n"); |
| 260 | debug_enable = true; | 263 | debug_enable = true; |
| 261 | } else { | 264 | } else { |
| 262 | print("\nDEBUG: mouse disabled.\n"); | 265 | print("\nmouse: off\n"); |
| 263 | } | 266 | } |
| 264 | break; | 267 | break; |
| 265 | case KC_V: // print version & information | 268 | case KC_V: // print version & information |
| 266 | print("\n\n----- Version -----\n"); | 269 | print("\n\t- Version -\n"); |
| 267 | print("DESC: " STR(DESCRIPTION) "\n"); | 270 | print("DESC: " STR(DESCRIPTION) "\n"); |
| 268 | print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " | 271 | print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " |
| 269 | "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " | 272 | "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " |
| @@ -307,14 +310,16 @@ static bool command_common(uint8_t code) | |||
| 307 | " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ | 310 | " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ |
| 308 | " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); | 311 | " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); |
| 309 | break; | 312 | break; |
| 310 | case KC_T: // print timer | ||
| 311 | print_val_hex32(timer_count); | ||
| 312 | break; | ||
| 313 | case KC_S: | 313 | case KC_S: |
| 314 | print("\n\n----- Status -----\n"); | 314 | print("\n\t- Status -\n"); |
| 315 | print_val_hex8(host_keyboard_leds()); | 315 | print_val_hex8(host_keyboard_leds()); |
| 316 | print_val_hex8(keyboard_protocol); | 316 | print_val_hex8(keyboard_protocol); |
| 317 | print_val_hex8(keyboard_idle); | 317 | print_val_hex8(keyboard_idle); |
| 318 | #ifdef NKRO_ENABLE | ||
| 319 | print_val_hex8(keyboard_nkro); | ||
| 320 | #endif | ||
| 321 | print_val_hex32(timer_count); | ||
| 322 | |||
| 318 | #ifdef PROTOCOL_PJRC | 323 | #ifdef PROTOCOL_PJRC |
| 319 | print_val_hex8(UDCON); | 324 | print_val_hex8(UDCON); |
| 320 | print_val_hex8(UDIEN); | 325 | print_val_hex8(UDIEN); |
| @@ -334,39 +339,21 @@ static bool command_common(uint8_t code) | |||
| 334 | clear_keyboard(); //Prevents stuck keys. | 339 | clear_keyboard(); //Prevents stuck keys. |
| 335 | keyboard_nkro = !keyboard_nkro; | 340 | keyboard_nkro = !keyboard_nkro; |
| 336 | if (keyboard_nkro) | 341 | if (keyboard_nkro) |
| 337 | print("NKRO: enabled\n"); | 342 | print("NKRO: on\n"); |
| 338 | else | 343 | else |
| 339 | print("NKRO: disabled\n"); | 344 | print("NKRO: off\n"); |
| 340 | break; | ||
| 341 | #endif | ||
| 342 | #ifdef EXTRAKEY_ENABLE | ||
| 343 | case KC_PSCREEN: | ||
| 344 | // TODO: Power key should take this feature? otherwise any key during suspend. | ||
| 345 | #ifdef PROTOCOL_PJRC | ||
| 346 | if (suspend && remote_wakeup) { | ||
| 347 | usb_remote_wakeup(); | ||
| 348 | } else { | ||
| 349 | host_system_send(SYSTEM_POWER_DOWN); | ||
| 350 | host_system_send(0); | ||
| 351 | _delay_ms(500); | ||
| 352 | } | ||
| 353 | #else | ||
| 354 | host_system_send(SYSTEM_POWER_DOWN); | ||
| 355 | _delay_ms(100); | ||
| 356 | host_system_send(0); | ||
| 357 | _delay_ms(500); | ||
| 358 | #endif | ||
| 359 | break; | 345 | break; |
| 360 | #endif | 346 | #endif |
| 361 | case KC_ESC: | 347 | case KC_ESC: |
| 362 | case KC_GRV: | 348 | case KC_GRV: |
| 363 | case KC_0: | 349 | case KC_0: |
| 350 | case KC_F10: | ||
| 364 | switch_default_layer(0); | 351 | switch_default_layer(0); |
| 365 | break; | 352 | break; |
| 366 | case KC_1 ... KC_9: | 353 | case KC_1 ... KC_9: |
| 367 | switch_default_layer((code - KC_1) + 1); | 354 | switch_default_layer((code - KC_1) + 1); |
| 368 | break; | 355 | break; |
| 369 | case KC_F1 ... KC_F12: | 356 | case KC_F1 ... KC_F9: |
| 370 | switch_default_layer((code - KC_F1) + 1); | 357 | switch_default_layer((code - KC_F1) + 1); |
| 371 | break; | 358 | break; |
| 372 | default: | 359 | default: |
| @@ -382,11 +369,12 @@ static bool command_common(uint8_t code) | |||
| 382 | ***********************************************************/ | 369 | ***********************************************************/ |
| 383 | static void command_console_help(void) | 370 | static void command_console_help(void) |
| 384 | { | 371 | { |
| 385 | print("\n\n----- Console Help -----\n"); | 372 | print("\n\t- Console -\n" |
| 386 | print("ESC/q: quit\n"); | 373 | "ESC/q: quit\n" |
| 387 | #ifdef MOUSEKEY_ENABLE | 374 | #ifdef MOUSEKEY_ENABLE |
| 388 | print("m: mousekey\n"); | 375 | "m: mousekey\n" |
| 389 | #endif | 376 | #endif |
| 377 | ); | ||
| 390 | } | 378 | } |
| 391 | 379 | ||
| 392 | static bool command_console(uint8_t code) | 380 | static bool command_console(uint8_t code) |
| @@ -398,14 +386,12 @@ static bool command_console(uint8_t code) | |||
| 398 | break; | 386 | break; |
| 399 | case KC_Q: | 387 | case KC_Q: |
| 400 | case KC_ESC: | 388 | case KC_ESC: |
| 401 | print("\nQuit Console Mode\n"); | ||
| 402 | command_state = ONESHOT; | 389 | command_state = ONESHOT; |
| 403 | return false; | 390 | return false; |
| 404 | #ifdef MOUSEKEY_ENABLE | 391 | #ifdef MOUSEKEY_ENABLE |
| 405 | case KC_M: | 392 | case KC_M: |
| 406 | mousekey_console_help(); | 393 | mousekey_console_help(); |
| 407 | print("\nEnter Mousekey Console\n"); | 394 | print("M> "); |
| 408 | print("M0>"); | ||
| 409 | command_state = MOUSEKEY; | 395 | command_state = MOUSEKEY; |
| 410 | return true; | 396 | return true; |
| 411 | #endif | 397 | #endif |
| @@ -426,16 +412,17 @@ static uint8_t mousekey_param = 0; | |||
| 426 | 412 | ||
| 427 | static void mousekey_param_print(void) | 413 | static void mousekey_param_print(void) |
| 428 | { | 414 | { |
| 429 | print("\n\n----- Mousekey Parameters -----\n"); | 415 | print("\n\t- Values -\n"); |
| 430 | print("1: mk_delay(*10ms): "); pdec(mk_delay); print("\n"); | 416 | print("1: delay(*10ms): "); pdec(mk_delay); print("\n"); |
| 431 | print("2: mk_interval(ms): "); pdec(mk_interval); print("\n"); | 417 | print("2: interval(ms): "); pdec(mk_interval); print("\n"); |
| 432 | print("3: mk_max_speed: "); pdec(mk_max_speed); print("\n"); | 418 | print("3: max_speed: "); pdec(mk_max_speed); print("\n"); |
| 433 | print("4: mk_time_to_max: "); pdec(mk_time_to_max); print("\n"); | 419 | print("4: time_to_max: "); pdec(mk_time_to_max); print("\n"); |
| 434 | print("5: mk_wheel_max_speed: "); pdec(mk_wheel_max_speed); print("\n"); | 420 | print("5: wheel_max_speed: "); pdec(mk_wheel_max_speed); print("\n"); |
| 435 | print("6: mk_wheel_time_to_max: "); pdec(mk_wheel_time_to_max); print("\n"); | 421 | print("6: wheel_time_to_max: "); pdec(mk_wheel_time_to_max); print("\n"); |
| 436 | } | 422 | } |
| 437 | 423 | ||
| 438 | #define PRINT_SET_VAL(v) print(#v " = "); print_dec(v); print("\n"); | 424 | //#define PRINT_SET_VAL(v) print(#v " = "); print_dec(v); print("\n"); |
| 425 | #define PRINT_SET_VAL(v) xprintf(#v " = %d\n", (v)) | ||
| 439 | static void mousekey_param_inc(uint8_t param, uint8_t inc) | 426 | static void mousekey_param_inc(uint8_t param, uint8_t inc) |
| 440 | { | 427 | { |
| 441 | switch (param) { | 428 | switch (param) { |
| @@ -534,24 +521,25 @@ static void mousekey_param_dec(uint8_t param, uint8_t dec) | |||
| 534 | 521 | ||
| 535 | static void mousekey_console_help(void) | 522 | static void mousekey_console_help(void) |
| 536 | { | 523 | { |
| 537 | print("\n\n----- Mousekey Parameters Help -----\n"); | 524 | print("\n\t- Mousekey -\n" |
| 538 | print("ESC/q: quit\n"); | 525 | "ESC/q: quit\n" |
| 539 | print("1: select mk_delay(*10ms)\n"); | 526 | "1: delay(*10ms)\n" |
| 540 | print("2: select mk_interval(ms)\n"); | 527 | "2: interval(ms)\n" |
| 541 | print("3: select mk_max_speed\n"); | 528 | "3: max_speed\n" |
| 542 | print("4: select mk_time_to_max\n"); | 529 | "4: time_to_max\n" |
| 543 | print("5: select mk_wheel_max_speed\n"); | 530 | "5: wheel_max_speed\n" |
| 544 | print("6: select mk_wheel_time_to_max\n"); | 531 | "6: wheel_time_to_max\n" |
| 545 | print("p: print parameters\n"); | 532 | "\n" |
| 546 | print("d: set default values\n"); | 533 | "p: print values\n" |
| 547 | print("up: increase parameters(+1)\n"); | 534 | "d: set defaults\n" |
| 548 | print("down: decrease parameters(-1)\n"); | 535 | "up: +1\n" |
| 549 | print("pgup: increase parameters(+10)\n"); | 536 | "down: -1\n" |
| 550 | print("pgdown: decrease parameters(-10)\n"); | 537 | "pgup: +10\n" |
| 551 | print("\nspeed = delta * max_speed * (repeat / time_to_max)\n"); | 538 | "pgdown: -10\n" |
| 552 | print("where delta: cursor="); pdec(MOUSEKEY_MOVE_DELTA); | 539 | "\n" |
| 553 | print(", wheel="); pdec(MOUSEKEY_WHEEL_DELTA); print("\n"); | 540 | "speed = delta * max_speed * (repeat / time_to_max)\n"); |
| 554 | print("See http://en.wikipedia.org/wiki/Mouse_keys\n"); | 541 | xprintf("where delta: cursor=%d, wheel=%d\n" |
| 542 | "See http://en.wikipedia.org/wiki/Mouse_keys\n", MOUSEKEY_MOVE_DELTA, MOUSEKEY_WHEEL_DELTA); | ||
| 555 | } | 543 | } |
| 556 | 544 | ||
| 557 | static bool mousekey_console(uint8_t code) | 545 | static bool mousekey_console(uint8_t code) |
| @@ -563,11 +551,14 @@ static bool mousekey_console(uint8_t code) | |||
| 563 | break; | 551 | break; |
| 564 | case KC_Q: | 552 | case KC_Q: |
| 565 | case KC_ESC: | 553 | case KC_ESC: |
| 566 | mousekey_param = 0; | 554 | if (mousekey_param) { |
| 567 | print("\nQuit Mousekey Console\n"); | 555 | mousekey_param = 0; |
| 568 | print("C> "); | 556 | } else { |
| 569 | command_state = CONSOLE; | 557 | print("C> "); |
| 570 | return false; | 558 | command_state = CONSOLE; |
| 559 | return false; | ||
| 560 | } | ||
| 561 | break; | ||
| 571 | case KC_P: | 562 | case KC_P: |
| 572 | mousekey_param_print(); | 563 | mousekey_param_print(); |
| 573 | break; | 564 | break; |
| @@ -577,12 +568,7 @@ static bool mousekey_console(uint8_t code) | |||
| 577 | case KC_4: | 568 | case KC_4: |
| 578 | case KC_5: | 569 | case KC_5: |
| 579 | case KC_6: | 570 | case KC_6: |
| 580 | case KC_7: | ||
| 581 | case KC_8: | ||
| 582 | case KC_9: | ||
| 583 | case KC_0: | ||
| 584 | mousekey_param = numkey2num(code); | 571 | mousekey_param = numkey2num(code); |
| 585 | print("selected parameter: "); pdec(mousekey_param); print("\n"); | ||
| 586 | break; | 572 | break; |
| 587 | case KC_UP: | 573 | case KC_UP: |
| 588 | mousekey_param_inc(mousekey_param, 1); | 574 | mousekey_param_inc(mousekey_param, 1); |
| @@ -603,13 +589,16 @@ static bool mousekey_console(uint8_t code) | |||
| 603 | mk_time_to_max = MOUSEKEY_TIME_TO_MAX; | 589 | mk_time_to_max = MOUSEKEY_TIME_TO_MAX; |
| 604 | mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; | 590 | mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; |
| 605 | mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; | 591 | mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; |
| 606 | print("set default values.\n"); | 592 | print("set default\n"); |
| 607 | break; | 593 | break; |
| 608 | default: | 594 | default: |
| 609 | print("?"); | 595 | print("?"); |
| 610 | return false; | 596 | return false; |
| 611 | } | 597 | } |
| 612 | print("M"); pdec(mousekey_param); print("> "); | 598 | if (mousekey_param) |
| 599 | xprintf("M%d> ", mousekey_param); | ||
| 600 | else | ||
| 601 | print("M>" ); | ||
| 613 | return true; | 602 | return true; |
| 614 | } | 603 | } |
| 615 | #endif | 604 | #endif |
| @@ -637,8 +626,7 @@ static uint8_t numkey2num(uint8_t code) | |||
| 637 | 626 | ||
| 638 | static void switch_default_layer(uint8_t layer) | 627 | static void switch_default_layer(uint8_t layer) |
| 639 | { | 628 | { |
| 640 | print("switch_default_layer: "); print_dec(biton32(default_layer_state)); | 629 | xprintf("L%d\n", layer); |
| 641 | print(" to "); print_dec(layer); print("\n"); | ||
| 642 | default_layer_set(1UL<<layer); | 630 | default_layer_set(1UL<<layer); |
| 643 | clear_keyboard(); | 631 | clear_keyboard(); |
| 644 | } | 632 | } |
