Peter's keyboard firmware (QMK)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 2.0KB

  1. # Testing and Debugging
  2. Once you've flashed your keyboard with a custom firmware you're ready to test it out. With a little bit of luck everything will work perfectly, but if not this document will help you figure out what's wrong.
  3. ## Testing
  4. Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. There are even programs that will help you make sure that no key is missed.
  5. Note: These programs are not provided by or endorsed by QMK.
  6. * [Switch Hitter]( (Windows Only)
  7. * [Keyboard Viewer]( (Mac Only)
  8. * [Keyboard Tester]( (Web Based)
  9. * [Keyboard Checker]( (Web Based)
  10. ## Debugging With QMK Toolbox
  11. [QMK Toolbox]( will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your ``. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command]( feature to enable debug mode, or add the following code to your keymap.
  12. ```c
  13. void keyboard_post_init_user(void) {
  14. // Customise these values to desired behaviour
  15. debug_enable=true;
  16. debug_matrix=true;
  17. //debug_keyboard=true;
  18. //debug_mouse=true;
  19. }
  20. ```
  21. <!-- FIXME: Describe the debugging messages here. -->
  22. ## Sending Your Own Debug Messages
  23. Sometimes it's useful to print debug messages from within your [custom code]( Doing so is pretty simple. Start by including `print.h` at the top of your file:
  24. #include <print.h>
  25. After that you can use a few different print functions:
  26. * `print("string")`: Print a simple string.
  27. * `uprintf("%s string", var)`: Print a formatted string
  28. * `dprint("string")` Print a simple string, but only when debug mode is enabled
  29. * `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled