Skip to content

Commit 9ed4e57

Browse files
committed
Create keymouse.schema.json
1 parent ec27299 commit 9ed4e57

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed

schema/keymouse.schema.json

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"definitions": {
4+
"info": {
5+
"type": "object",
6+
"properties": {
7+
"name": {
8+
"type": "string",
9+
"description": "名称"
10+
},
11+
"description": {
12+
"type": "string",
13+
"description": "描述"
14+
},
15+
"author": {
16+
"type": "string",
17+
"description": "作者"
18+
},
19+
"version": {
20+
"type": "string",
21+
"description": "版本号"
22+
},
23+
"bgi_version": {
24+
"type": "string",
25+
"description": "BetterGI 版本号"
26+
},
27+
"x": {
28+
"type": "number"
29+
},
30+
"y": {
31+
"type": "number"
32+
},
33+
"width": {
34+
"type": "number"
35+
},
36+
"height": {
37+
"type": "number"
38+
},
39+
"record_dpi": {
40+
"type": "number",
41+
"description": "录制时使用的 DPI",
42+
"default": 1.0
43+
}
44+
},
45+
"required": [
46+
"name",
47+
"description",
48+
"x",
49+
"y",
50+
"width",
51+
"height"
52+
]
53+
},
54+
"macroEvent": {
55+
"properties": {
56+
"type": {
57+
"anyOf": [
58+
{
59+
"type": "number",
60+
"enum": [
61+
0,
62+
1,
63+
2,
64+
3,
65+
4,
66+
5,
67+
6
68+
]
69+
},
70+
{
71+
"type": "integer"
72+
}
73+
],
74+
"description": "事件类型"
75+
},
76+
"keyCode": {
77+
"type": "integer",
78+
"description": "按键码"
79+
},
80+
"mouseX": {
81+
"type": "integer",
82+
"description": "鼠标 X 坐标"
83+
},
84+
"mouseY": {
85+
"type": "integer",
86+
"description": "鼠标 Y 坐标"
87+
},
88+
"mouseButton": {
89+
"anyOf": [
90+
{
91+
"type": "string",
92+
"enum": [
93+
"Left",
94+
"Right",
95+
"Middle",
96+
"None",
97+
"XButton1",
98+
"XButton2"
99+
]
100+
},
101+
{
102+
"type": "string"
103+
}
104+
],
105+
"description": "鼠标按键"
106+
},
107+
"time": {
108+
"type": "number",
109+
"description": "事件发生时间"
110+
},
111+
"cameraOrientation": {
112+
"type": "integer",
113+
"description": "相机方向"
114+
}
115+
},
116+
"required": [
117+
"type",
118+
"mouseX",
119+
"mouseY",
120+
"time"
121+
]
122+
}
123+
},
124+
"type": "object",
125+
"properties": {
126+
"info": {
127+
"$ref": "#/definitions/info",
128+
"description": "键鼠脚本信息"
129+
},
130+
"macroEvents": {
131+
"type": "array",
132+
"items": {
133+
"$ref": "#/definitions/macroEvent"
134+
},
135+
"description": "键鼠脚本事件",
136+
"default": []
137+
}
138+
},
139+
"required": [
140+
"info",
141+
"macroEvents"
142+
]
143+
}

0 commit comments

Comments
 (0)