diff options
Diffstat (limited to 'data')
| -rw-r--r-- | data/mappings/info_config.json | 58 | ||||
| -rw-r--r-- | data/mappings/info_rules.json | 14 | ||||
| -rw-r--r-- | data/schemas/api_keyboard.jsonschema | 44 | ||||
| -rw-r--r-- | data/schemas/definitions.jsonschema | 107 | ||||
| -rw-r--r-- | data/schemas/keyboard.jsonschema | 453 | ||||
| -rw-r--r-- | data/schemas/keymap.jsonschema | 24 | ||||
| -rw-r--r-- | data/templates/avr/config.h | 152 | ||||
| -rw-r--r-- | data/templates/avr/readme.md | 27 | ||||
| -rw-r--r-- | data/templates/avr/rules.mk | 22 | ||||
| -rw-r--r-- | data/templates/base/info.json | 19 | ||||
| -rw-r--r-- | data/templates/base/keyboard.c | 17 | ||||
| -rw-r--r-- | data/templates/base/keyboard.h | 35 | ||||
| -rw-r--r-- | data/templates/base/keymaps/default/keymap.c | 62 | ||||
| -rw-r--r-- | data/templates/base/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | data/templates/ps2avrgb/config.h | 142 | ||||
| -rw-r--r-- | data/templates/ps2avrgb/readme.md | 28 | ||||
| -rw-r--r-- | data/templates/ps2avrgb/rules.mk | 19 |
17 files changed, 982 insertions, 242 deletions
diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json index b949b1332..72bb0f4a1 100644 --- a/data/mappings/info_config.json +++ b/data/mappings/info_config.json | |||
| @@ -1,21 +1,48 @@ | |||
| 1 | # This file maps keys between `config.h` and `info.json`. It is used by QMK | 1 | # This file maps keys between `config.h` and `info.json`. It is used by QMK |
| 2 | # to correctly and consistently map back and forth between the two systems. | 2 | # to correctly and consistently map back and forth between the two systems. |
| 3 | { | 3 | { |
| 4 | # Format: | 4 | # Format: |
| 5 | # <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} | 5 | # <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} |
| 6 | # value_type: one of "array", "array.int", "int", "hex", "list", "mapping" | 6 | # value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping" |
| 7 | # to_json: Default `true`. Set to `false` to exclude this mapping from info.json | 7 | # to_json: Default `true`. Set to `false` to exclude this mapping from info.json |
| 8 | # to_c: Default `true`. Set to `false` to exclude this mapping from config.h | 8 | # to_c: Default `true`. Set to `false` to exclude this mapping from config.h |
| 9 | # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places | 9 | # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places |
| 10 | "DEBOUNCE": {"info_key": "debounce", "value_type": "int"} | 10 | "AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"}, |
| 11 | "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"}, | ||
| 12 | "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"}, | ||
| 13 | "BACKLIGHT_PIN": {"info_key": "backlight.pin"}, | ||
| 14 | "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"}, | ||
| 15 | "COMBO_TERM": {"info_key": "combo.term", "value_type": "int"}, | ||
| 16 | "DEBOUNCE": {"info_key": "debounce", "value_type": "int"}, | ||
| 11 | "DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"}, | 17 | "DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"}, |
| 12 | "DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false}, | 18 | "DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false}, |
| 13 | "DIODE_DIRECTION": {"info_key": "diode_direction"}, | 19 | "DIODE_DIRECTION": {"info_key": "diode_direction"}, |
| 20 | "FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"}, | ||
| 21 | "DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"}, | ||
| 22 | "DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"}, | ||
| 23 | "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "tapping.ignore_mod_tap_interrupt", "value_type": "bool"}, | ||
| 24 | "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "tapping.ignore_mod_tap_interrupt_per_key", "value_type": "bool"}, | ||
| 14 | "LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"}, | 25 | "LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"}, |
| 26 | "LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "bool"}, | ||
| 27 | "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"}, | ||
| 28 | "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"}, | ||
| 15 | "LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"}, | 29 | "LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"}, |
| 16 | "LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"}, | 30 | "LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"}, |
| 17 | "LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"}, | 31 | "LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"}, |
| 18 | "MANUFACTURER": {"info_key": "manufacturer"}, | 32 | "MANUFACTURER": {"info_key": "manufacturer"}, |
| 33 | "MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"}, | ||
| 34 | "MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"}, | ||
| 35 | "MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"}, | ||
| 36 | "MOUSEKEY_INTERVAL": {"info_key": "mousekey.interval", "value_type": "int"}, | ||
| 37 | "MOUSEKEY_MAX_SPEED": {"info_key": "mousekey.max_speed", "value_type": "int"}, | ||
| 38 | "MOUSEKEY_TIME_TO_MAX": {"info_key": "mousekey.time_to_max", "value_type": "int"}, | ||
| 39 | "MOUSEKEY_WHEEL_DELAY": {"info_key": "mousekey.wheel_delay", "value_type": "int"}, | ||
| 40 | "ONESHOT_TIMEOUT": {"info_key": "oneshot.timeout", "value_type": "int"}, | ||
| 41 | "ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"}, | ||
| 42 | "PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "bool"}, | ||
| 43 | "PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"}, | ||
| 44 | "RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"}, | ||
| 45 | "RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"}, | ||
| 19 | "RGB_DI_PIN": {"info_key": "rgblight.pin"}, | 46 | "RGB_DI_PIN": {"info_key": "rgblight.pin"}, |
| 20 | "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, | 47 | "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, |
| 21 | "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, | 48 | "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, |
| @@ -30,17 +57,40 @@ | |||
| 30 | "RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"}, | 57 | "RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"}, |
| 31 | "RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"}, | 58 | "RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"}, |
| 32 | "RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"}, | 59 | "RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"}, |
| 60 | "RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"}, | ||
| 61 | "RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"}, | ||
| 62 | "RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"}, | ||
| 33 | "RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"}, | 63 | "RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"}, |
| 64 | "RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"}, | ||
| 34 | "RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"}, | 65 | "RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"}, |
| 35 | "RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"}, | 66 | "RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"}, |
| 36 | "RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"}, | 67 | "RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"}, |
| 37 | "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, | 68 | "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, |
| 38 | "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, | 69 | "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, |
| 70 | "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, | ||
| 39 | "PRODUCT": {"info_key": "keyboard_folder", "to_json": false}, | 71 | "PRODUCT": {"info_key": "keyboard_folder", "to_json": false}, |
| 40 | "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, | 72 | "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, |
| 41 | "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, | 73 | "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, |
| 42 | "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, | 74 | "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, |
| 43 | "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, | 75 | "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, |
| 76 | "QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int"}, | ||
| 44 | "QMK_LED": {"info_key": "qmk_lufa_bootloader.led"}, | 77 | "QMK_LED": {"info_key": "qmk_lufa_bootloader.led"}, |
| 45 | "QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"} | 78 | "QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}, |
| 79 | "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"}, | ||
| 80 | "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"}, | ||
| 81 | "SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"}, | ||
| 82 | "SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"}, | ||
| 83 | "SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"}, | ||
| 84 | "SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"}, | ||
| 85 | "SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"}, | ||
| 86 | "TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"}, | ||
| 87 | "TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"}, | ||
| 88 | "TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool"}, | ||
| 89 | "TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool"}, | ||
| 90 | "TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"}, | ||
| 91 | "TAPPING_TERM_PER_KEY": {"info_key": "tapping.term_per_key", "value_type": "bool"}, | ||
| 92 | "TAPPING_TOGGLE": {"info_key": "tapping.toggle", "value_type": "int"}, | ||
| 93 | "USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"}, | ||
| 94 | "USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"}, | ||
| 95 | "USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"}, | ||
| 46 | } | 96 | } |
diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json index 97f772c4d..aea67e04c 100644 --- a/data/mappings/info_rules.json +++ b/data/mappings/info_rules.json | |||
| @@ -1,15 +1,25 @@ | |||
| 1 | # This file maps keys between `rules.mk` and `info.json`. It is used by QMK | 1 | # This file maps keys between `rules.mk` and `info.json`. It is used by QMK |
| 2 | # to correctly and consistently map back and forth between the two systems. | 2 | # to correctly and consistently map back and forth between the two systems. |
| 3 | { | 3 | { |
| 4 | # Format: | 4 | # Format: |
| 5 | # <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} | 5 | # <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} |
| 6 | # value_type: one of "array", "array.int", "int", "list", "hex", "mapping" | 6 | # value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping" |
| 7 | # to_json: Default `true`. Set to `false` to exclude this mapping from info.json | 7 | # to_json: Default `true`. Set to `false` to exclude this mapping from info.json |
| 8 | # to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk | 8 | # to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk |
| 9 | # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places | 9 | # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places |
| 10 | "BOARD": {"info_key": "board"}, | 10 | "BOARD": {"info_key": "board"}, |
| 11 | "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, | 11 | "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, |
| 12 | "BLUETOOTH": {"info_key": "bluetooth.driver"}, | ||
| 13 | "FIRMWARE_FORMAT": {"info_key": "build.firmware_format"}, | ||
| 14 | "KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"}, | ||
| 15 | "MOUSE_SHARED_EP": {"info_key": "usb.shared_endpoint.mouse", "value_type": "bool"}, | ||
| 12 | "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, | 16 | "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, |
| 13 | "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, | 17 | "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, |
| 18 | "LTO_ENABLE": {"info_key": "build.lto", "value_type": "bool"}, | ||
| 14 | "MCU": {"info_key": "processor", "warn_duplicate": false}, | 19 | "MCU": {"info_key": "processor", "warn_duplicate": false}, |
| 20 | "MOUSEKEY_ENABLE": {"info_key": "mouse_key.enabled", "value_type": "bool"}, | ||
| 21 | "NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"}, | ||
| 22 | "SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"}, | ||
| 23 | "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "value_type": "str", "to_c": false}, | ||
| 24 | "WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"} | ||
| 15 | } | 25 | } |
diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema index d570ee999..d638658a1 100644 --- a/data/schemas/api_keyboard.jsonschema +++ b/data/schemas/api_keyboard.jsonschema | |||
| @@ -1,34 +1,22 @@ | |||
| 1 | { | 1 | { |
| 2 | "$id": "qmk.api.keyboard.v1", | ||
| 2 | "allOf": [ | 3 | "allOf": [ |
| 3 | { "$ref": "qmk.keyboard.v1" }, | 4 | {"$ref": "qmk.keyboard.v1"}, |
| 4 | { | 5 | { |
| 5 | "$id": "qmk.api.keyboard.v1", | 6 | "properties": { |
| 6 | "keymaps": { | 7 | "keymaps": { |
| 7 | "type": "string" | 8 | "type": "object", |
| 8 | }, | 9 | "properties": { |
| 9 | "parse_errors": { | 10 | "url": {"type": "string"} |
| 10 | "type": "array", | 11 | } |
| 11 | "items": { | 12 | |
| 12 | "type": "string" | 13 | }, |
| 13 | } | 14 | "parse_errors": {"$ref": "qmk.definitions.v1#/string_array"}, |
| 14 | }, | 15 | "parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"}, |
| 15 | "parse_warnings": { | 16 | "processor_type": {"type": "string"}, |
| 16 | "type": "array", | 17 | "protocol": {"type": "string"}, |
| 17 | "items": { | 18 | "keyboard_folder": {"type": "string"}, |
| 18 | "type": "string" | 19 | "platform": {"type": "string"} |
| 19 | } | ||
| 20 | }, | ||
| 21 | "processor_type": { | ||
| 22 | "type": "string" | ||
| 23 | }, | ||
| 24 | "protocol": { | ||
| 25 | "type": "string" | ||
| 26 | }, | ||
| 27 | "keyboard_folder": { | ||
| 28 | "type": "string" | ||
| 29 | }, | ||
| 30 | "platform": { | ||
| 31 | "type": "string" | ||
| 32 | } | 20 | } |
| 33 | } | 21 | } |
| 34 | ] | 22 | ] |
diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema new file mode 100644 index 000000000..822f23707 --- /dev/null +++ b/data/schemas/definitions.jsonschema | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | { | ||
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", | ||
| 3 | "$id": "qmk.definitions.v1", | ||
| 4 | "title": "Common definitions used across QMK's jsonschemas.", | ||
| 5 | "type": "object", | ||
| 6 | "boolean_array": { | ||
| 7 | "type": "object", | ||
| 8 | "additionalProperties": {"type": "boolean"} | ||
| 9 | }, | ||
| 10 | "filename": { | ||
| 11 | "type": "string", | ||
| 12 | "minLength": 1, | ||
| 13 | "pattern": "^[0-9a-z_]*$" | ||
| 14 | }, | ||
| 15 | "hex_number_2d": { | ||
| 16 | "type": "string", | ||
| 17 | "pattern": "^0x[0-9A-F]{2}$" | ||
| 18 | }, | ||
| 19 | "hex_number_4d": { | ||
| 20 | "type": "string", | ||
| 21 | "pattern": "^0x[0-9A-F]{4}$" | ||
| 22 | }, | ||
| 23 | "text_identifier": { | ||
| 24 | "type": "string", | ||
| 25 | "minLength": 1, | ||
| 26 | "maxLength": 250 | ||
| 27 | }, | ||
| 28 | "layout_macro": { | ||
| 29 | "oneOf": [ | ||
| 30 | { | ||
| 31 | "type": "string", | ||
| 32 | "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"] | ||
| 33 | }, | ||
| 34 | { | ||
| 35 | "type": "string", | ||
| 36 | "pattern": "^LAYOUT_[0-9a-z_]*$" | ||
| 37 | } | ||
| 38 | ] | ||
| 39 | }, | ||
| 40 | "key_unit": { | ||
| 41 | "type": "number", | ||
| 42 | "min": 0.25 | ||
| 43 | }, | ||
| 44 | "mcu_pin_array": { | ||
| 45 | "type": "array", | ||
| 46 | "items": {"$ref": "#/mcu_pin"} | ||
| 47 | }, | ||
| 48 | "mcu_pin": { | ||
| 49 | "oneOf": [ | ||
| 50 | { | ||
| 51 | "type": "string", | ||
| 52 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 53 | }, | ||
| 54 | { | ||
| 55 | "type": "string", | ||
| 56 | "pattern": "^LINE_PIN\\d{1,2}$" | ||
| 57 | }, | ||
| 58 | { | ||
| 59 | "type": "number", | ||
| 60 | "multipleOf": 1 | ||
| 61 | }, | ||
| 62 | { | ||
| 63 | "type": "null" | ||
| 64 | } | ||
| 65 | ] | ||
| 66 | }, | ||
| 67 | "signed_decimal": { | ||
| 68 | "type": "number" | ||
| 69 | }, | ||
| 70 | "signed_int": { | ||
| 71 | "type": "number", | ||
| 72 | "multipleOf": 1 | ||
| 73 | } | ||
| 74 | "signed_int_8": { | ||
| 75 | "type": "number", | ||
| 76 | "min": -127, | ||
| 77 | "max": 127, | ||
| 78 | "multipleOf": 1 | ||
| 79 | } | ||
| 80 | "string_array": { | ||
| 81 | "type": "array", | ||
| 82 | "items": { | ||
| 83 | "type": "string" | ||
| 84 | } | ||
| 85 | }, | ||
| 86 | "string_object": { | ||
| 87 | "type": "object", | ||
| 88 | "additionalProperties": { | ||
| 89 | "type": "string" | ||
| 90 | } | ||
| 91 | }, | ||
| 92 | "unsigned_decimal": { | ||
| 93 | "type": "number", | ||
| 94 | "min": 0 | ||
| 95 | }, | ||
| 96 | "unsigned_int": { | ||
| 97 | "type": "number", | ||
| 98 | "min": 0, | ||
| 99 | "multipleOf": 1 | ||
| 100 | } | ||
| 101 | "unsigned_int_8": { | ||
| 102 | "type": "number", | ||
| 103 | "min": 0, | ||
| 104 | "max": 255, | ||
| 105 | "multipleOf": 1 | ||
| 106 | } | ||
| 107 | } | ||
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index c335f49d5..78c9a8d36 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema | |||
| @@ -1,31 +1,53 @@ | |||
| 1 | { | 1 | { |
| 2 | "$schema": "http://json-schema.org/schema#", | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | "$id": "qmk.keyboard.v1", | 3 | "$id": "qmk.keyboard.v1", |
| 4 | "title": "Keyboard Information", | 4 | "title": "Keyboard Information", |
| 5 | "type": "object", | 5 | "type": "object", |
| 6 | "properties": { | 6 | "properties": { |
| 7 | "keyboard_name": { | 7 | "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, |
| 8 | "type": "string", | 8 | "maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"}, |
| 9 | "minLength": 2, | 9 | "manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"}, |
| 10 | "maxLength": 250 | ||
| 11 | }, | ||
| 12 | "maintainer": { | ||
| 13 | "type": "string", | ||
| 14 | "minLength": 2, | ||
| 15 | "maxLength": 250 | ||
| 16 | }, | ||
| 17 | "manufacturer": { | ||
| 18 | "type": "string", | ||
| 19 | "minLength": 2, | ||
| 20 | "maxLength": 250 | ||
| 21 | }, | ||
| 22 | "url": { | 10 | "url": { |
| 23 | "type": "string", | 11 | "type": "string", |
| 24 | "format": "uri" | 12 | "format": "uri" |
| 25 | }, | 13 | }, |
| 26 | "processor": { | 14 | "processor": { |
| 27 | "type": "string", | 15 | "type": "string", |
| 28 | "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] | 16 | "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] |
| 17 | }, | ||
| 18 | "audio": { | ||
| 19 | "type": "object", | ||
| 20 | "additionalProperties": false, | ||
| 21 | "properties": { | ||
| 22 | "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, | ||
| 23 | "voices": {"type": "boolean"} | ||
| 24 | } | ||
| 25 | }, | ||
| 26 | "backlight": { | ||
| 27 | "type": "object", | ||
| 28 | "additionalProperties": false, | ||
| 29 | "properties": { | ||
| 30 | "breathing": {"type": "boolean"}, | ||
| 31 | "breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, | ||
| 32 | "levels": { | ||
| 33 | "type": "number", | ||
| 34 | "min": 1, | ||
| 35 | "max": 31, | ||
| 36 | "multipleOf": 1 | ||
| 37 | }, | ||
| 38 | "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"} | ||
| 39 | } | ||
| 40 | }, | ||
| 41 | "bluetooth": { | ||
| 42 | "type": "object", | ||
| 43 | "additionalProperties": false, | ||
| 44 | "properties": { | ||
| 45 | "driver": { | ||
| 46 | "type": "string", | ||
| 47 | "enum": ["AdafruitBLE", "RN42"] | ||
| 48 | }, | ||
| 49 | "lto": {"type": "boolean"}, | ||
| 50 | } | ||
| 29 | }, | 51 | }, |
| 30 | "board": { | 52 | "board": { |
| 31 | "type": "string", | 53 | "type": "string", |
| @@ -34,68 +56,55 @@ | |||
| 34 | }, | 56 | }, |
| 35 | "bootloader": { | 57 | "bootloader": { |
| 36 | "type": "string", | 58 | "type": "string", |
| 37 | "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"] | 59 | "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"], |
| 38 | }, | 60 | }, |
| 39 | "diode_direction": { | 61 | "bootloader_instructions": { |
| 40 | "type": "string", | 62 | "type": "string", |
| 41 | "enum": ["COL2ROW", "ROW2COL"] | 63 | "description": "Instructions for putting the keyboard into a mode that allows for firmware flashing." |
| 42 | }, | 64 | }, |
| 43 | "debounce": { | 65 | "build": { |
| 44 | "type": "number", | 66 | "type": "object", |
| 45 | "min": 0, | 67 | "additionalProperties": false, |
| 46 | "multipleOf": 1 | 68 | "properties": { |
| 69 | "debounce_type": { | ||
| 70 | "type": "string", | ||
| 71 | "enum": ["custom", "eager_pk", "eager_pr", "sym_defer_pk", "sym_eager_pk"] | ||
| 72 | }, | ||
| 73 | "firmware_format": { | ||
| 74 | "type": "string", | ||
| 75 | "enum": ["bin", "hex", "uf2"] | ||
| 76 | }, | ||
| 77 | "lto": {"type": "boolean"}, | ||
| 78 | } | ||
| 47 | }, | 79 | }, |
| 48 | "height": { | 80 | "diode_direction": { |
| 49 | "type": "number", | 81 | "type": "string", |
| 50 | "min": 0.25 | 82 | "enum": ["COL2ROW", "ROW2COL"] |
| 51 | }, | 83 | }, |
| 52 | "width": { | 84 | "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"}, |
| 53 | "type": "number", | 85 | "combo": { |
| 54 | "min": 0.25 | 86 | "type": "object", |
| 87 | "properties": { | ||
| 88 | "count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 89 | "term": {"$ref": "qmk.definitions.v1#/unsigned_int"} | ||
| 90 | } | ||
| 55 | }, | 91 | }, |
| 56 | "community_layouts": { | 92 | "community_layouts": { |
| 57 | "type": "array", | 93 | "type": "array", |
| 58 | "items": { | 94 | "items": {"$ref": "qmk.definitions.v1#/filename"} |
| 59 | "type": "string", | ||
| 60 | "minLength": 2, | ||
| 61 | "pattern": "^[0-9a-z_]*$" | ||
| 62 | } | ||
| 63 | }, | ||
| 64 | "features": { | ||
| 65 | "type": "object", | ||
| 66 | "additionalProperties": {"type": "boolean"} | ||
| 67 | }, | 95 | }, |
| 96 | "features": {"$ref": "qmk.definitions.v1#/boolean_array"}, | ||
| 68 | "indicators": { | 97 | "indicators": { |
| 69 | "type": "object", | 98 | "type": "object", |
| 70 | "properties": { | 99 | "properties": { |
| 71 | "caps_lock": { | 100 | "caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 72 | "type": "string", | 101 | "num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 73 | "pattern": "^[A-K]\\d{1,2}$" | 102 | "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"} |
| 74 | }, | ||
| 75 | "num_lock": { | ||
| 76 | "type": "string", | ||
| 77 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 78 | }, | ||
| 79 | "scroll_lock": { | ||
| 80 | "type": "string", | ||
| 81 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 82 | } | ||
| 83 | } | 103 | } |
| 84 | }, | 104 | }, |
| 85 | "layout_aliases": { | 105 | "layout_aliases": { |
| 86 | "type": "object", | 106 | "type": "object", |
| 87 | "additionalProperties": { | 107 | "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"} |
| 88 | "oneOf": [ | ||
| 89 | { | ||
| 90 | "type": "string", | ||
| 91 | "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"] | ||
| 92 | }, | ||
| 93 | { | ||
| 94 | "type": "string", | ||
| 95 | "pattern": "^LAYOUT_[0-9a-z_]*$" | ||
| 96 | } | ||
| 97 | ] | ||
| 98 | } | ||
| 99 | }, | 108 | }, |
| 100 | "layouts": { | 109 | "layouts": { |
| 101 | "type": "object", | 110 | "type": "object", |
| @@ -109,11 +118,7 @@ | |||
| 109 | "c_macro": { | 118 | "c_macro": { |
| 110 | "type": "boolean" | 119 | "type": "boolean" |
| 111 | }, | 120 | }, |
| 112 | "key_count": { | 121 | "key_count": {"$ref": "qmk.definitions.v1#/key_unit"}, |
| 113 | "type": "number", | ||
| 114 | "min": 0, | ||
| 115 | "multipleOf": 1 | ||
| 116 | }, | ||
| 117 | "layout": { | 122 | "layout": { |
| 118 | "type": "array", | 123 | "type": "array", |
| 119 | "items": { | 124 | "items": { |
| @@ -131,101 +136,61 @@ | |||
| 131 | "multipleOf": 1 | 136 | "multipleOf": 1 |
| 132 | } | 137 | } |
| 133 | }, | 138 | }, |
| 134 | "h": { | 139 | "key_count": {"$ref": "qmk.definitions.v1#/key_unit"}, |
| 135 | "type": "number", | 140 | "r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, |
| 136 | "min": 0.25 | 141 | "rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, |
| 137 | }, | 142 | "ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, |
| 138 | "r": { | 143 | "h": {"$ref": "qmk.definitions.v1#/key_unit"}, |
| 139 | "type": "number", | 144 | "w": {"$ref": "qmk.definitions.v1#/key_unit"}, |
| 140 | "min": 0 | 145 | "x": {"$ref": "qmk.definitions.v1#/key_unit"}, |
| 141 | }, | 146 | "y": {"$ref": "qmk.definitions.v1#/key_unit"} |
| 142 | "rx": { | ||
| 143 | "type": "number", | ||
| 144 | "min": 0 | ||
| 145 | }, | ||
| 146 | "ry": { | ||
| 147 | "type": "number", | ||
| 148 | "min": 0 | ||
| 149 | }, | ||
| 150 | "w": { | ||
| 151 | "type": "number", | ||
| 152 | "min": 0.25 | ||
| 153 | }, | ||
| 154 | "x": { | ||
| 155 | "type": "number", | ||
| 156 | "min": 0 | ||
| 157 | }, | ||
| 158 | "y": { | ||
| 159 | "type": "number", | ||
| 160 | "min": 0 | ||
| 161 | } | ||
| 162 | } | 147 | } |
| 163 | } | 148 | } |
| 164 | } | 149 | } |
| 165 | } | 150 | } |
| 166 | } | 151 | } |
| 167 | }, | 152 | }, |
| 153 | "leader_key": { | ||
| 154 | "type": "object", | ||
| 155 | "properties": { | ||
| 156 | "timing": {"type": "boolean"}, | ||
| 157 | "strict_processing": {"type": "boolean"}, | ||
| 158 | "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} | ||
| 159 | } | ||
| 160 | }, | ||
| 168 | "matrix_pins": { | 161 | "matrix_pins": { |
| 169 | "type": "object", | 162 | "type": "object", |
| 170 | "additionalProperties": false, | 163 | "additionalProperties": false, |
| 171 | "properties": { | 164 | "properties": { |
| 165 | "custom": {"type": "boolean"}, | ||
| 166 | "custom_lite": {"type": "boolean"}, | ||
| 167 | "ghost": {"type": "boolean"}, | ||
| 168 | "io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 172 | "direct": { | 169 | "direct": { |
| 173 | "type": "array", | 170 | "type": "array", |
| 174 | "items": { | 171 | "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} |
| 175 | "type": "array", | ||
| 176 | "items": { | ||
| 177 | "oneOf": [ | ||
| 178 | { | ||
| 179 | "type": "string", | ||
| 180 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 181 | }, | ||
| 182 | { | ||
| 183 | "type": "number", | ||
| 184 | "multipleOf": 1 | ||
| 185 | }, | ||
| 186 | { | ||
| 187 | "type": "null" | ||
| 188 | } | ||
| 189 | ] | ||
| 190 | } | ||
| 191 | } | ||
| 192 | }, | ||
| 193 | "cols": { | ||
| 194 | "type": "array", | ||
| 195 | "items": { | ||
| 196 | "oneOf": [ | ||
| 197 | { | ||
| 198 | "type": "string", | ||
| 199 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 200 | }, | ||
| 201 | { | ||
| 202 | "type": "number", | ||
| 203 | "multipleOf": 1 | ||
| 204 | }, | ||
| 205 | { | ||
| 206 | "type": "null" | ||
| 207 | } | ||
| 208 | ] | ||
| 209 | } | ||
| 210 | }, | 172 | }, |
| 211 | "rows": { | 173 | "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, |
| 212 | "type": "array", | 174 | "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, |
| 213 | "items": { | 175 | "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} |
| 214 | "oneOf": [ | 176 | } |
| 215 | { | 177 | }, |
| 216 | "type": "string", | 178 | "mouse_key": { |
| 217 | "pattern": "^[A-K]\\d{1,2}$" | 179 | "type": "object", |
| 218 | }, | 180 | "properties": { |
| 219 | { | 181 | "enabled": {"type": "boolean"}, |
| 220 | "type": "number", | 182 | "delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} |
| 221 | "multipleOf": 1 | 183 | "interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} |
| 222 | }, | 184 | "max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} |
| 223 | { | 185 | "time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} |
| 224 | "type": "null" | 186 | "wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} |
| 225 | } | 187 | } |
| 226 | ] | 188 | }, |
| 227 | } | 189 | "oneshot": { |
| 228 | } | 190 | "type": "object", |
| 191 | "properties": { | ||
| 192 | "tap_toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 193 | "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} | ||
| 229 | } | 194 | } |
| 230 | }, | 195 | }, |
| 231 | "rgblight": { | 196 | "rgblight": { |
| @@ -238,88 +203,160 @@ | |||
| 238 | "type": "boolean" | 203 | "type": "boolean" |
| 239 | } | 204 | } |
| 240 | }, | 205 | }, |
| 241 | "brightness_steps": { | 206 | "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, |
| 242 | "type": "number", | 207 | "hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, |
| 243 | "min": 0, | 208 | "layers": { |
| 244 | "multipleOf": 1 | 209 | "type": "object", |
| 245 | }, | 210 | "additionalProperties": false, |
| 246 | "hue_steps": { | 211 | "properties": { |
| 247 | "type": "number", | 212 | "blink": {"type": "boolean"}, |
| 248 | "min": 0, | 213 | "enabled": {"type": "boolean"}, |
| 249 | "multipleOf": 1 | 214 | "max": { |
| 215 | "type": "number", | ||
| 216 | "min": 1, | ||
| 217 | "max": 32, | ||
| 218 | "multipleOf": 1 | ||
| 219 | }, | ||
| 220 | "override_rgb": {"type": "boolean"} | ||
| 221 | } | ||
| 250 | }, | 222 | }, |
| 251 | "led_count": { | 223 | "led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, |
| 252 | "type": "number", | 224 | "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, |
| 253 | "min": 0, | 225 | "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 254 | "multipleOf": 1 | 226 | "rgbw": {"type": "boolean"}, |
| 227 | "saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 228 | "sleep": {"type": "boolean"}, | ||
| 229 | "split": {"type": "boolean"}, | ||
| 230 | "split_count": { | ||
| 231 | "type": "array", | ||
| 232 | "minLength": 2, | ||
| 233 | "maxLength": 2, | ||
| 234 | "items": {"$ref": "qmk.definitions.v1#/unsigned_int"} | ||
| 235 | } | ||
| 236 | } | ||
| 237 | }, | ||
| 238 | "split": { | ||
| 239 | "type": "object", | ||
| 240 | "additionalProperties": false, | ||
| 241 | "properties": { | ||
| 242 | "enabled": {"type": "boolean"}, | ||
| 243 | "matrix_grid": { | ||
| 244 | "type": "array", | ||
| 245 | "items": {"$ref": "qmk.definitions.v1#/mcu_pin"} | ||
| 255 | }, | 246 | }, |
| 256 | "max_brightness": { | 247 | "matrix_pins": { |
| 257 | "type": "number", | 248 | "type": "object", |
| 258 | "min": 0, | 249 | "additionalProperties": false, |
| 259 | "max": 255, | 250 | "properties": { |
| 260 | "multipleOf": 1 | 251 | "right": { |
| 252 | "type": "object", | ||
| 253 | "additionalProperties": false, | ||
| 254 | "properties": { | ||
| 255 | "direct": { | ||
| 256 | "type": "array", | ||
| 257 | "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} | ||
| 258 | }, | ||
| 259 | "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, | ||
| 260 | "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, | ||
| 261 | "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} | ||
| 262 | } | ||
| 263 | } | ||
| 264 | } | ||
| 261 | }, | 265 | }, |
| 262 | "pin": { | 266 | "main": { |
| 263 | "type": "string", | 267 | "type": "string", |
| 264 | "pattern": "^[A-K]\\d{1,2}$" | 268 | "enum": ["eeprom", "left", "matrix_grid", "pin", "right"] |
| 265 | }, | 269 | }, |
| 266 | "saturation_steps": { | 270 | "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 271 | "soft_serial_speed": { | ||
| 267 | "type": "number", | 272 | "type": "number", |
| 268 | "min": 0, | 273 | "min": 0, |
| 274 | "max": 5, | ||
| 269 | "multipleOf": 1 | 275 | "multipleOf": 1 |
| 270 | }, | 276 | }, |
| 271 | "sleep": {"type": "boolean"}, | 277 | "transport": { |
| 272 | "split": {"type": "boolean"}, | 278 | "type": "object", |
| 273 | "split_count": { | 279 | "additionalProperties": false, |
| 274 | "type": "array", | 280 | "properties": { |
| 275 | "minLength": 2, | 281 | "protocol": { |
| 276 | "maxLength": 2, | 282 | "type": "string", |
| 277 | "items": { | 283 | "enum": ["custom", "i2c", "serial", "serial_usart"] |
| 278 | "type": "number", | 284 | }, |
| 279 | "min": 0, | 285 | "sync_matrix_state": {"type": "boolean"}, |
| 280 | "multipleOf": 1 | 286 | "sync_modifiers": {"type": "boolean"} |
| 287 | } | ||
| 288 | }, | ||
| 289 | "usb_detect": { | ||
| 290 | "type": "object", | ||
| 291 | "additionalProperties": false, | ||
| 292 | "properties": { | ||
| 293 | "enabled": {"type": "boolean"}, | ||
| 294 | "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 295 | "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} | ||
| 281 | } | 296 | } |
| 282 | } | 297 | } |
| 283 | } | 298 | } |
| 284 | }, | 299 | }, |
| 300 | "tags": { | ||
| 301 | "type": "array", | ||
| 302 | "items": {"type": "string"} | ||
| 303 | }, | ||
| 304 | "tapping": { | ||
| 305 | "type": "object", | ||
| 306 | "properties": { | ||
| 307 | "force_hold": {"type": "boolean"}, | ||
| 308 | "force_hold_per_key": {"type": "boolean"}, | ||
| 309 | "ignore_mod_tap_interrupt": {"type": "boolean"}, | ||
| 310 | "ignore_mod_tap_interrupt_per_key": {"type": "boolean"}, | ||
| 311 | "permissive_hold": {"type": "boolean"}, | ||
| 312 | "permissive_hold_per_key": {"type": "boolean"}, | ||
| 313 | "retro": {"type": "boolean"}, | ||
| 314 | "retro_per_key": {"type": "boolean"}, | ||
| 315 | "term": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 316 | "term_per_key": {"type": "boolean"}, | ||
| 317 | "toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, | ||
| 318 | } | ||
| 319 | }, | ||
| 285 | "usb": { | 320 | "usb": { |
| 286 | "type": "object", | 321 | "type": "object", |
| 287 | "additionalProperties": false, | 322 | "additionalProperties": false, |
| 288 | "properties": { | 323 | "properties": { |
| 289 | "device_ver": { | 324 | "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, |
| 290 | "type": "string", | 325 | "force_nkro": {"type": "boolean"}, |
| 291 | "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" | 326 | "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, |
| 292 | }, | 327 | "vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, |
| 293 | "pid": { | 328 | "max_power": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, |
| 294 | "type": "string", | 329 | "no_startup_check": {"type": "boolean"}, |
| 295 | "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" | 330 | "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, |
| 331 | "shared_endpoint": { | ||
| 332 | "type": "object", | ||
| 333 | "additionalProperties": false, | ||
| 334 | "properties": { | ||
| 335 | "keyboard": {"type": "boolean"}, | ||
| 336 | "mouse": {"type": "boolean"} | ||
| 337 | } | ||
| 296 | }, | 338 | }, |
| 297 | "vid": { | 339 | "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, |
| 298 | "type": "string", | 340 | "wait_for": {"type": "boolean"}, |
| 299 | "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" | 341 | } |
| 300 | } | 342 | }, |
| 343 | "qmk": { | ||
| 344 | "type": "object", | ||
| 345 | "additionalProperties": false, | ||
| 346 | "properties": { | ||
| 347 | "keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, | ||
| 348 | "tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, | ||
| 349 | "tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, | ||
| 301 | } | 350 | } |
| 302 | }, | 351 | }, |
| 303 | "qmk_lufa_bootloader": { | 352 | "qmk_lufa_bootloader": { |
| 304 | "type": "object", | 353 | "type": "object", |
| 305 | "additionalProperties": false, | 354 | "additionalProperties": false, |
| 306 | "properties": { | 355 | "properties": { |
| 307 | "esc_output": { | 356 | "esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 308 | "type": "string", | 357 | "esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 309 | "pattern": "^[A-K]\\d{1,2}$" | 358 | "led": {"$ref": "qmk.definitions.v1#/mcu_pin"}, |
| 310 | }, | 359 | "speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"} |
| 311 | "esc_input": { | ||
| 312 | "type": "string", | ||
| 313 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 314 | }, | ||
| 315 | "led": { | ||
| 316 | "type": "string", | ||
| 317 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 318 | }, | ||
| 319 | "speaker": { | ||
| 320 | "type": "string", | ||
| 321 | "pattern": "^[A-K]\\d{1,2}$" | ||
| 322 | } | ||
| 323 | } | 360 | } |
| 324 | } | 361 | } |
| 325 | } | 362 | } |
diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema new file mode 100644 index 000000000..a4bdab966 --- /dev/null +++ b/data/schemas/keymap.jsonschema | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | { | ||
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", | ||
| 3 | "$id": "qmk.keymap.v1", | ||
| 4 | "title": "Keymap Information", | ||
| 5 | "type": "object", | ||
| 6 | "properties": { | ||
| 7 | "author": {"type": "string"}, | ||
| 8 | "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, | ||
| 9 | "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, | ||
| 10 | "layout": {"$ref": "qmk.definitions.v1#/layout_macro"}, | ||
| 11 | "layers": { | ||
| 12 | "type": "array", | ||
| 13 | "items": { | ||
| 14 | "type": "array", | ||
| 15 | "items": {"type": "string"} | ||
| 16 | } | ||
| 17 | }, | ||
| 18 | "config": {"$ref": "qmk.keyboard.v1"}, | ||
| 19 | "notes": { | ||
| 20 | "type": "string", | ||
| 21 | "description": "asdf" | ||
| 22 | } | ||
| 23 | } | ||
| 24 | } \ No newline at end of file | ||
diff --git a/data/templates/avr/config.h b/data/templates/avr/config.h new file mode 100644 index 000000000..4192bbcfa --- /dev/null +++ b/data/templates/avr/config.h | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | /* | ||
| 2 | Copyright %YEAR% %YOUR_NAME% | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x0000 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER %YOUR_NAME% | ||
| 27 | #define PRODUCT %KEYBOARD% | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 2 | ||
| 31 | #define MATRIX_COLS 3 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Keyboard Matrix Assignments | ||
| 35 | * | ||
| 36 | * Change this to how you wired your keyboard | ||
| 37 | * COLS: AVR pins used for columns, left to right | ||
| 38 | * ROWS: AVR pins used for rows, top to bottom | ||
| 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | #define MATRIX_ROW_PINS { D0, D5 } | ||
| 44 | #define MATRIX_COL_PINS { F1, F0, B0 } | ||
| 45 | #define UNUSED_PINS | ||
| 46 | |||
| 47 | /* COL2ROW, ROW2COL */ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 50 | /* | ||
| 51 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
| 52 | */ | ||
| 53 | #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | ||
| 54 | |||
| 55 | //#define LED_NUM_LOCK_PIN B0 | ||
| 56 | //#define LED_CAPS_LOCK_PIN B1 | ||
| 57 | //#define LED_SCROLL_LOCK_PIN B2 | ||
| 58 | //#define LED_COMPOSE_PIN B3 | ||
| 59 | //#define LED_KANA_PIN B4 | ||
| 60 | |||
| 61 | //#define BACKLIGHT_PIN B7 | ||
| 62 | //#define BACKLIGHT_LEVELS 3 | ||
| 63 | //#define BACKLIGHT_BREATHING | ||
| 64 | |||
| 65 | //#define RGB_DI_PIN E2 | ||
| 66 | //#ifdef RGB_DI_PIN | ||
| 67 | //# define RGBLED_NUM 16 | ||
| 68 | //# define RGBLIGHT_HUE_STEP 8 | ||
| 69 | //# define RGBLIGHT_SAT_STEP 8 | ||
| 70 | //# define RGBLIGHT_VAL_STEP 8 | ||
| 71 | //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 72 | //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 73 | /*== all animations enable ==*/ | ||
| 74 | //# define RGBLIGHT_ANIMATIONS | ||
| 75 | /*== or choose animations ==*/ | ||
| 76 | //# define RGBLIGHT_EFFECT_BREATHING | ||
| 77 | //# define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 78 | //# define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 79 | //# define RGBLIGHT_EFFECT_SNAKE | ||
| 80 | //# define RGBLIGHT_EFFECT_KNIGHT | ||
| 81 | //# define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 82 | //# define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 83 | //# define RGBLIGHT_EFFECT_RGB_TEST | ||
| 84 | //# define RGBLIGHT_EFFECT_ALTERNATING | ||
| 85 | /*== customize breathing effect ==*/ | ||
| 86 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 87 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 88 | /*==== use exp() and sin() ====*/ | ||
| 89 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 90 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 91 | //#endif | ||
| 92 | |||
| 93 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 94 | #define DEBOUNCE 5 | ||
| 95 | |||
| 96 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 97 | //#define MATRIX_HAS_GHOST | ||
| 98 | |||
| 99 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 100 | #define LOCKING_SUPPORT_ENABLE | ||
| 101 | /* Locking resynchronize hack */ | ||
| 102 | #define LOCKING_RESYNC_ENABLE | ||
| 103 | |||
| 104 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 105 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 106 | */ | ||
| 107 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Force NKRO | ||
| 111 | * | ||
| 112 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 113 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 114 | * makefile for this to work.) | ||
| 115 | * | ||
| 116 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 117 | * until the next keyboard reset. | ||
| 118 | * | ||
| 119 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 120 | * fully operational during normal computer usage. | ||
| 121 | * | ||
| 122 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 123 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 124 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 125 | * power-up. | ||
| 126 | * | ||
| 127 | */ | ||
| 128 | //#define FORCE_NKRO | ||
| 129 | |||
| 130 | /* | ||
| 131 | * Feature disable options | ||
| 132 | * These options are also useful to firmware size reduction. | ||
| 133 | */ | ||
| 134 | |||
| 135 | /* disable debug print */ | ||
| 136 | //#define NO_DEBUG | ||
| 137 | |||
| 138 | /* disable print */ | ||
| 139 | //#define NO_PRINT | ||
| 140 | |||
| 141 | /* disable action features */ | ||
| 142 | //#define NO_ACTION_LAYER | ||
| 143 | //#define NO_ACTION_TAPPING | ||
| 144 | //#define NO_ACTION_ONESHOT | ||
| 145 | |||
| 146 | /* disable these deprecated features by default */ | ||
| 147 | #define NO_ACTION_MACRO | ||
| 148 | #define NO_ACTION_FUNCTION | ||
| 149 | |||
| 150 | /* Bootmagic Lite key configuration */ | ||
| 151 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 152 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/data/templates/avr/readme.md b/data/templates/avr/readme.md new file mode 100644 index 000000000..b099ed726 --- /dev/null +++ b/data/templates/avr/readme.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # %KEYBOARD% | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | *A short description of the keyboard/project* | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) | ||
| 8 | * Hardware Supported: *The PCBs, controllers supported* | ||
| 9 | * Hardware Availability: *Links to where you can find this hardware* | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make %KEYBOARD%:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make %KEYBOARD%:default:flash | ||
| 18 | |||
| 19 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
| 20 | |||
| 21 | ## Bootloader | ||
| 22 | |||
| 23 | Enter the bootloader in 3 ways: | ||
| 24 | |||
| 25 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 26 | * **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead | ||
| 27 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
diff --git a/data/templates/avr/rules.mk b/data/templates/avr/rules.mk new file mode 100644 index 000000000..62fbb3434 --- /dev/null +++ b/data/templates/avr/rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
diff --git a/data/templates/base/info.json b/data/templates/base/info.json new file mode 100644 index 000000000..af14d8799 --- /dev/null +++ b/data/templates/base/info.json | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "%KEYBOARD%", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "%YOUR_NAME%", | ||
| 5 | "width": 3, | ||
| 6 | "height": 2, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label": "k00", "x": 0, "y": 0}, | ||
| 11 | {"label": "k01", "x": 1, "y": 0}, | ||
| 12 | {"label": "k02", "x": 2, "y": 0}, | ||
| 13 | |||
| 14 | {"label": "k10", "x": 0, "y": 1, "w": 1.5}, | ||
| 15 | {"label": "k12", "x": 1.5, "y": 1, "w": 1.5} | ||
| 16 | ] | ||
| 17 | } | ||
| 18 | } | ||
| 19 | } | ||
diff --git a/data/templates/base/keyboard.c b/data/templates/base/keyboard.c new file mode 100644 index 000000000..f69ae16ed --- /dev/null +++ b/data/templates/base/keyboard.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright %YEAR% %YOUR_NAME% | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "%KEYBOARD%.h" | ||
diff --git a/data/templates/base/keyboard.h b/data/templates/base/keyboard.h new file mode 100644 index 000000000..bd2e88d12 --- /dev/null +++ b/data/templates/base/keyboard.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Copyright %YEAR% %YOUR_NAME% | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | /* This is a shortcut to help you visually see your layout. | ||
| 22 | * | ||
| 23 | * The first section contains all of the arguments representing the physical | ||
| 24 | * layout of the board and position of the keys. | ||
| 25 | * | ||
| 26 | * The second converts the arguments into a two-dimensional array which | ||
| 27 | * represents the switch matrix. | ||
| 28 | */ | ||
| 29 | #define LAYOUT( \ | ||
| 30 | k00, k01, k02, \ | ||
| 31 | k10, k12 \ | ||
| 32 | ) { \ | ||
| 33 | { k00, k01, k02 }, \ | ||
| 34 | { k10, KC_NO, k12 } \ | ||
| 35 | } | ||
diff --git a/data/templates/base/keymaps/default/keymap.c b/data/templates/base/keymaps/default/keymap.c new file mode 100644 index 000000000..d8020ab3e --- /dev/null +++ b/data/templates/base/keymaps/default/keymap.c | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* Copyright %YEAR% %YOUR_NAME% | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // Defines names for use in layer keycodes and the keymap | ||
| 19 | enum layer_names { | ||
| 20 | _BASE, | ||
| 21 | _FN | ||
| 22 | }; | ||
| 23 | |||
| 24 | // Defines the keycodes used by our macros in process_record_user | ||
| 25 | enum custom_keycodes { | ||
| 26 | QMKBEST = SAFE_RANGE, | ||
| 27 | QMKURL | ||
| 28 | }; | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 31 | /* Base */ | ||
| 32 | [_BASE] = LAYOUT( | ||
| 33 | KC_A, KC_1, MO(_FN), | ||
| 34 | KC_TAB, KC_SPC | ||
| 35 | ), | ||
| 36 | [_FN] = LAYOUT( | ||
| 37 | QMKBEST, QMKURL, _______, | ||
| 38 | RESET, XXXXXXX | ||
| 39 | ) | ||
| 40 | }; | ||
| 41 | |||
| 42 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 43 | switch (keycode) { | ||
| 44 | case QMKBEST: | ||
| 45 | if (record->event.pressed) { | ||
| 46 | // when keycode QMKBEST is pressed | ||
| 47 | SEND_STRING("QMK is the best thing ever!"); | ||
| 48 | } else { | ||
| 49 | // when keycode QMKBEST is released | ||
| 50 | } | ||
| 51 | break; | ||
| 52 | case QMKURL: | ||
| 53 | if (record->event.pressed) { | ||
| 54 | // when keycode QMKURL is pressed | ||
| 55 | SEND_STRING("https://qmk.fm/\n"); | ||
| 56 | } else { | ||
| 57 | // when keycode QMKURL is released | ||
| 58 | } | ||
| 59 | break; | ||
| 60 | } | ||
| 61 | return true; | ||
| 62 | } | ||
diff --git a/data/templates/base/keymaps/default/readme.md b/data/templates/base/keymaps/default/readme.md new file mode 100644 index 000000000..e052ed80f --- /dev/null +++ b/data/templates/base/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for %KEYBOARD% | |||
diff --git a/data/templates/ps2avrgb/config.h b/data/templates/ps2avrgb/config.h new file mode 100644 index 000000000..6150bcce6 --- /dev/null +++ b/data/templates/ps2avrgb/config.h | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | /* | ||
| 2 | Copyright %YEAR% %YOUR_NAME% | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x0000 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER %YOUR_NAME% | ||
| 27 | #define PRODUCT %KEYBOARD% | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 8 | ||
| 31 | #define MATRIX_COLS 15 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Keyboard Matrix Assignments | ||
| 35 | * | ||
| 36 | * Change this to how you wired your keyboard | ||
| 37 | * COLS: AVR pins used for columns, left to right | ||
| 38 | * ROWS: AVR pins used for rows, top to bottom | ||
| 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } | ||
| 44 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | ||
| 45 | #define UNUSED_PINS | ||
| 46 | |||
| 47 | /* COL2ROW, ROW2COL */ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 50 | //#define LED_NUM_LOCK_PIN D0 | ||
| 51 | //#define LED_CAPS_LOCK_PIN D1 | ||
| 52 | //#define LED_SCROLL_LOCK_PIN D6 | ||
| 53 | |||
| 54 | #define BACKLIGHT_PIN D4 | ||
| 55 | //#define BACKLIGHT_LEVELS 3 | ||
| 56 | //#define BACKLIGHT_BREATHING | ||
| 57 | |||
| 58 | #define RGBLED_NUM 16 | ||
| 59 | //#define RGBLIGHT_HUE_STEP 8 | ||
| 60 | //#define RGBLIGHT_SAT_STEP 8 | ||
| 61 | //#define RGBLIGHT_VAL_STEP 8 | ||
| 62 | //#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 63 | //#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 64 | /*== all animations enable ==*/ | ||
| 65 | //#define RGBLIGHT_ANIMATIONS | ||
| 66 | /*== or choose animations ==*/ | ||
| 67 | //#define RGBLIGHT_EFFECT_BREATHING | ||
| 68 | //#define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 69 | //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 70 | //#define RGBLIGHT_EFFECT_SNAKE | ||
| 71 | //#define RGBLIGHT_EFFECT_KNIGHT | ||
| 72 | //#define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 73 | //#define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 74 | //#define RGBLIGHT_EFFECT_RGB_TEST | ||
| 75 | //#define RGBLIGHT_EFFECT_ALTERNATING | ||
| 76 | /*== customize breathing effect ==*/ | ||
| 77 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 78 | //#define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 79 | /*==== use exp() and sin() ====*/ | ||
| 80 | //#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 81 | //#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 82 | |||
| 83 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 84 | #define DEBOUNCE 5 | ||
| 85 | |||
| 86 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 87 | //#define MATRIX_HAS_GHOST | ||
| 88 | |||
| 89 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 90 | #define LOCKING_SUPPORT_ENABLE | ||
| 91 | /* Locking resynchronize hack */ | ||
| 92 | #define LOCKING_RESYNC_ENABLE | ||
| 93 | |||
| 94 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 95 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 96 | */ | ||
| 97 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
| 98 | |||
| 99 | /* | ||
| 100 | * Force NKRO | ||
| 101 | * | ||
| 102 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 103 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 104 | * makefile for this to work.) | ||
| 105 | * | ||
| 106 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 107 | * until the next keyboard reset. | ||
| 108 | * | ||
| 109 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 110 | * fully operational during normal computer usage. | ||
| 111 | * | ||
| 112 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 113 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 114 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 115 | * power-up. | ||
| 116 | * | ||
| 117 | */ | ||
| 118 | //#define FORCE_NKRO | ||
| 119 | |||
| 120 | /* | ||
| 121 | * Feature disable options | ||
| 122 | * These options are also useful to firmware size reduction. | ||
| 123 | */ | ||
| 124 | |||
| 125 | /* disable debug print */ | ||
| 126 | //#define NO_DEBUG | ||
| 127 | |||
| 128 | /* disable print */ | ||
| 129 | //#define NO_PRINT | ||
| 130 | |||
| 131 | /* disable action features */ | ||
| 132 | //#define NO_ACTION_LAYER | ||
| 133 | //#define NO_ACTION_TAPPING | ||
| 134 | //#define NO_ACTION_ONESHOT | ||
| 135 | |||
| 136 | /* disable these deprecated features by default */ | ||
| 137 | #define NO_ACTION_MACRO | ||
| 138 | #define NO_ACTION_FUNCTION | ||
| 139 | |||
| 140 | /* Bootmagic Lite key configuration */ | ||
| 141 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 142 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/data/templates/ps2avrgb/readme.md b/data/templates/ps2avrgb/readme.md new file mode 100644 index 000000000..94063f9eb --- /dev/null +++ b/data/templates/ps2avrgb/readme.md | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # %KEYBOARD% | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | *A short description of the keyboard/project* | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) | ||
| 8 | * Hardware Supported: *The PCBs, controllers supported* | ||
| 9 | * Hardware Availability: *Links to where you can find this hardware* | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make %KEYBOARD%:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) | ||
| 16 | |||
| 17 | make %KEYBOARD%:default:flash | ||
| 18 | |||
| 19 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
| 20 | |||
| 21 | ## Bootloader | ||
| 22 | |||
| 23 | Enter the bootloader in 3 ways: | ||
| 24 | |||
| 25 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 26 | * **BootloadHID reset**: Hold down the key connected to the `A0` and `B0` pins on the MCU if it is known (often top left or bottom left) and plug in the keyboard | ||
| 27 | * **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead | ||
| 28 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
diff --git a/data/templates/ps2avrgb/rules.mk b/data/templates/ps2avrgb/rules.mk new file mode 100644 index 000000000..6c0b7cc23 --- /dev/null +++ b/data/templates/ps2avrgb/rules.mk | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32a | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = bootloadHID | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 18 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 19 | WS2812_DRIVER = i2c | ||
