@jjlmoya/utils-hardware 1.24.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/package.json +2 -1
  2. package/src/category/index.ts +4 -1
  3. package/src/entries.ts +10 -1
  4. package/src/index.ts +3 -0
  5. package/src/tests/locale_completeness.test.ts +2 -2
  6. package/src/tests/tool_validation.test.ts +2 -2
  7. package/src/tool/keyboardChatterTest/bibliography.astro +15 -0
  8. package/src/tool/keyboardChatterTest/bibliography.ts +20 -0
  9. package/src/tool/keyboardChatterTest/component.astro +353 -0
  10. package/src/tool/keyboardChatterTest/entry.ts +30 -0
  11. package/src/tool/keyboardChatterTest/i18n/de.ts +232 -0
  12. package/src/tool/keyboardChatterTest/i18n/en.ts +232 -0
  13. package/src/tool/keyboardChatterTest/i18n/es.ts +232 -0
  14. package/src/tool/keyboardChatterTest/i18n/fr.ts +232 -0
  15. package/src/tool/keyboardChatterTest/i18n/id.ts +232 -0
  16. package/src/tool/keyboardChatterTest/i18n/it.ts +232 -0
  17. package/src/tool/keyboardChatterTest/i18n/ja.ts +232 -0
  18. package/src/tool/keyboardChatterTest/i18n/ko.ts +232 -0
  19. package/src/tool/keyboardChatterTest/i18n/nl.ts +232 -0
  20. package/src/tool/keyboardChatterTest/i18n/pl.ts +232 -0
  21. package/src/tool/keyboardChatterTest/i18n/pt.ts +232 -0
  22. package/src/tool/keyboardChatterTest/i18n/ru.ts +232 -0
  23. package/src/tool/keyboardChatterTest/i18n/sv.ts +232 -0
  24. package/src/tool/keyboardChatterTest/i18n/tr.ts +232 -0
  25. package/src/tool/keyboardChatterTest/i18n/zh.ts +232 -0
  26. package/src/tool/keyboardChatterTest/index.ts +12 -0
  27. package/src/tool/keyboardChatterTest/keyboard-chatter-test.css +512 -0
  28. package/src/tool/keyboardChatterTest/logic.ts +23 -0
  29. package/src/tool/keyboardChatterTest/seo.astro +16 -0
  30. package/src/tool/keyboardChatterTest/ui.ts +34 -0
  31. package/src/tool/webBluetoothBleScanner/bibliography.astro +14 -0
  32. package/src/tool/webBluetoothBleScanner/bibliography.ts +16 -0
  33. package/src/tool/webBluetoothBleScanner/component.astro +339 -0
  34. package/src/tool/webBluetoothBleScanner/entry.ts +29 -0
  35. package/src/tool/webBluetoothBleScanner/i18n/de.ts +233 -0
  36. package/src/tool/webBluetoothBleScanner/i18n/en.ts +233 -0
  37. package/src/tool/webBluetoothBleScanner/i18n/es.ts +233 -0
  38. package/src/tool/webBluetoothBleScanner/i18n/fr.ts +233 -0
  39. package/src/tool/webBluetoothBleScanner/i18n/id.ts +233 -0
  40. package/src/tool/webBluetoothBleScanner/i18n/it.ts +233 -0
  41. package/src/tool/webBluetoothBleScanner/i18n/ja.ts +233 -0
  42. package/src/tool/webBluetoothBleScanner/i18n/ko.ts +233 -0
  43. package/src/tool/webBluetoothBleScanner/i18n/nl.ts +233 -0
  44. package/src/tool/webBluetoothBleScanner/i18n/pl.ts +233 -0
  45. package/src/tool/webBluetoothBleScanner/i18n/pt.ts +233 -0
  46. package/src/tool/webBluetoothBleScanner/i18n/ru.ts +233 -0
  47. package/src/tool/webBluetoothBleScanner/i18n/sv.ts +233 -0
  48. package/src/tool/webBluetoothBleScanner/i18n/tr.ts +233 -0
  49. package/src/tool/webBluetoothBleScanner/i18n/zh.ts +233 -0
  50. package/src/tool/webBluetoothBleScanner/index.ts +11 -0
  51. package/src/tool/webBluetoothBleScanner/logic.ts +79 -0
  52. package/src/tool/webBluetoothBleScanner/seo.astro +15 -0
  53. package/src/tool/webBluetoothBleScanner/ui.ts +41 -0
  54. package/src/tool/webBluetoothBleScanner/web-bluetooth-ble-scanner.css +406 -0
  55. package/src/tool/webUsbSerialMonitor/bibliography.astro +15 -0
  56. package/src/tool/webUsbSerialMonitor/bibliography.ts +18 -0
  57. package/src/tool/webUsbSerialMonitor/component.astro +356 -0
  58. package/src/tool/webUsbSerialMonitor/entry.ts +30 -0
  59. package/src/tool/webUsbSerialMonitor/i18n/de.ts +241 -0
  60. package/src/tool/webUsbSerialMonitor/i18n/en.ts +241 -0
  61. package/src/tool/webUsbSerialMonitor/i18n/es.ts +241 -0
  62. package/src/tool/webUsbSerialMonitor/i18n/fr.ts +241 -0
  63. package/src/tool/webUsbSerialMonitor/i18n/id.ts +241 -0
  64. package/src/tool/webUsbSerialMonitor/i18n/it.ts +241 -0
  65. package/src/tool/webUsbSerialMonitor/i18n/ja.ts +241 -0
  66. package/src/tool/webUsbSerialMonitor/i18n/ko.ts +241 -0
  67. package/src/tool/webUsbSerialMonitor/i18n/nl.ts +241 -0
  68. package/src/tool/webUsbSerialMonitor/i18n/pl.ts +241 -0
  69. package/src/tool/webUsbSerialMonitor/i18n/pt.ts +241 -0
  70. package/src/tool/webUsbSerialMonitor/i18n/ru.ts +241 -0
  71. package/src/tool/webUsbSerialMonitor/i18n/sv.ts +241 -0
  72. package/src/tool/webUsbSerialMonitor/i18n/tr.ts +241 -0
  73. package/src/tool/webUsbSerialMonitor/i18n/zh.ts +241 -0
  74. package/src/tool/webUsbSerialMonitor/index.ts +12 -0
  75. package/src/tool/webUsbSerialMonitor/logic.ts +44 -0
  76. package/src/tool/webUsbSerialMonitor/seo.astro +16 -0
  77. package/src/tool/webUsbSerialMonitor/ui.ts +51 -0
  78. package/src/tool/webUsbSerialMonitor/web-usb-serial-monitor.css +415 -0
  79. package/src/tools.ts +4 -1
