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.

22 lines
784 B

  1. """List the keymaps for a specific keyboard
  2. """
  3. from milc import cli
  4. import qmk.keymap
  5. from qmk.decorators import automagic_keyboard
  6. from qmk.keyboard import keyboard_completer, keyboard_folder
  7. @cli.argument("-kb", "--keyboard", type=keyboard_folder, completer=keyboard_completer, help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
  8. @cli.subcommand("List the keymaps for a specific keyboard")
  9. @automagic_keyboard
  10. def list_keymaps(cli):
  11. """List the keymaps for a specific keyboard
  12. """
  13. if not cli.config.list_keymaps.keyboard:
  14. cli.log.error('Missing required arguments: --keyboard')
  15. cli.subcommands['list-keymaps'].print_help()
  16. return False
  17. for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
  18. print(name)