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.

107 lines
2.4 KiB

  1. # Terminal
  2. > This feature is currently *huge*, and should probably only be put on boards with a lot of memory, or for fun.
  3. The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor.
  4. To enable, stick this in your `rules.mk` or `Makefile`:
  5. TERMINAL_ENABLE = yes
  6. And use the `TERM_ON` and `TERM_OFF` keycodes to turn it on or off.
  7. When enabled, a `> ` prompt will appear, where you'll be able to type, backspace (a bell will ding if you reach the beginning and audio is enabled), and hit enter to send the command. Arrow keys are currently disabled so it doesn't get confused. Moving your cursor around with the mouse is discouraged.
  8. `#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page.
  9. Pressing "up" and "down" will allow you to cycle through the past 5 commands entered.
  10. ## Future Ideas
  11. * Keyboard/user-extensible commands
  12. * Smaller footprint
  13. * Arrow key support
  14. * Command history - Done
  15. * SD card support
  16. * LCD support for buffer display
  17. * Keycode -> name string LUT
  18. * Layer status
  19. * *Analog/digital port read/write*
  20. * RGB mode stuff
  21. * Macro definitions
  22. * EEPROM read/write
  23. * Audio control
  24. ## Current Commands
  25. ### `about`
  26. Prints out the current version of QMK with a build date:
  27. ```
  28. > about
  29. QMK Firmware
  30. v0.5.115-7-g80ed73-dirty
  31. Built: 2017-08-29-20:24:44
  32. ```
  33. ### `print-buffer`
  34. Outputs the last 5 commands entered
  35. ```
  36. > print-buffer
  37. 0. print-buffer
  38. 1. help
  39. 2. about
  40. 3. keymap 0
  41. 4. help
  42. 5. flush-buffer
  43. ```
  44. ### `flush-buffer`
  45. Clears command buffer
  46. ```
  47. > flush-buffer
  48. Buffer cleared!
  49. ```
  50. ### `help`
  51. Prints out the available commands:
  52. ```
  53. > help
  54. commands available:
  55. about help keycode keymap exit print-buffer flush-buffer
  56. ```
  57. ### `keycode <layer> <row> <col>`
  58. Prints out the keycode value of a certain layer, row, and column:
  59. ```
  60. > keycode 0 1 0
  61. 0x29 (41)
  62. ```
  63. ### `keymap <layer>`
  64. Prints out the entire keymap for a certain layer
  65. ```
  66. > keymap 0
  67. 0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a,
  68. 0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034,
  69. 0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028,
  70. 0x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f,
  71. >
  72. ```
  73. ### `exit`
  74. Exits the terminal - same as `TERM_OFF`.