Skip to content

Commit

Permalink
Merge branch 'the-via:master' into ee_at
Browse files Browse the repository at this point in the history
  • Loading branch information
yiancar authored Oct 10, 2024
2 parents f46d479 + 9b852f6 commit a9a79fe
Show file tree
Hide file tree
Showing 3,353 changed files with 346,757 additions and 102,022 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 13 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!--- Describe your changes in detail here. -->

## QMK Pull Request
## QMK Pull Request

<!--- VIA support for new keyboards MUST be in QMK master already -->

Expand All @@ -18,13 +18,25 @@
<!--- IF THERE IS NO LINK TO SHOW VIA SUPPORT IS IN QMK MASTER ALREADY, -->
<!--- THIS PR WILL BE CLOSED IMMEDIATELY FOR WORKFLOW REASONS. -->

## VIA Keymap Pull Request

<!--- Add your VIA keymap PR here -->
<!--- PR to https://github.com/the-via/qmk_userspace_via/pulls -->

<!--- All keyboards merge into QMK including and after 0.26.0 must have this VIA keymap PR -->

<!--- IF THERE IS NO LINK TO SHOW VIA KEYMAP PR, -->
<!--- THIS PR WILL BE CLOSED IMMEDIATELY FOR WORKFLOW REASONS. -->

## Checklist

<!--- Put an `x` in all the boxes that apply. -->

