diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/mappings/info_config.json | 96 | ||||
-rw-r--r-- | data/mappings/info_rules.json | 25 | ||||
-rw-r--r-- | data/mappings/keyboard_aliases.json | 564 | ||||
-rw-r--r-- | data/schemas/api_keyboard.jsonschema | 23 | ||||
-rw-r--r-- | data/schemas/definitions.jsonschema | 107 | ||||
-rw-r--r-- | data/schemas/false.jsonschema | 1 | ||||
-rw-r--r-- | data/schemas/keyboard.jsonschema | 361 | ||||
-rw-r--r-- | data/schemas/keymap.jsonschema | 24 | ||||
-rw-r--r-- | data/schemas/true.jsonschema | 1 | ||||
-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 | 21 | ||||
-rw-r--r-- | data/templates/base/info.json | 17 | ||||
-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 | 65 | ||||
-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 |
20 files changed, 1726 insertions, 0 deletions
diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json new file mode 100644 index 0000000000..72bb0f4a1c --- /dev/null +++ b/data/mappings/info_config.json @@ -0,0 +1,96 @@ +# This file maps keys between `config.h` and `info.json`. It is used by QMK +# to correctly and consistently map back and forth between the two systems. +{ + # Format: + # <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} + # value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping" + # to_json: Default `true`. Set to `false` to exclude this mapping from info.json + # to_c: Default `true`. Set to `false` to exclude this mapping from config.h + # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places + "AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"}, + "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"}, + "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"}, + "BACKLIGHT_PIN": {"info_key": "backlight.pin"}, + "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"}, + "COMBO_TERM": {"info_key": "combo.term", "value_type": "int"}, + "DEBOUNCE": {"info_key": "debounce", "value_type": "int"}, + "DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"}, + "DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false}, + "DIODE_DIRECTION": {"info_key": "diode_direction"}, + "FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"}, + "DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"}, + "DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"}, + "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "tapping.ignore_mod_tap_interrupt", "value_type": "bool"}, + "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "tapping.ignore_mod_tap_interrupt_per_key", "value_type": "bool"}, + "LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"}, + "LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "bool"}, + "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"}, + "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"}, + "LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"}, + "LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"}, + "LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"}, + "MANUFACTURER": {"info_key": "manufacturer"}, + "MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"}, + "MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"}, + "MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"}, + "MOUSEKEY_INTERVAL": {"info_key": "mousekey.interval", "value_type": "int"}, + "MOUSEKEY_MAX_SPEED": {"info_key": "mousekey.max_speed", "value_type": "int"}, + "MOUSEKEY_TIME_TO_MAX": {"info_key": "mousekey.time_to_max", "value_type": "int"}, + "MOUSEKEY_WHEEL_DELAY": {"info_key": "mousekey.wheel_delay", "value_type": "int"}, + "ONESHOT_TIMEOUT": {"info_key": "oneshot.timeout", "value_type": "int"}, + "ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"}, + "PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "bool"}, + "PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"}, + "RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"}, + "RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"}, + "RGB_DI_PIN": {"info_key": "rgblight.pin"}, + "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, + "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, + "RGBLIGHT_ANIMATIONS": {"info_key": "rgblight.animations.all", "value_type": "bool"}, + "RGBLIGHT_EFFECT_ALTERNATING": {"info_key": "rgblight.animations.alternating", "value_type": "bool"}, + "RGBLIGHT_EFFECT_BREATHING": {"info_key": "rgblight.animations.breathing", "value_type": "bool"}, + "RGBLIGHT_EFFECT_CHRISTMAS": {"info_key": "rgblight.animations.christmas", "value_type": "bool"}, + "RGBLIGHT_EFFECT_KNIGHT": {"info_key": "rgblight.animations.knight", "value_type": "bool"}, + "RGBLIGHT_EFFECT_RAINBOW_MOOD": {"info_key": "rgblight.animations.rainbow_mood", "value_type": "bool"}, + "RGBLIGHT_EFFECT_RAINBOW_SWIRL": {"info_key": "rgblight.animations.rainbow_swirl", "value_type": "bool"}, + "RGBLIGHT_EFFECT_RGB_TEST": {"info_key": "rgblight.animations.rgb_test", "value_type": "bool"}, + "RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"}, + "RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"}, + "RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"}, + "RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"}, + "RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"}, + "RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"}, + "RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"}, + "RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"}, + "RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"}, + "RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"}, + "RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"}, + "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, + "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, + "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, + "PRODUCT": {"info_key": "keyboard_folder", "to_json": false}, + "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, + "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, + "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, + "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, + "QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int"}, + "QMK_LED": {"info_key": "qmk_lufa_bootloader.led"}, + "QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}, + "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"}, + "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"}, + "SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"}, + "SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"}, + "SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"}, + "SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"}, + "SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"}, + "TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"}, + "TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"}, + "TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool"}, + "TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool"}, + "TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"}, + "TAPPING_TERM_PER_KEY": {"info_key": "tapping.term_per_key", "value_type": "bool"}, + "TAPPING_TOGGLE": {"info_key": "tapping.toggle", "value_type": "int"}, + "USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"}, + "USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"}, + "USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"}, +} diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json new file mode 100644 index 0000000000..aea67e04c8 --- /dev/null +++ b/data/mappings/info_rules.json @@ -0,0 +1,25 @@ +# This file maps keys between `rules.mk` and `info.json`. It is used by QMK +# to correctly and consistently map back and forth between the two systems. +{ + # Format: + # <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]} + # value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping" + # to_json: Default `true`. Set to `false` to exclude this mapping from info.json + # to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk + # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places + "BOARD": {"info_key": "board"}, + "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, + "BLUETOOTH": {"info_key": "bluetooth.driver"}, + "FIRMWARE_FORMAT": {"info_key": "build.firmware_format"}, + "KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"}, + "MOUSE_SHARED_EP": {"info_key": "usb.shared_endpoint.mouse", "value_type": "bool"}, + "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, + "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, + "LTO_ENABLE": {"info_key": "build.lto", "value_type": "bool"}, + "MCU": {"info_key": "processor", "warn_duplicate": false}, + "MOUSEKEY_ENABLE": {"info_key": "mouse_key.enabled", "value_type": "bool"}, + "NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"}, + "SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"}, + "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "value_type": "str", "to_c": false}, + "WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"} +} diff --git a/data/mappings/keyboard_aliases.json b/data/mappings/keyboard_aliases.json new file mode 100644 index 0000000000..60c91b1bfc --- /dev/null +++ b/data/mappings/keyboard_aliases.json @@ -0,0 +1,564 @@ +{ + # Format for each entry: + # <alias>: { + # target: <keyboard_folder>, + # layouts: { + # <layout_alias>: <layout_target> + # } + # } + # + # Both target and layouts are optional. + '2_milk': { + target: 'spaceman/2_milk' + }, + 'aeboards/constellation': { + target: 'aeboards/constellation/rev1' + }, + 'aeboards/ext65': { + target: 'aeboards/ext65/rev1' + }, + 'ai03/equinox': { + target: 'ai03/equinox/rev1' + }, + aleth42: { + target: 'aleth42/rev1' + }, + alice: { + target: 'tgr/alice' + }, + angel17: { + target: 'angel17/alpha' + }, + angel64: { + target: 'angel64/alpha' + }, + at101_blackheart: { + target: 'at101_bh' + }, + 'atom47/rev2': { + target: 'maartenwut/atom47/rev2' + }, + 'atom47/rev3': { + target: 'maartenwut/atom47/rev3' + }, + bakeneko65: { + target: 'bakeneko65/rev2' + }, + bear_face: { + target: 'bear_face/v1' + }, + bm16a: { + target: 'kprepublic/bm16a' + }, + bm16s: { + target: 'kprepublic/bm16s' + }, + bm40hsrgb: { + target: 'kprepublic/bm40hsrgb' + }, + bm43a: { + target: 'kprepublic/bm43a' + }, + bm60poker: { + target: 'kprepublic/bm60poker' + }, + bm60rgb: { + target: 'kprepublic/bm60rgb' + }, + bm60rgb_iso: { + target: 'kprepublic/bm60rgb_iso' + }, + bm68rgb: { + target: 'kprepublic/bm68rgb' + }, + 'bpiphany/pegasushoof': { + target: 'bpiphany/pegasushoof/2013' + }, + chavdai40: { + target: 'chavdai40/rev1' + }, + 'candybar/lefty': { + target: 'tkc/candybar/lefty' + }, + 'candybar/righty': { + target: 'tkc/candybar/righty' + }, + canoe: { + target: 'percent/canoe' + }, + 'clawsome/gamebuddy': { + target: 'clawsome/gamebuddy/v1_0' + }, + 'cmm_studio/saka68': { + target: 'cmm_studio/saka68/solder' + }, + 'cospad': { + target: 'kprepublic/cospad' + }, + 'crkbd/rev1/legacy': { + target: 'crkbd/rev1' + }, + 'crkbd/rev1/common': { + target: 'crkbd/rev1' + }, + 'custommk/genesis': { + target: 'custommk/genesis/rev1' + }, + 'daisy': { + target: 'ktec/daisy' + }, + 'doro67/multi': { + layouts: { + LAYOUT_ansi: 'LAYOUT_65_ansi_blocker' + } + }, + 'doro67/regular': { + layouts: { + LAYOUT: 'LAYOUT_65_ansi_blocker' + } + }, + 'doro67/rgb': { + layouts: { + LAYOUT: 'LAYOUT_65_ansi_blocker' + } + }, + drakon: { + target: 'jagdpietr/drakon' + }, + 'durgod/k320': { + target: 'durgod/k3x0/k320' + }, + 'dztech/dz60rgb': { + target: 'dztech/dz60rgb/v1' + }, + 'dztech/dz60rgb_ansi': { + target: 'dztech/dz60rgb_ansi/v1' + }, + 'dztech/dz60rgb_wkl': { + target: 'dztech/dz60rgb_wkl/v1' + }, + 'dztech/dz65rgb': { + target: 'dztech/dz65rgb/v1' + }, + 'dztech/volcano660': { + target: 'ilumkb/volcano660' + }, + eek: { + target: 'eek/silk_down' + }, + 'ergodone': { + target: 'ktec/ergodone' + }, + ergoinu: { + target: 'dm9records/ergoinu' + }, + 'exclusive/e85': { + target: 'exclusive/e85/hotswap' + }, + gh60: { + target: 'gh60/revc' + }, + 'gmmk/pro': { + target: 'gmmk/pro/ansi' + }, + 'handwired/ferris': { + target: 'ferris/0_1' + }, + 'handwired/p1800fl': { + target: 'team0110/p1800fl' + }, + 'helix/pico/sc/back': { + target: 'helix/pico/sc' + }, + 'helix/pico/sc/under': { + target: 'helix/pico/sc' + }, + 'helix/rev2/back/oled': { + target: 'helix/rev2/back' + }, + 'helix/rev2/oled': { + target: 'helix/rev2' + }, + 'helix/rev2/oled/back': { + target: 'helix/rev2/back' + }, + 'helix/rev2/oled/under': { + target: 'helix/rev2/under' + }, + 'helix/rev2/sc/back': { + target: 'helix/rev2/sc' + }, + 'helix/rev2/sc/oled': { + target: 'helix/rev2/sc' + }, + 'helix/rev2/sc/oledback': { + target: 'helix/rev2/sc' + }, + 'helix/rev2/sc/oledunder': { + target: 'helix/rev2/sc' + }, + 'helix/rev2/sc/under': { + target: 'helix/rev2/sc' + }, + 'helix/rev2/under': { + target: 'helix/rev2/sc' + }, + 'helix/rev2/under/oled': { + target: 'helix/rev2/under' + }, + id80: { + target: 'id80/ansi' + }, + idb_60: { + target: 'idb/idb_60', + layouts: { + LAYOUT: 'LAYOUT_all' + } + }, + 'jj40': { + target: 'kprepublic/jj40' + }, + 'jj4x4': { + target: 'kprepublic/jj4x4' + }, + 'jj50': { + target: 'kprepublic/jj50' + }, + jones: { + target: 'jones/v03_1' + }, + katana60: { + target: 'rominronin/katana60/rev1' + }, + 'kbdfans/kbd67mkiirgb': { + target: 'kbdfans/kbd67/mkiirgb', + layouts: { + LAYOUT: 'LAYOUT_65_ansi_blocker' + } + }, + 'kbdfans/kbd67/mkiirgb': { + target: 'kbdfans/kbd67/mkiirgb/v1' + }, + 'keebio/dsp40': { + target: 'keebio/dsp40/rev1' + }, + 'keycapsss/plaid_pad': { + target: 'keycapsss/plaid_pad/rev1' + }, + kudox: { + target: 'kudox/rev1' + }, + 'kyria': { + target: 'splitkb/kyria' + }, + 'lazydesigners/the60': { + target: 'lazydesigners/the60/rev1' + }, + 'lfkeyboards/lfk78': { + target: 'lfkeyboards/lfk78/revj' + }, + 'lfkeyboards/smk65': { + target: 'lfkeyboards/smk65/revb' + }, + 'maartenwut/atom47/rev2': { + target: 'evyd13/atom47/rev2' + }, + 'maartenwut/atom47/rev3': { + target: 'evyd13/atom47/rev3' + }, + 'maartenwut/eon40': { + target: 'evyd13/eon40' + }, + 'maartenwut/eon65': { + target: 'evyd13/eon65' + }, + 'maartenwut/eon75': { + target: 'evyd13/eon75' + }, + 'maartenwut/eon87': { + target: 'evyd13/eon87' + }, + 'maartenwut/eon95': { + target: 'evyd13/eon95' + }, + 'maartenwut/gh80_1800': { + target: 'evyd13/gh80_1800' + }, + 'maartenwut/gh80_3700': { + target: 'evyd13/gh80_3700' + }, + 'maartenwut/minitomic': { + target: 'evyd13/minitomic' + }, + 'maartenwut/mx5160': { + target: 'evyd13/mx5160' + }, + 'maartenwut/nt660': { + target: 'evyd13/nt660' + }, + 'maartenwut/omrontkl': { + target: 'evyd13/omrontkl' + }, + 'maartenwut/plain60': { + target: 'evyd13/plain60' + }, + 'maartenwut/pockettype': { + target: 'evyd13/pockettype' + }, + 'maartenwut/quackfire': { + target: 'evyd13/quackfire' + }, + 'maartenwut/solheim68': { + target: 'evyd13/solheim68' + }, + 'maartenwut/ta65': { + target: 'evyd13/ta65' + }, + 'maartenwut/wasdat': { + target: 'evyd13/wasdat' + }, + 'maartenwut/wasdat_code': { + target: 'evyd13/wasdat_code' + }, + 'maartenwut/wonderland': { + target: 'evyd13/wonderland' + }, + 'matrix/m12og': { + target: 'matrix/m12og/rev1' + }, + 'mechlovin/hannah910': { + target: 'mechlovin/hannah910/rev1' + }, + 'mechlovin/adelais/rgb_led': { + target: 'mechlovin/adelais/rgb_led/rev1' + }, + 'mechlovin/adelais/standard_led': { + target: 'mechlovin/adelais/standard_led/rev2' + }, + 'mechlovin/delphine': { + target: 'mechlovin/delphine/mono_led' + }, + 'mechlovin/hannah60rgb': { + target: 'mechlovin/hannah60rgb/rev1' + }, + 'mechlovin/hannah65/mechlovin9': { + target: 'mechlovin/mechlovin9/rev1' + }, + 'melgeek/z70ultra': { + target: 'melgeek/z70ultra/rev1' + }, + 'mechlovin/hannah65': { + target: 'mechlovin/hannah65/rev1' + }, + model01: { + target: 'keyboardio/model01' + }, + m0lly: { + target: 'tkc/m0lly' + }, + 'montsinger/rebound': { + target: 'montsinger/rebound/rev1' + }, + nomu30: { + target: 'nomu30/rev1' + }, + 'noxary/268_2': { + layouts: { + LAYOUT: 'LAYOUT_65_ansi_blocker' + } + }, + oddball: { + target: 'oddball/v1' + }, + omnikey_blackheart: { + target: 'omnikey_bh' + }, + 'pabile/p20': { + target: 'pabile/p20/ver1' + }, + 'pancake/feather': { + target: 'spaceman/pancake/feather' + }, + 'pancake/promicro': { + target: 'spaceman/pancake/promicro' + }, + 'peiorisboards/ixora': { + target: 'coarse/ixora' + }, + 'percent/canoe': { + layouts: { + LAYOUT_iso: 'LAYOUT_65_iso_blocker' + } + }, + plaid: { + target: 'dm9records/plaid' + }, + plain60: { + target: 'maartenwut/plain60' + }, + 'ploopyco/trackball': { + target: 'ploopyco/trackball/rev1_005' + }, + polilla: { + target: 'polilla/rev1' + }, + 'preonic/rev1': { + layouts: { + LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12' + } + }, + 'preonic/rev2': { + layouts: { + LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12' + } + }, + 'preonic/rev3': { + layouts: { + LAYOUT_preonic_grid: 'LAYOUT_ortho_5x12' + } + }, + 'primekb/prime_l': { + target: 'primekb/prime_l/v1' + }, + 'primekb/prime_l_v2': { + target: 'primekb/prime_l/v2' + }, + 'projectkb/alice': { + target: 'projectkb/alice/rev1' + }, + 'rama/koyu': { + target: 'wilba_tech/rama_works_koyu' + }, + 'rama/m6_a': { + target: 'wilba_tech/rama_works_m6_a' + }, + 'rama/m6_b': { + target: 'wilba_tech/rama_works_m6_b' + }, + 'rama/m10_b': { + target: 'wilba_tech/rama_works_m10_b' + }, + 'rama/m60_a': { + target: 'wilba_tech/rama_works_m60_a' + }, + 'rama/u80_a': { + target: 'wilba_tech/rama_works_u80_a' + }, + 'ramonimbao/herringbone': { + target: 'ramonimbao/herringbone/v1' + }, + 'ramonimbao/mona': { + target: 'ramonimbao/mona/v1' + }, + 'rgbkb/pan': { + target: 'rgbkb/pan/rev1/32a' + }, + 'rgbkb/pan/rev1': { + target: 'rgbkb/pan/rev1/32a' + }, + romac: { + target: 'kingly_keys/romac' + }, + ropro: { + target: 'kingly_keys/ropro' + }, + satan: { + target: 'gh60/satan' + }, + skog: { + target: 'percent/skog' + }, + speedo: { + target: 'cozykeys/speedo/v2' + }, + 'staryu': { + target: 'ktec/staryu' + }, + stoutgat: { + target: 'tkw/stoutgat/v1' + }, + suihankey: { + target: 'suihankey/split/alpha' + }, + ta65: { + target: 'maartenwut/ta65' + }, + tartan: { + target: 'dm9records/tartan' + }, + tkc1800: { + target: 'tkc/tkc1800' + }, + 'tkw/stoutgat/v2': { + target: 'tkw/stoutgat/v2/f411' + }, + 'tokyo60': { + target: 'tokyokeyboard/tokyo60' + }, + underscore33: { + target: 'underscore33/rev1' + }, + vinta: { + target: 'coarse/vinta', + layouts: { + LAYOUT_67_ansi: 'LAYOUT_65_ansi_blocker' + } + }, + wasdat: { + target: 'maartenwut/wasdat' + }, + 'westfoxtrot/cypher': { + target: 'westfoxtrot/cypher/rev1' + }, + 'whale/sk': { + target: 'whale/sk/v3' + }, + 'xd002': { + target: 'xiudi/xd002' + }, + 'xd004': { + target: 'xiudi/xd004' + }, + 'xd60': { + target: 'xiudi/xd60' + }, + 'xd68': { + target: 'xiudi/xd68' + }, + 'xd75': { + target: 'xiudi/xd75' + }, + 'xd84': { + target: 'xiudi/xd84' + }, + 'xd84pro': { + target: 'xiudi/xd84pro' + }, + 'xd87': { + target: 'xiudi/xd87' + }, + 'xd96': { + target: 'xiudi/xd96' + }, + 'xelus/dawn60': { + target: 'xelus/dawn60/rev1' + }, + 'xelus/valor': { + target: 'xelus/valor/rev1' + }, + yd60mq: { + target: 'yd60mq/12led' + }, + ymd75: { + target: 'ymd75/rev1' + }, + z150_blackheart: { + target: 'z150_bh' + }, + zeal60: { + target: 'wilba_tech/zeal60' + }, + zeal65: { + target: 'wilba_tech/zeal65' + } +} diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema new file mode 100644 index 0000000000..d638658a1d --- /dev/null +++ b/data/schemas/api_keyboard.jsonschema @@ -0,0 +1,23 @@ +{ + "$id": "qmk.api.keyboard.v1", + "allOf": [ + {"$ref": "qmk.keyboard.v1"}, + { + "properties": { + "keymaps": { + "type": "object", + "properties": { + "url": {"type": "string"} + } + + }, + "parse_errors": {"$ref": "qmk.definitions.v1#/string_array"}, + "parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"}, + "processor_type": {"type": "string"}, + "protocol": {"type": "string"}, + "keyboard_folder": {"type": "string"}, + "platform": {"type": "string"} + } + } + ] +} diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema new file mode 100644 index 0000000000..822f237073 --- /dev/null +++ b/data/schemas/definitions.jsonschema @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "qmk.definitions.v1", + "title": "Common definitions used across QMK's jsonschemas.", + "type": "object", + "boolean_array": { + "type": "object", + "additionalProperties": {"type": "boolean"} + }, + "filename": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9a-z_]*$" + }, + "hex_number_2d": { + "type": "string", + "pattern": "^0x[0-9A-F]{2}$" + }, + "hex_number_4d": { + "type": "string", + "pattern": "^0x[0-9A-F]{4}$" + }, + "text_identifier": { + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "layout_macro": { + "oneOf": [ + { + "type": "string", + "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"] + }, + { + "type": "string", + "pattern": "^LAYOUT_[0-9a-z_]*$" + } + ] + }, + "key_unit": { + "type": "number", + "min": 0.25 + }, + "mcu_pin_array": { + "type": "array", + "items": {"$ref": "#/mcu_pin"} + }, + "mcu_pin": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + { + "type": "string", + "pattern": "^LINE_PIN\\d{1,2}$" + }, + { + "type": "number", + "multipleOf": 1 + }, + { + "type": "null" + } + ] + }, + "signed_decimal": { + "type": "number" + }, + "signed_int": { + "type": "number", + "multipleOf": 1 + } + "signed_int_8": { + "type": "number", + "min": -127, + "max": 127, + "multipleOf": 1 + } + "string_array": { + "type": "array", + "items": { + "type": "string" + } + }, + "string_object": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "unsigned_decimal": { + "type": "number", + "min": 0 + }, + "unsigned_int": { + "type": "number", + "min": 0, + "multipleOf": 1 + } + "unsigned_int_8": { + "type": "number", + "min": 0, + "max": 255, + "multipleOf": 1 + } +} diff --git a/data/schemas/false.jsonschema b/data/schemas/false.jsonschema new file mode 100644 index 0000000000..c508d5366f --- /dev/null +++ b/data/schemas/false.jsonschema @@ -0,0 +1 @@ +false diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema new file mode 100644 index 0000000000..15f407fce4 --- /dev/null +++ b/data/schemas/keyboard.jsonschema @@ -0,0 +1,361 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "qmk.keyboard.v1", + "title": "Keyboard Information", + "type": "object", + "properties": { + "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "url": { + "type": "string", + "format": "uri" + }, + "processor": { + "type": "string", + "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"] + }, + "audio": { + "type": "object", + "additionalProperties": false, + "properties": { + "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "voices": {"type": "boolean"} + } + }, + "backlight": { + "type": "object", + "additionalProperties": false, + "properties": { + "breathing": {"type": "boolean"}, + "breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "levels": { + "type": "number", + "min": 1, + "max": 31, + "multipleOf": 1 + }, + "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"} + } + }, + "bluetooth": { + "type": "object", + "additionalProperties": false, + "properties": { + "driver": { + "type": "string", + "enum": ["AdafruitBLE", "RN42"] + }, + "lto": {"type": "boolean"}, + } + }, + "board": { + "type": "string", + "minLength": 2, + "pattern": "^[a-zA-Z_][0-9a-zA-Z_]*$" + }, + "bootloader": { + "type": "string", + "enum": ["atmel-dfu", "bootloadhid", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "unknown", "usbasploader", "USBasp", "tinyuf2"], + }, + "bootloader_instructions": { + "type": "string", + "description": "Instructions for putting the keyboard into a mode that allows for firmware flashing." + }, + "build": { + "type": "object", + "additionalProperties": false, + "properties": { + "debounce_type": { + "type": "string", + "enum": ["custom", "eager_pk", "eager_pr", "sym_defer_pk", "sym_eager_pk"] + }, + "firmware_format": { + "type": "string", + "enum": ["bin", "hex", "uf2"] + }, + "lto": {"type": "boolean"}, + } + }, + "diode_direction": { + "type": "string", + "enum": ["COL2ROW", "ROW2COL"] + }, + "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "combo": { + "type": "object", + "properties": { + "count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "term": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, + "community_layouts": { + "type": "array", + "items": {"$ref": "qmk.definitions.v1#/filename"} + }, + "features": {"$ref": "qmk.definitions.v1#/boolean_array"}, + "indicators": { + "type": "object", + "properties": { + "caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"} + } + }, + "layout_aliases": { + "type": "object", + "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"} + }, + "layouts": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "properties": { + "filename": { + "type": "string" + }, + "c_macro": { + "type": "boolean" + }, + "layout": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "label": {"type": "string"}, + "matrix": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number", + "min": 0, + "multipleOf": 1 + } + }, + "r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "h": {"$ref": "qmk.definitions.v1#/key_unit"}, + "w": {"$ref": "qmk.definitions.v1#/key_unit"}, + "x": {"$ref": "qmk.definitions.v1#/key_unit"}, + "y": {"$ref": "qmk.definitions.v1#/key_unit"} + } + } + } + } + } + }, + "leader_key": { + "type": "object", + "properties": { + "timing": {"type": "boolean"}, + "strict_processing": {"type": "boolean"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, + "matrix_pins": { + "type": "object", + "additionalProperties": false, + "properties": { + "custom": {"type": "boolean"}, + "custom_lite": {"type": "boolean"}, + "ghost": {"type": "boolean"}, + "io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "direct": { + "type": "array", + "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + }, + "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + } + }, + "mouse_key": { + "type": "object", + "properties": { + "enabled": {"type": "boolean"}, + "delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + } + }, + "oneshot": { + "type": "object", + "properties": { + "tap_toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, + "rgblight": { + "type": "object", + "additionalProperties": false, + "properties": { + "animations": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "layers": { + "type": "object", + "additionalProperties": false, + "properties": { + "blink": {"type": "boolean"}, + "enabled": {"type": "boolean"}, + "max": { + "type": "number", + "min": 1, + "max": 32, + "multipleOf": 1 + }, + "override_rgb": {"type": "boolean"} + } + }, + "led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "rgbw": {"type": "boolean"}, + "saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "sleep": {"type": "boolean"}, + "split": {"type": "boolean"}, + "split_count": { + "type": "array", + "minLength": 2, + "maxLength": 2, + "items": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + } + }, + "split": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "matrix_grid": { + "type": "array", + "items": {"$ref": "qmk.definitions.v1#/mcu_pin"} + }, + "matrix_pins": { + "type": "object", + "additionalProperties": false, + "properties": { + "right": { + "type": "object", + "additionalProperties": false, + "properties": { + "direct": { + "type": "array", + "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + }, + "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + } + } + } + }, + "main": { + "type": "string", + "enum": ["eeprom", "left", "matrix_grid", "pin", "right"] + }, + "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "soft_serial_speed": { + "type": "number", + "min": 0, + "max": 5, + "multipleOf": 1 + }, + "transport": { + "type": "object", + "additionalProperties": false, + "properties": { + "protocol": { + "type": "string", + "enum": ["custom", "i2c", "serial", "serial_usart"] + }, + "sync_matrix_state": {"type": "boolean"}, + "sync_modifiers": {"type": "boolean"} + } + }, + "usb_detect": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + } + } + }, + "tags": { + "type": "array", + "items": {"type": "string"} + }, + "tapping": { + "type": "object", + "properties": { + "force_hold": {"type": "boolean"}, + "force_hold_per_key": {"type": "boolean"}, + "ignore_mod_tap_interrupt": {"type": "boolean"}, + "ignore_mod_tap_interrupt_per_key": {"type": "boolean"}, + "permissive_hold": {"type": "boolean"}, + "permissive_hold_per_key": {"type": "boolean"}, + "retro": {"type": "boolean"}, + "retro_per_key": {"type": "boolean"}, + "term": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "term_per_key": {"type": "boolean"}, + "toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + } + }, + "usb": { + "type": "object", + "additionalProperties": false, + "properties": { + "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, + "force_nkro": {"type": "boolean"}, + "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, + "vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, + "max_power": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "no_startup_check": {"type": "boolean"}, + "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "shared_endpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "keyboard": {"type": "boolean"}, + "mouse": {"type": "boolean"} + } + }, + "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "wait_for": {"type": "boolean"}, + } + }, + "qmk": { + "type": "object", + "additionalProperties": false, + "properties": { + "keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + } + }, + "qmk_lufa_bootloader": { + "type": "object", + "additionalProperties": false, + "properties": { + "esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "led": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"} + } + } + } +} diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema new file mode 100644 index 0000000000..a4bdab966b --- /dev/null +++ b/data/schemas/keymap.jsonschema @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "qmk.keymap.v1", + "title": "Keymap Information", + "type": "object", + "properties": { + "author": {"type": "string"}, + "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "layout": {"$ref": "qmk.definitions.v1#/layout_macro"}, + "layers": { + "type": "array", + "items": { + "type": "array", + "items": {"type": "string"} + } + }, + "config": {"$ref": "qmk.keyboard.v1"}, + "notes": { + "type": "string", + "description": "asdf" + } + } +}
\ No newline at end of file diff --git a/data/schemas/true.jsonschema b/data/schemas/true.jsonschema new file mode 100644 index 0000000000..27ba77ddaf --- /dev/null +++ b/data/schemas/true.jsonschema @@ -0,0 +1 @@ +true diff --git a/data/templates/avr/config.h b/data/templates/avr/config.h new file mode 100644 index 0000000000..4192bbcfa2 --- /dev/null +++ b/data/templates/avr/config.h @@ -0,0 +1,152 @@ +/* +Copyright %YEAR% %YOUR_NAME% + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER %YOUR_NAME% +#define PRODUCT %KEYBOARD% + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +//#define LED_NUM_LOCK_PIN B0 +//#define LED_CAPS_LOCK_PIN B1 +//#define LED_SCROLL_LOCK_PIN B2 +//#define LED_COMPOSE_PIN B3 +//#define LED_KANA_PIN B4 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +//#define RGB_DI_PIN E2 +//#ifdef RGB_DI_PIN +//# define RGBLED_NUM 16 +//# define RGBLIGHT_HUE_STEP 8 +//# define RGBLIGHT_SAT_STEP 8 +//# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/data/templates/avr/readme.md b/data/templates/avr/readme.md new file mode 100644 index 0000000000..b099ed726d --- /dev/null +++ b/data/templates/avr/readme.md @@ -0,0 +1,27 @@ +# %KEYBOARD% + +![%KEYBOARD%](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make %KEYBOARD%:default + +Flashing example for this keyboard: + + make %KEYBOARD%:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **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 0000000000..9906266f48 --- /dev/null +++ b/data/templates/avr/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/data/templates/base/info.json b/data/templates/base/info.json new file mode 100644 index 0000000000..3993d85467 --- /dev/null +++ b/data/templates/base/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "%KEYBOARD%", + "url": "", + "maintainer": "%YOUR_NAME%", + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "k00", "x": 0, "y": 0}, + {"label": "k01", "x": 1, "y": 0}, + {"label": "k02", "x": 2, "y": 0}, + + {"label": "k10", "x": 0, "y": 1, "w": 1.5}, + {"label": "k12", "x": 1.5, "y": 1, "w": 1.5} + ] + } + } +} diff --git a/data/templates/base/keyboard.c b/data/templates/base/keyboard.c new file mode 100644 index 0000000000..f69ae16ede --- /dev/null +++ b/data/templates/base/keyboard.c @@ -0,0 +1,17 @@ +/* Copyright %YEAR% %YOUR_NAME% + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "%KEYBOARD%.h" diff --git a/data/templates/base/keyboard.h b/data/templates/base/keyboard.h new file mode 100644 index 0000000000..bd2e88d12b --- /dev/null +++ b/data/templates/base/keyboard.h @@ -0,0 +1,35 @@ +/* Copyright %YEAR% %YOUR_NAME% + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k12 \ +) { \ + { k00, k01, k02 }, \ + { k10, KC_NO, k12 } \ +} diff --git a/data/templates/base/keymaps/default/keymap.c b/data/templates/base/keymaps/default/keymap.c new file mode 100644 index 0000000000..b8ffb0156c --- /dev/null +++ b/data/templates/base/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright %YEAR% %YOUR_NAME% + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { QMKBEST = SAFE_RANGE, QMKURL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_A, KC_1, MO(_FN), + KC_TAB, KC_SPC + ), + [_FN] = LAYOUT( + QMKBEST, QMKURL, _______, + RESET, XXXXXXX + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/data/templates/base/keymaps/default/readme.md b/data/templates/base/keymaps/default/readme.md new file mode 100644 index 0000000000..e052ed80f1 --- /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 0000000000..6150bcce6d --- /dev/null +++ b/data/templates/ps2avrgb/config.h @@ -0,0 +1,142 @@ +/* +Copyright %YEAR% %YOUR_NAME% + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER %YOUR_NAME% +#define PRODUCT %KEYBOARD% + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +//#define LED_NUM_LOCK_PIN D0 +//#define LED_CAPS_LOCK_PIN D1 +//#define LED_SCROLL_LOCK_PIN D6 + +#define BACKLIGHT_PIN D4 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGBLED_NUM 16 +//#define RGBLIGHT_HUE_STEP 8 +//#define RGBLIGHT_SAT_STEP 8 +//#define RGBLIGHT_VAL_STEP 8 +//#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//#define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//#define RGBLIGHT_EFFECT_BREATHING +//#define RGBLIGHT_EFFECT_RAINBOW_MOOD +//#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//#define RGBLIGHT_EFFECT_SNAKE +//#define RGBLIGHT_EFFECT_KNIGHT +//#define RGBLIGHT_EFFECT_CHRISTMAS +//#define RGBLIGHT_EFFECT_STATIC_GRADIENT +//#define RGBLIGHT_EFFECT_RGB_TEST +//#define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//#define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/data/templates/ps2avrgb/readme.md b/data/templates/ps2avrgb/readme.md new file mode 100644 index 0000000000..94063f9ebc --- /dev/null +++ b/data/templates/ps2avrgb/readme.md @@ -0,0 +1,28 @@ +# %KEYBOARD% + +![%KEYBOARD%](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make %KEYBOARD%:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make %KEYBOARD%:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **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 +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **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 0000000000..b374eca336 --- /dev/null +++ b/data/templates/ps2avrgb/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +BOOTLOADER = bootloadhid + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +WS2812_DRIVER = i2c |