~ruther/qmk_firmware

ref: 1a300d05bd420d05e2c6106a4c7d1380f413590f qmk_firmware/lib/python/qmk/cli/list/keymaps.py -rw-r--r-- 784 bytes
1a300d05 — Felix Jen [Keyboard] Add Velvet hotswap & solder (#22284) 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""List the keymaps for a specific keyboard
"""
from milc import cli

import qmk.keymap
from qmk.decorators import automagic_keyboard
from qmk.keyboard import keyboard_completer, keyboard_folder


@cli.argument("-kb", "--keyboard", type=keyboard_folder, completer=keyboard_completer, help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
@cli.subcommand("List the keymaps for a specific keyboard")
@automagic_keyboard
def list_keymaps(cli):
    """List the keymaps for a specific keyboard
    """
    if not cli.config.list_keymaps.keyboard:
        cli.log.error('Missing required arguments: --keyboard')
        cli.subcommands['list-keymaps'].print_help()
        return False

    for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
        print(name)
Do not follow this link