- [ ] The VIA support for this keyboard is **MERGED** in QMK master already **(MANDATORY)**
- [ ] VIA keymap is **MERGED** in VIA userspace master already **(MANDATORY)**
- [ ] The VIA definition follows the guide here: https://caniusevia.com/docs/layouts
- [ ] I have a V3 JSON version for this keyboard definition.**(MANDATORY)**
- [ ] I have formatted the JSON file to have consistent formatting with the rest of the repository.
- [ ] I have tested this keyboard definition using VIA's "Design" tab.
- [ ] I have tested this keyboard definition with firmware on a device.
- [ ] I have assigned alpha keys and modifier keys with the correct colors.
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"simple-git-hooks": "^2.8.1"
},
"dependencies": {
"@the-via/reader": "^1.8.0",
"@the-via/reader": "^1.9.0",
"@types/fs-extra": "^11.0.1",
"@types/glob": "^8.0.1",
"@types/rimraf": "^3.0.2",
Expand Down
75 changes: 75 additions & 0 deletions scripts/reorder_and_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env python3

import os
import json
import collections


def reorder_and_format(file_path):
with open(file_path, "r+") as f:
data = json.load(f, object_pairs_hook=collections.OrderedDict)

if "matrix" in data:
matrix = data["matrix"]
if list(matrix.keys()) == ["cols", "rows"]:
matrix = {"rows": matrix["rows"], "cols": matrix["cols"]}
data["matrix"] = matrix

if "layouts" in data:
layouts = data["layouts"]
ordered_layouts = collections.OrderedDict()
layout_order = ["labels", "presets", "keymap"]

for key in layout_order:
if key in layouts:
ordered_layouts[key] = layouts[key]

data["layouts"] = ordered_layouts

ordered_data = collections.OrderedDict()
key_order = [
"name",
"vendorId",
"productId",
"firmwareVersion",
"matrix",
"customFeatures",
"customKeycodes",
"keycodes",
"menus",
"lighting",
"layouts",
]

for key in key_order:
if key in data:
ordered_data[key] = data[key]

f.seek(0)
json.dump(ordered_data, f, indent=2, ensure_ascii=False)
f.write("\n") # insert final newline
f.truncate()


def walk_directory(directory):
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith(".json"):
reorder_and_format(os.path.join(root, file))


def main():
# Get the directory containing the script
script_dir = os.path.dirname(os.path.realpath(__file__))

# Define the project directories relative to the script directory
src_dir = os.path.join(script_dir, "..", "src")
v3_dir = os.path.join(script_dir, "..", "v3")

# Use the dynamic paths
walk_directory(src_dir)
walk_directory(v3_dir)


if __name__ == "__main__":
main()
16 changes: 14 additions & 2 deletions src/0_sixty/0_sixty.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@
"name": "0-Sixty by ven0mtr0n",
"vendorId": "0x7654",
"productId": "0x0060",
"matrix": {
"rows": 5,
"cols": 12
},
"lighting": "none",
"matrix": {"rows": 5, "cols": 12},
"layouts": {
"labels": [["Bottom Row", "5x12", "1x2uC", "2x2uC", "1x2uR", "1x2uL"]],
"labels": [
[
"Bottom Row",
"5x12",
"1x2uC",
"2x2uC",
"1x2uR",
"1x2uL"
]
],
"keymap": [
[
{
Expand Down
65 changes: 49 additions & 16 deletions src/0xC7/61key/61key.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "61Key by 0xC7",
"vendorId": "0xE117",
"productId": "0x6161",
"matrix": {
"rows": 5,
"cols": 14
},
"lighting": "none",
"matrix": {"rows": 5, "cols": 14},
"layouts": {
"keymap": [
[
Expand All @@ -20,11 +23,15 @@
"0,10",
"0,11",
"0,12",
{"w": 2},
{
"w": 2
},
"0,13"
],
[
{"w": 1.5},
{
"w": 1.5
},
"1,0",
"1,1",
"1,2",
Expand All @@ -38,11 +45,15 @@
"1,10",
"1,11",
"1,12",
{"w": 1.5},
{
"w": 1.5
},
"1,13"
],
[
{"w": 1.75},
{
"w": 1.75
},
"2,0",
"2,1",
"2,2",
Expand All @@ -55,11 +66,15 @@
"2,9",
"2,10",
"2,11",
{"w": 2.25},
{
"w": 2.25
},
"2,13"
],
[
{"w": 2.25},
{
"w": 2.25
},
"3,0",
"3,1",
"3,2",
Expand All @@ -71,25 +86,43 @@
"3,8",
"3,9",
"3,10",
{"w": 2.75},
{
"w": 2.75
},
"3,13"
],
[
{"w": 1.25},
{
"w": 1.25
},
"4,0",
{"w": 1.25},
{
"w": 1.25
},
"4,1",
{"w": 1.25},
{
"w": 1.25
},
"4,2",
{"w": 6.25},
{
"w": 6.25
},
"4,5",
{"w": 1.25},
{
"w": 1.25
},
"4,8",
{"w": 1.25},
{
"w": 1.25
},
"4,9",
{"w": 1.25},
{
"w": 1.25
},
"4,11",
{"w": 1.25},
{
"w": 1.25
},
"4,13"
]
]
Expand Down
23 changes: 19 additions & 4 deletions src/0xcb/1337/1337.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@
"name": "0xCB 1337",
"vendorId": "0xCB00",
"productId": "0x1337",
"matrix": {
"rows": 3,
"cols": 3
},
"lighting": "qmk_backlight_rgblight",
"matrix": {"rows": 3, "cols": 3},
"layouts": {
"keymap": [
["0,0", "0,1", "0,2"],
["1,0", "1,1", "1,2"],
["2,0", "2,1", "2,2"]
[
"0,0",
"0,1",
"0,2"
],
[
"1,0",
"1,1",
"1,2"
],
[
"2,0",
"2,1",
"2,2"
]
]
}
}
10 changes: 8 additions & 2 deletions src/0xcb/static/static.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
"name": "0xCB Static",
"vendorId": "0xCB00",
"productId": "0xa455",
"lighting": "none",
"matrix": {
"rows": 8,
"cols": 6
},
"lighting": "none",
"layouts": {
"labels": [["Space", "Split", "6.25U"]],
"labels": [
[
"Space",
"Split",
"6.25U"
]
],
"keymap": [
[
{
Expand Down
25 changes: 22 additions & 3 deletions src/0xcb/tutelpad/tutelpad.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,31 @@
"name": "TutelPad",
"vendorId": "0xCB00",
"productId": "0xF09F",
"matrix": {
"rows": 2,
"cols": 4
},
"lighting": "qmk_backlight_rgblight",
"matrix": {"rows": 2, "cols": 4},
"layouts": {
"keymap": [
["0,0","0,1",{"x":1.5},"0,2","0,3"],
["1,0","1,1",{"x":1.5},"1,2","1,3"]
[
"0,0",
"0,1",
{
"x": 1.5
},
"0,2",
"0,3"
],
[
"1,0",
"1,1",
{
"x": 1.5
},
"1,2",
"1,3"
]
]
}
}
Loading

0 comments on commit a9a79fe

Please sign in to comment.