@@ -0,0 +1,232 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { KeyboardChatterTestUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
5
+
6
+ const slug = 'keyboard-chatter-test';
7
+ const title = '键盘抖动测试';
8
+ const description = '通过检查同一按键两次出现的速度,检测机械键盘抖动、双击和故障开关弹跳。';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '什么是键盘抖动?',
13
+ answer: '键盘抖动是一种硬件故障,一次物理按压被注册为多次按压。常见于脏污、磨损、氧化或消抖不良的机械开关。',
14
+ },
15
+ {
16
+ question: '这个键盘抖动测试如何工作?',
17
+ answer: '缓慢按压同一个可疑按键,每次一下。如果日志显示仅间隔几毫秒的重复按压,开关可能正在弹跳并产生重复字母。',
18
+ },
19
+ {
20
+ question: '什么样的差值表示键盘在双击?',
21
+ answer: '低于30毫秒的重复按压强烈怀疑是抖动。30到50毫秒的重复需要关注。对于大多数用户来说,正常的故意重复按压通常在50毫秒以上。',
22
+ },
23
+ {
24
+ question: '为什么第一次按压不显示差值?',
25
+ answer: '差值需要同一按键的上一次按压。第一次按压建立基准,后续按压以毫秒为单位显示时间间隔。',
26
+ },
27
+ {
28
+ question: '软件能修复键盘抖动吗?',
29
+ answer: '消抖软件可以隐藏一些症状,但不能修复开关。可能需要清洁、重新安装热插拔开关、更换开关或修理键盘PCB。',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: '打开工具并正常按键',
36
+ text: '没有开始按钮。如果需要,点击工具内区域,然后按压一直双击的按键。',
37
+ },
38
+ {
39
+ name: '逐个点击可疑按键',
40
+ text: '按压双击的按键。如果一次物理按压产生多个带有微小差值的日志行,开关很可能在抖动。',
41
+ },
42
+ {
43
+ name: '阅读颜色代码',
44
+ text: '绿色表示50毫秒以上的正常,黄色表示30到50毫秒的可疑,红色表示检测到30毫秒以下的抖动。',
45
+ },
46
+ {
47
+ name: '如需要导出日志',
48
+ text: '使用下载按钮保存CSV日志,有助于比较按键或记录间歇性故障。',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'UtilityApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
83
+ inLanguage: 'zh',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<KeyboardChatterTestUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faq: faqData,
91
+ bibliography,
92
+ howTo: howToData,
93
+ schemas: [faqSchema, howToSchema, appSchema],
94
+ seo: [
95
+ {
96
+ type: 'title',
97
+ text: '机械键盘双击测试',
98
+ level: 2,
99
+ },
100
+ {
101
+ type: 'paragraph',
102
+ html: '此键盘抖动测试有助于诊断机械键盘一次按压输入两个字母、丢失干净释放或未故意双击而产生重复字符的问题。在清洁开关、更改固件消抖设置、申请保修或更换热插拔开关之前使用。',
103
+ },
104
+ {
105
+ type: 'diagnostic',
106
+ variant: 'info',
107
+ title: '如何读取结果',
108
+ badge: '差值阈值',
109
+ html: '<p><strong>正常</strong>表示重复在50毫秒以上,通常是故意的。<strong>可疑</strong>表示30-50毫秒,应在同一按键上重新测试。<strong>检测到抖动</strong>表示低于30毫秒,很可能是一次物理按压弹跳成多个电接触。</p>',
110
+ },
111
+ {
112
+ type: 'title',
113
+ text: '机械开关为什么会抖动',
114
+ level: 3,
115
+ },
116
+ {
117
+ type: 'paragraph',
118
+ html: '机械开关并非以完美干净的数字化信号闭合。金属触点在稳定前可能会弹跳几毫秒。键盘固件通常通过消抖窗口过滤这种弹跳。当触点脏污、磨损、氧化、松动、破裂或调节不当,导致键盘在消抖滤波器本应处理后仍然报告额外按压时,就会发生抖动。',
119
+ },
120
+ {
121
+ type: 'table',
122
+ headers: ['症状', '可能原因', '首先尝试的方法'],
123
+ rows: [
124
+ ['一个按键输入同一个字母两次', '开关触点脏污或磨损', '取下键帽,吹掉灰尘,在更换开关前再次测试。'],
125
+ ['组装后多个热插拔按键抖动', '开关引脚未正确安装', '拔出并重新安装开关,检查弯曲的引脚或松动的插座。'],
126
+ ['仅在泼溅或潮湿后发生', '触点氧化或有残留物', '断开键盘连接,按照制造商指南清洁。'],
127
+ ['许多按键显示微小差值', '固件消抖太低或扫描问题', '在另一个USB端口上比较,并检查固件消抖设置(如果可用)。'],
128
+ ],
129
+ },
130
+ {
131
+ type: 'title',
132
+ text: '减少误报的测试方法',
133
+ level: 3,
134
+ },
135
+ {
136
+ type: 'list',
137
+ items: [
138
+ '一次测试一个可疑按键,而不是输入完整句子。',
139
+ '按下按键一次,完全释放,等待片刻再进行下一次按压。',
140
+ '将可疑按键与感觉正常的附近按键进行比较。',
141
+ '忽略按键的第一行,因为没有之前的按压可以比较。',
142
+ '如果同一按键从单次点击中反复显示低于30毫秒的红色行,则视为硬件故障。',
143
+ '如果只出现黄色行,则放慢速度重复测试,检查点击节奏是否导致了较短间隔。',
144
+ ],
145
+ },
146
+ {
147
+ type: 'title',
148
+ text: '抖动 vs 故意快速打字',
149
+ level: 3,
150
+ },
151
+ {
152
+ type: 'comparative',
153
+ columns: 3,
154
+ items: [
155
+ {
156
+ title: '抖动',
157
+ description: '集中在一个按键上,通常低于30毫秒,且出现在您意图只按一次时。',
158
+ points: ['检查开关或插座。', '与附近正常按键比较。'],
159
+ },
160
+ {
161
+ title: '快速打字',
162
+ description: '影响许多按键,遵循您的节奏,且同一按键重复按压间隔通常在50毫秒以上。',
163
+ points: ['通常是正常使用。', '用更慢的单次点击重新测试。'],
164
+ },
165
+ {
166
+ title: '操作系统按键重复',
167
+ description: '在按住按键时出现,通常以操作系统设定的规律节奏重复。',
168
+ points: ['点击之间完全释放。', '单独检查键盘重复设置。'],
169
+ },
170
+ ],
171
+ },
172
+ {
173
+ type: 'title',
174
+ text: '按键未通过测试时的处理方法',
175
+ level: 3,
176
+ },
177
+ {
178
+ type: 'list',
179
+ items: [
180
+ '在更改任何内容之前保存CSV日志,以便比较前后结果。',
181
+ '取下键帽,检查是否有污垢、液体残留或无法顺畅回弹的轴心。',
182
+ '对于热插拔键盘,重新安装或更换开关,再次测试同一位置。',
183
+ '对于焊接键盘,在假定PCB需要修理之前,比较固件消抖选项。',
184
+ '如果多个不相关的按键显示不可能的差值,请尝试其他线缆和USB端口。',
185
+ '如需保修支持,请提供受影响的按键、重复的差值、键盘型号、固件版本以及故障是跟随开关还是PCB插座。',
186
+ ],
187
+ },
188
+ {
189
+ type: 'summary',
190
+ title: '快速规则',
191
+ items: [
192
+ '单次红色行是线索,不是定论。',
193
+ '同一物理按键上反复出现低于30毫秒的红色行是键盘抖动的有力证据。',
194
+ '更换硬件前,使用故意的单次点击,并将可疑开关与附近正常按键进行比较。',
195
+ ],
196
+ },
197
+ ],
198
+ ui: {
199
+ statusIdle: '按任意键',
200
+ statusListening: '测量按键差值',
201
+ statusChatter: '检测到抖动',
202
+ totalPresses: '总按压次数',
203
+ chatterEvents: '抖动事件',
204
+ worstDelta: '最差差值',
205
+ watchWindow: '保留行数',
206
+ keyColumn: '按键',
207
+ deltaColumn: '差值',
208
+ verdictColumn: '判断',
209
+ timeColumn: '时间',
210
+ normal: '正常',
211
+ suspect: '可疑',
212
+ chatter: '抖动',
213
+ waiting: '等待中',
214
+ clear: '清除日志',
215
+ exportLog: '导出CSV',
216
+ hint: '日志保留最近80行,以便长时间会话保持快速。按住按键的重复被忽略;红色行来自过于接近的单独按压。',
217
+ captureNotice: '无开始按钮。点击可疑按键一次,观察其与上一次按压的差值。',
218
+ keyboardAriaLabel: '最近按键活动',
219
+ logAriaLabel: '键盘抖动事件日志',
220
+ escapeKey: 'Esc',
221
+ backspaceKey: '退格',
222
+ tabKey: 'Tab',
223
+ enterKey: '回车',
224
+ capsLockKey: '大写',
225
+ shiftKey: 'Shift',
226
+ controlKey: 'Ctrl',
227
+ metaKey: 'Meta',
228
+ altKey: 'Alt',
229
+ spaceKey: '空格',
230
+ csvHeader: '按键,代码,差值_毫秒,严重程度,时间',
231
+ },
232
+ };
@@ -0,0 +1,12 @@
1
+ import { keyboardChatterTest } from './entry';
2
+ import type { ToolDefinition } from '../../types';
3
+
4
+ export * from './entry';
5
+
6
+ export const KEYBOARD_CHATTER_TEST_TOOL: ToolDefinition = {
7
+ entry: keyboardChatterTest,
8
+ Component: () => import('./component.astro'),
9
+ SEOComponent: () => import('./seo.astro'),
10
+ BibliographyComponent: () => import('./bibliography.astro'),
11
+ };
12
+