);
-}
\ No newline at end of file
+}
diff --git a/src/features/hardware-test/hardware-test-report.test.ts b/src/features/hardware-test/hardware-test-report.test.ts
index 0916d18d..92bcb475 100644
--- a/src/features/hardware-test/hardware-test-report.test.ts
+++ b/src/features/hardware-test/hardware-test-report.test.ts
@@ -276,6 +276,17 @@ test("pickFlashLiftOffTarget prefers Medium, falling back to Low", () => {
assert.equal(pickFlashLiftOffTarget("Low", ["Low"]), null);
});
+test("flash targets require a reported value that can be restored", () => {
+ for (const baseline of [0, -1, 0.5, Number.NaN, Number.POSITIVE_INFINITY]) {
+ assert.equal(pickFlashDpiTarget(baseline, [baseline, 800]), null);
+ assert.equal(pickFlashPollRateTarget(baseline, [baseline, 500]), null);
+ }
+ assert.equal(pickFlashDpiTarget(3600, [800, 1600]), null);
+ assert.equal(pickFlashPollRateTarget(1000, [125, 500]), null);
+ assert.equal(pickFlashDpiTarget(3600, [800, 3600]), 800);
+ assert.equal(pickFlashPollRateTarget(1000, [125, 500, 1000]), 500);
+});
+
test("flashWriteResult scores the round-trip legs — DPI, poll rate, lift-off", () => {
const pass = flashWriteResult({
roundTrips: [
diff --git a/src/features/hardware-test/hardware-test-report.ts b/src/features/hardware-test/hardware-test-report.ts
index 2d2b6735..c378b6ab 100644
--- a/src/features/hardware-test/hardware-test-report.ts
+++ b/src/features/hardware-test/hardware-test-report.ts
@@ -1,4 +1,5 @@
import type { ControlSnapshot } from "../../device/types";
+import { verifiedDeviceSettings } from "../../device/traits.ts";
import { formatHz } from "./polling-stats.ts";
import type { SupportedDevicesCrosscheck } from "./supported-devices-crosscheck.ts";
@@ -95,7 +96,7 @@ export function deviceInfoFromSnapshot(snapshot: ControlSnapshot): HardwareDevic
// driver whose settings read failed (settingsReady: false) or that has no
// read-back (valuesVerified: false) still fills them with defaults, so drop
// them here and the read-back checks fail instead of passing on those.
- const settings = (status?.ui?.valuesVerified ?? status?.ui?.settingsReady !== false) ? status : null;
+ const settings = verifiedDeviceSettings(status);
return {
present: status !== null,
brand: status?.brand ?? null,
@@ -329,12 +330,12 @@ export function verdictFor(run: { results: HardwareTestResult[]; incomplete: boo
* smallest available value. Returns null when there is nothing to write.
*/
export function pickFlashDpiTarget(current: number | null, options: readonly number[]): number | null {
- if (current === null || options.length === 0) return null;
+ if (!isFlashBaseline(current) || !options.includes(current)) return null;
const candidates = [800, 1600, 2400, 3200, current * 2, Math.round(current / 2)];
for (const candidate of candidates) {
if (candidate !== current && candidate > 0 && candidate <= MAX_PLAUSIBLE_DPI && options.includes(candidate)) return candidate;
}
- const alternate = options.find((option) => option !== current);
+ const alternate = options.find((option) => option !== current && isFlashBaseline(option) && option <= MAX_PLAUSIBLE_DPI);
return alternate ?? null;
}
@@ -345,15 +346,19 @@ export function pickFlashDpiTarget(current: number | null, options: readonly num
* value. Returns null when there is nothing to write.
*/
export function pickFlashPollRateTarget(current: number | null, options: readonly number[]): number | null {
- if (current === null || options.length === 0) return null;
+ if (!isFlashBaseline(current) || !options.includes(current)) return null;
const candidates = [current * 2, Math.round(current / 2), 125, 250, 500, 1000, 2000, 4000, 8000];
for (const candidate of candidates) {
if (candidate !== current && candidate > 0 && options.includes(candidate)) return candidate;
}
- const alternate = options.find((option) => option !== current);
+ const alternate = options.find((option) => option !== current && isFlashBaseline(option));
return alternate ?? null;
}
+export function isFlashBaseline(value: number | null): value is number {
+ return value !== null && Number.isInteger(value) && value > 0;
+}
+
/**
* Picks the least obtrusive alternate lift-off level the device offers.
* Medium is the middle of the physical range, so it is preferred whenever the
@@ -457,4 +462,4 @@ export function pollingSampleResult(sample: {
status: "skip",
detail: `avg ${formatHz(sample.avgHz)} Hz vs reported ${reported} Hz — dropout or rate mismatch detected, so the sample is not counted as a failure.`,
};
-}
\ No newline at end of file
+}
diff --git a/src/i18n/index.ts b/src/i18n/index.ts
index 3ab9483d..9fd410e4 100644
--- a/src/i18n/index.ts
+++ b/src/i18n/index.ts
@@ -6,6 +6,14 @@ const en = {
"receiver.all": "All",
"receiver.mouse": "Mouse buttons",
"receiver.shortcuts": "Keyboard shortcuts",
+ "x11.deepSleep": "Deep sleep",
+ "x11.macroAssign": "Assign to button",
+ "x11.macroRecording": "Press keys or mouse buttons. Press Esc to stop.",
+ "x11.macroCapacity": "{n} of {max} action units used. Delays over 1,270 ms use two.",
+ "x11.macroBalance": "Each press needs a matching release. Check the order of the steps.",
+ "x11.macroShortenedRelease": "The recorder shortened a release delay to fit the macro. Review the step timing.",
+ "x11.macroStorage": "Couldn't update the macro library in this browser.",
+ "x11.loadSettings": "Load X11 settings",
"receiver.media": "Media",
"receiver.rates": "DPI and polling",
"receiver.lighting": "Lighting and switches",
@@ -316,6 +324,14 @@ const en = {
"hw.checking": "Checking {label}…",
"hw.samplingPrompt": "Move the mouse in small circles over this window — 5 seconds of sampling.",
"hw.flashPrompt": "A build setting is written, read back, then restored — your pointer may change briefly.",
+ "hw.x11ReadFailed": "Could not read the X11 settings.",
+ "hw.deviceChanged": "The selected device changed during the test.",
+ "hw.testSettingsChanged": "The device or its settings changed during the test.",
+ "hw.flashNotSent": "The test failed before sending the flash write.",
+ "hw.flashUnconfirmed": "The test could not confirm the flash write.",
+ "hw.restoreUnconfirmed": "Could not confirm the restore to {value}.",
+ "hw.flashReadbackMismatch": "Could not read back {value}. The original value was restored.",
+ "hw.noRestorableTarget": "No alternate setting can be written and safely restored.",
"hw.liveHertz": "{hz} Hz · {samples} samples",
"hw.finishTime": "Finished in {s} s",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts
index 932e1a96..bf3f5f33 100644
--- a/src/i18n/locales/ar.ts
+++ b/src/i18n/locales/ar.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const ar: Record = {
+ "x11.macroAssign": "تعيين للزر",
+ "x11.macroRecording": "اضغط مفاتيح أو أزرار الماوس. اضغط Esc للإيقاف.",
+ "x11.macroCapacity": "تم استخدام {n} من {max} وحدات إجراء. التأخير الذي يتجاوز 1270 مللي ثانية يستخدم وحدتين.",
+ "x11.macroBalance": "تحتاج كل ضغطة إلى إفلات مطابق. تحقق من ترتيب الخطوات.",
+ "x11.macroShortenedRelease": "قصّر المسجّل مدة تأخير إفلات أحد الأزرار لتناسب سعة الماكرو. راجع توقيت الخطوات.",
+ "x11.macroStorage": "تعذر تحديث مكتبة وحدات الماكرو في هذا المتصفح.",
+ "x11.loadSettings": "تحميل إعدادات X11",
+ "x11.deepSleep": "السكون العميق",
"receiver.assign": "تعيين إجراء",
"receiver.search": "البحث عن إجراءات",
"receiver.all": "الكل",
@@ -259,6 +267,14 @@ export const ar: Record = {
"hw.checking": "جارٍ التحقق من {label}…",
"hw.samplingPrompt": "حرّك الماوس بدوائر صغيرة فوق هذه النافذة — أخذ العينات يستغرق 5 ثوانٍ.",
"hw.flashPrompt": "يُكتب إعداد، ثم يُقرأ من جديد ويُستعاد — قد تتغير سرعة المؤشر للحظات.",
+ "hw.x11ReadFailed": "تعذرت قراءة إعدادات X11.",
+ "hw.deviceChanged": "تغيّر الجهاز المحدد أثناء الاختبار.",
+ "hw.testSettingsChanged": "تغيّر الجهاز أو إعداداته أثناء الاختبار.",
+ "hw.flashNotSent": "فشل الاختبار قبل إرسال أمر الكتابة إلى ذاكرة الفلاش.",
+ "hw.flashUnconfirmed": "تعذر على الاختبار تأكيد الكتابة إلى ذاكرة الفلاش.",
+ "hw.restoreUnconfirmed": "تعذر تأكيد استعادة القيمة {value}.",
+ "hw.flashReadbackMismatch": "تعذرت قراءة القيمة {value} مرة أخرى. تمت استعادة القيمة الأصلية.",
+ "hw.noRestorableTarget": "لا يمكن كتابة إعداد بديل ثم استعادته بأمان.",
"hw.liveHertz": "{hz} هرتز · {samples} عينة",
"hw.finishTime": "اكتمل خلال {s} ثوانٍ",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts
index ac6d0eb5..81f2df18 100644
--- a/src/i18n/locales/de.ts
+++ b/src/i18n/locales/de.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const de: Record = {
+ "x11.macroAssign": "Taste zuweisen",
+ "x11.macroRecording": "Drücke Tasten oder Maustasten. Drücke Esc zum Beenden.",
+ "x11.macroCapacity": "{n} von {max} Aktionseinheiten belegt. Verzögerungen über 1270 ms belegen zwei.",
+ "x11.macroBalance": "Für jeden Tastendruck muss es ein Loslassen geben. Prüfe die Reihenfolge der Schritte.",
+ "x11.macroShortenedRelease": "Die Aufzeichnung hat die Verzögerung vor dem Loslassen verkürzt, damit das Makro ins Limit passt. Prüfe das Timing der Schritte.",
+ "x11.macroStorage": "Die Makrobibliothek konnte in diesem Browser nicht aktualisiert werden.",
+ "x11.loadSettings": "X11-Einstellungen laden",
+ "x11.deepSleep": "Tiefschlaf",
"receiver.assign": "Aktion zuweisen",
"receiver.search": "Aktionen suchen",
"receiver.all": "Alle",
@@ -260,6 +268,14 @@ export const de: Record = {
"hw.checking": "Prüfe {label}…",
"hw.samplingPrompt": "Bewegen Sie die Maus in kleinen Kreisen über dieses Fenster — 5 Sekunden Sampling.",
"hw.flashPrompt": "Eine Einstellung wird geschrieben, ausgelesen und dann wiederhergestellt — die Zeigergeschwindigkeit kann sich kurz ändern.",
+ "hw.x11ReadFailed": "Die X11-Einstellungen konnten nicht gelesen werden.",
+ "hw.deviceChanged": "Das ausgewählte Gerät hat sich während des Tests geändert.",
+ "hw.testSettingsChanged": "Das Gerät oder seine Einstellungen haben sich während des Tests geändert.",
+ "hw.flashNotSent": "Der Test ist fehlgeschlagen, bevor er den Schreibbefehl an den Flash-Speicher gesendet hat.",
+ "hw.flashUnconfirmed": "Der Test konnte den Schreibvorgang im Flash-Speicher nicht bestätigen.",
+ "hw.restoreUnconfirmed": "Die Wiederherstellung von {value} konnte nicht bestätigt werden.",
+ "hw.flashReadbackMismatch": "{value} konnte nicht zurückgelesen werden. Der ursprüngliche Wert wurde wiederhergestellt.",
+ "hw.noRestorableTarget": "Es lässt sich kein anderer Wert schreiben und anschließend sicher zurücksetzen.",
"hw.liveHertz": "{hz} Hz · {samples} Samples",
"hw.finishTime": "Fertig in {s} s",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts
index 8defdbc9..983ea869 100644
--- a/src/i18n/locales/es.ts
+++ b/src/i18n/locales/es.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const es: Record = {
+ "x11.macroAssign": "Asignar al botón",
+ "x11.macroRecording": "Pulsa teclas o botones del ratón. Pulsa Esc para detener la grabación.",
+ "x11.macroCapacity": "Se usan {n} de {max} unidades de acción. Los retardos de más de 1270 ms usan dos.",
+ "x11.macroBalance": "Cada pulsación debe tener su liberación correspondiente. Revisa el orden de los pasos.",
+ "x11.macroShortenedRelease": "La grabadora acortó un retraso de liberación para respetar el límite de la macro. Revisa los tiempos de los pasos.",
+ "x11.macroStorage": "No se pudo actualizar la biblioteca de macros en este navegador.",
+ "x11.loadSettings": "Cargar ajustes del X11",
+ "x11.deepSleep": "Suspensión profunda",
"receiver.assign": "Asignar una acción",
"receiver.search": "Buscar acciones",
"receiver.all": "Todo",
@@ -260,6 +268,14 @@ export const es: Record = {
"hw.checking": "Comprobando {label}…",
"hw.samplingPrompt": "Mueve el ratón en círculos pequeños sobre esta ventana — 5 segundos de muestreo.",
"hw.flashPrompt": "Se escribe un ajuste, se lee y luego se restaura — el puntero podría cambiar de velocidad brevemente.",
+ "hw.x11ReadFailed": "No se pudieron leer los ajustes del X11.",
+ "hw.deviceChanged": "El dispositivo seleccionado cambió durante la prueba.",
+ "hw.testSettingsChanged": "El dispositivo o sus ajustes cambiaron durante la prueba.",
+ "hw.flashNotSent": "La prueba falló antes de enviar la orden de escritura a la memoria flash.",
+ "hw.flashUnconfirmed": "La prueba no pudo confirmar la escritura en la memoria flash.",
+ "hw.restoreUnconfirmed": "No se pudo confirmar la restauración de {value}.",
+ "hw.flashReadbackMismatch": "No se pudo volver a leer {value}. Se restauró el valor original.",
+ "hw.noRestorableTarget": "No se puede escribir un valor alternativo y volver al original de forma segura.",
"hw.liveHertz": "{hz} Hz · {samples} muestras",
"hw.finishTime": "Finalizado en {s} s",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts
index 0aa54390..84ff545e 100644
--- a/src/i18n/locales/fr.ts
+++ b/src/i18n/locales/fr.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const fr: Record = {
+ "x11.macroAssign": "Attribuer au bouton",
+ "x11.macroRecording": "Appuyez sur des touches ou des boutons de souris. Appuyez sur Échap pour arrêter.",
+ "x11.macroCapacity": "{n} unités d’action utilisées sur {max}. Les délais de plus de 1 270 ms en utilisent deux.",
+ "x11.macroBalance": "Chaque pression doit avoir un relâchement correspondant. Vérifiez l’ordre des étapes.",
+ "x11.macroShortenedRelease": "L’enregistreur a raccourci un délai avant relâchement pour respecter la limite de la macro. Vérifiez la durée des étapes.",
+ "x11.macroStorage": "Impossible de mettre à jour la bibliothèque de macros dans ce navigateur.",
+ "x11.loadSettings": "Charger les réglages de la X11",
+ "x11.deepSleep": "Veille profonde",
"receiver.assign": "Attribuer une action",
"receiver.search": "Rechercher des actions",
"receiver.all": "Tout",
@@ -260,6 +268,14 @@ export const fr: Record = {
"hw.checking": "Vérification de {label}…",
"hw.samplingPrompt": "Déplacez la souris en petits cercles au-dessus de cette fenêtre — 5 secondes d'échantillonnage.",
"hw.flashPrompt": "Un réglage est écrit, relu puis restauré — le pointeur peut changer de vitesse brièvement.",
+ "hw.x11ReadFailed": "Impossible de lire les réglages de la X11.",
+ "hw.deviceChanged": "L’appareil sélectionné a changé pendant le test.",
+ "hw.testSettingsChanged": "L’appareil ou ses réglages ont changé pendant le test.",
+ "hw.flashNotSent": "Le test a échoué avant l’envoi de la commande d’écriture en mémoire flash.",
+ "hw.flashUnconfirmed": "Le test n’a pas pu confirmer l’écriture en mémoire flash.",
+ "hw.restoreUnconfirmed": "Impossible de confirmer le rétablissement de la valeur {value}.",
+ "hw.flashReadbackMismatch": "Impossible de relire la valeur {value}. La valeur d’origine a été rétablie.",
+ "hw.noRestorableTarget": "Aucune autre valeur ne peut être écrite avec un retour sûr à la valeur d’origine.",
"hw.liveHertz": "{hz} Hz · {samples} échantillons",
"hw.finishTime": "Terminé en {s} s",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts
index 099e223a..b0f9370c 100644
--- a/src/i18n/locales/ja.ts
+++ b/src/i18n/locales/ja.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const ja: Record = {
+ "x11.macroAssign": "ボタンに割り当てる",
+ "x11.macroRecording": "キーやマウスボタンを押します。Esc キーで終了します。",
+ "x11.macroCapacity": "{max} アクション単位のうち {n} を使用中です。1,270 ms を超える遅延は 2 単位を使います。",
+ "x11.macroBalance": "押す操作ごとに対応する解放操作が必要です。手順の順序を確認してください。",
+ "x11.macroShortenedRelease": "マクロの上限に収まるよう、記録時にリリース前の待ち時間を短縮しました。各ステップのタイミングを確認してください。",
+ "x11.macroStorage": "このブラウザーのマクロライブラリを更新できませんでした。",
+ "x11.loadSettings": "X11 の設定を読み込む",
+ "x11.deepSleep": "ディープスリープ",
"receiver.assign": "操作を割り当て",
"receiver.search": "操作を検索",
"receiver.all": "すべて",
@@ -260,6 +268,14 @@ export const ja: Record = {
"hw.checking": "{label} をチェック中…",
"hw.samplingPrompt": "このウィンドウ上でマウスを小さく円を描くように動かしてください(5秒間のサンプリング)。",
"hw.flashPrompt": "設定を書き込み、読み戻し、元に戻します。ポインターの速度が一時的に変わることがあります。",
+ "hw.x11ReadFailed": "X11の設定を読み取れませんでした。",
+ "hw.deviceChanged": "テスト中に選択したデバイスが変わりました。",
+ "hw.testSettingsChanged": "テスト中にデバイスまたはその設定が変わりました。",
+ "hw.flashNotSent": "フラッシュへの書き込み要求を送信する前にテストが失敗しました。",
+ "hw.flashUnconfirmed": "テストでフラッシュへの書き込みを確認できませんでした。",
+ "hw.restoreUnconfirmed": "{value}への復元を確認できませんでした。",
+ "hw.flashReadbackMismatch": "{value}を読み戻せませんでした。元の値に戻しました。",
+ "hw.noRestorableTarget": "別の値を書き込んでから元の値に安全に戻すことができません。",
"hw.liveHertz": "{hz} Hz · {samples} サンプル",
"hw.finishTime": "{s} 秒で完了",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts
index 7c287b7e..4fb4a282 100644
--- a/src/i18n/locales/ko.ts
+++ b/src/i18n/locales/ko.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const ko: Record = {
+ "x11.macroAssign": "버튼에 할당",
+ "x11.macroRecording": "키나 마우스 버튼을 누르세요. Esc 키를 누르면 중지됩니다.",
+ "x11.macroCapacity": "동작 단위 {max}개 중 {n}개 사용 중입니다. 1,270ms를 초과하는 지연은 두 단위를 사용합니다.",
+ "x11.macroBalance": "누름마다 짝이 맞는 뗌 동작이 필요합니다. 단계 순서를 확인하세요.",
+ "x11.macroShortenedRelease": "매크로 용량에 맞추기 위해 녹화 중 입력을 놓기 전의 대기 시간이 줄었습니다. 단계별 시간을 확인하세요.",
+ "x11.macroStorage": "이 브라우저의 매크로 라이브러리를 업데이트하지 못했습니다.",
+ "x11.loadSettings": "X11 설정 불러오기",
+ "x11.deepSleep": "깊은 절전",
"receiver.assign": "동작 지정",
"receiver.search": "동작 검색",
"receiver.all": "전체",
@@ -260,6 +268,14 @@ export const ko: Record = {
"hw.checking": "{label} 확인 중…",
"hw.samplingPrompt": "이 창 위에서 마우스를 작은 원 모양으로 움직이세요 — 5초간 샘플링합니다.",
"hw.flashPrompt": "설정을 쓰고, 다시 읽은 후 복원합니다. 포인터 속도가 잠깐 바뀔 수 있습니다.",
+ "hw.x11ReadFailed": "X11 설정을 읽을 수 없습니다.",
+ "hw.deviceChanged": "테스트 중 선택한 장치가 바뀌었습니다.",
+ "hw.testSettingsChanged": "테스트 중 장치 또는 장치 설정이 바뀌었습니다.",
+ "hw.flashNotSent": "플래시 쓰기 명령을 보내기 전에 테스트가 실패했습니다.",
+ "hw.flashUnconfirmed": "테스트에서 플래시 쓰기를 확인할 수 없습니다.",
+ "hw.restoreUnconfirmed": "{value}(으)로 복원했는지 확인할 수 없습니다.",
+ "hw.flashReadbackMismatch": "{value} 값을 다시 읽을 수 없습니다. 원래 값은 복원했습니다.",
+ "hw.noRestorableTarget": "다른 값을 쓴 뒤 원래 값으로 안전하게 되돌릴 수 없습니다.",
"hw.liveHertz": "{hz} Hz · {samples}개 샘플",
"hw.finishTime": "{s}초 만에 완료",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/pt.ts b/src/i18n/locales/pt.ts
index 538d6e65..8c0005fe 100644
--- a/src/i18n/locales/pt.ts
+++ b/src/i18n/locales/pt.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const pt: Record = {
+ "x11.macroAssign": "Atribuir ao botão",
+ "x11.macroRecording": "Prima teclas ou botões do rato. Prima Esc para parar.",
+ "x11.macroCapacity": "{n} de {max} unidades de ação usadas. Atrasos superiores a 1270 ms usam duas.",
+ "x11.macroBalance": "Cada pressão precisa da libertação correspondente. Verifique a ordem dos passos.",
+ "x11.macroShortenedRelease": "O gravador encurtou um atraso de liberação para respeitar o limite da macro. Confira o tempo de cada etapa.",
+ "x11.macroStorage": "Não foi possível atualizar a biblioteca de macros neste navegador.",
+ "x11.loadSettings": "Carregar definições do X11",
+ "x11.deepSleep": "Suspensão profunda",
"receiver.assign": "Atribuir uma ação",
"receiver.search": "Pesquisar ações",
"receiver.all": "Todas",
@@ -260,6 +268,14 @@ export const pt: Record = {
"hw.checking": "Verificando {label}…",
"hw.samplingPrompt": "Mova o mouse em círculos pequenos sobre esta janela — 5 segundos de amostragem.",
"hw.flashPrompt": "Uma configuração é gravada, relida e restaurada — o ponteiro pode mudar de velocidade por um instante.",
+ "hw.x11ReadFailed": "Não foi possível ler as configurações do X11.",
+ "hw.deviceChanged": "O dispositivo selecionado mudou durante o teste.",
+ "hw.testSettingsChanged": "O dispositivo ou suas configurações mudaram durante o teste.",
+ "hw.flashNotSent": "O teste falhou antes de enviar o comando de gravação na memória flash.",
+ "hw.flashUnconfirmed": "O teste não conseguiu confirmar a gravação na memória flash.",
+ "hw.restoreUnconfirmed": "Não foi possível confirmar a restauração para {value}.",
+ "hw.flashReadbackMismatch": "Não foi possível reler {value}. O valor original foi restaurado.",
+ "hw.noRestorableTarget": "Não é possível gravar outro valor e voltar ao original com segurança.",
"hw.liveHertz": "{hz} Hz · {samples} amostras",
"hw.finishTime": "Concluído em {s} s",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts
index ecda7d53..0fdfc34f 100644
--- a/src/i18n/locales/ru.ts
+++ b/src/i18n/locales/ru.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const ru: Record = {
+ "x11.macroAssign": "Назначить кнопке",
+ "x11.macroRecording": "Нажимайте клавиши или кнопки мыши. Нажмите Esc для остановки.",
+ "x11.macroCapacity": "Использовано {n} из {max} единиц действия. Задержки более 1270 мс занимают две единицы.",
+ "x11.macroBalance": "Каждому нажатию должно соответствовать отпускание. Проверьте порядок шагов.",
+ "x11.macroShortenedRelease": "При записи задержка перед отпусканием была сокращена, чтобы уложиться в лимит макроса. Проверьте время шагов.",
+ "x11.macroStorage": "Не удалось обновить библиотеку макросов в этом браузере.",
+ "x11.loadSettings": "Загрузить настройки X11",
+ "x11.deepSleep": "Глубокий сон",
"receiver.assign": "Назначить действие",
"receiver.search": "Поиск действий",
"receiver.all": "Все",
@@ -260,6 +268,14 @@ export const ru: Record = {
"hw.checking": "Проверка: {label}…",
"hw.samplingPrompt": "Двигайте мышь небольшими кругами над этим окном — выборка займёт 5 секунд.",
"hw.flashPrompt": "Настройка записывается, считывается и восстанавливается — скорость указателя может ненадолго измениться.",
+ "hw.x11ReadFailed": "Не удалось прочитать настройки X11.",
+ "hw.deviceChanged": "Во время проверки изменилось выбранное устройство.",
+ "hw.testSettingsChanged": "Во время проверки изменилось устройство или его настройки.",
+ "hw.flashNotSent": "Проверка завершилась ошибкой до отправки команды записи во флеш-память.",
+ "hw.flashUnconfirmed": "Не удалось подтвердить запись во флеш-память.",
+ "hw.restoreUnconfirmed": "Не удалось подтвердить восстановление значения {value}.",
+ "hw.flashReadbackMismatch": "Не удалось повторно прочитать значение {value}. Исходное значение восстановлено.",
+ "hw.noRestorableTarget": "Невозможно записать другое значение и безопасно вернуть исходное.",
"hw.liveHertz": "{hz} Гц · выборок: {samples}",
"hw.finishTime": "Завершено за {s} с",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/tr.ts b/src/i18n/locales/tr.ts
index 56ebe0c3..c0ad1a62 100644
--- a/src/i18n/locales/tr.ts
+++ b/src/i18n/locales/tr.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const tr: Record = {
+ "x11.macroAssign": "Düğmeye ata",
+ "x11.macroRecording": "Klavye tuşlarına veya fare düğmelerine basın. Durdurmak için Esc tuşuna basın.",
+ "x11.macroCapacity": "{max} işlem biriminin {n} tanesi kullanıldı. 1270 ms üzerindeki gecikmeler iki birim kullanır.",
+ "x11.macroBalance": "Her basışın karşılık gelen bir bırakma adımı olmalıdır. Adımların sırasını kontrol edin.",
+ "x11.macroShortenedRelease": "Kayıt aracı, makro sınırına sığması için bir bırakma gecikmesini kısalttı. Adımların zamanlamasını kontrol et.",
+ "x11.macroStorage": "Bu tarayıcıdaki makro kitaplığı güncellenemedi.",
+ "x11.loadSettings": "X11 ayarlarını yükle",
+ "x11.deepSleep": "Derin uyku",
"receiver.assign": "Bir eylem ata",
"receiver.search": "Eylem ara",
"receiver.all": "Tümü",
@@ -259,6 +267,14 @@ export const tr: Record = {
"hw.checking": "{label} kontrol ediliyor…",
"hw.samplingPrompt": "Fareyi bu pencere üzerinde küçük daireler çizerek hareket ettirin. Örnekleme 5 saniye sürer.",
"hw.flashPrompt": "Bir ayar yazılıp geri okunacak, ardından eski değerine döndürülecek. İşaretçinin davranışı kısa süreliğine değişebilir.",
+ "hw.x11ReadFailed": "X11 ayarları okunamadı.",
+ "hw.deviceChanged": "Test sırasında seçili cihaz değişti.",
+ "hw.testSettingsChanged": "Test sırasında cihaz veya ayarları değişti.",
+ "hw.flashNotSent": "Test, flash belleğe yazma komutunu göndermeden önce başarısız oldu.",
+ "hw.flashUnconfirmed": "Test, flash belleğe yazmayı doğrulayamadı.",
+ "hw.restoreUnconfirmed": "{value} değerine geri dönüldüğü doğrulanamadı.",
+ "hw.flashReadbackMismatch": "{value} değeri geri okunamadı. İlk değer geri yüklendi.",
+ "hw.noRestorableTarget": "Başka bir değer yazıp ilk değere güvenle dönmek mümkün değil.",
"hw.liveHertz": "{hz} Hz · {samples} örnek",
"hw.finishTime": "{s} saniyede tamamlandı",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/vi.ts b/src/i18n/locales/vi.ts
index fe032505..aefbe0c0 100644
--- a/src/i18n/locales/vi.ts
+++ b/src/i18n/locales/vi.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const vi: Record = {
+ "x11.macroAssign": "Gán cho nút",
+ "x11.macroRecording": "Nhấn phím hoặc nút chuột. Nhấn Esc để dừng.",
+ "x11.macroCapacity": "Đã dùng {n} trên {max} đơn vị thao tác. Độ trễ trên 1270 ms dùng hai đơn vị.",
+ "x11.macroBalance": "Mỗi lần nhấn phải có thao tác nhả tương ứng. Hãy kiểm tra thứ tự các bước.",
+ "x11.macroShortenedRelease": "Trình ghi đã rút ngắn độ trễ trước khi nhả phím hoặc nút để vừa giới hạn macro. Hãy xem lại thời gian của các bước.",
+ "x11.macroStorage": "Không thể cập nhật thư viện macro trong trình duyệt này.",
+ "x11.loadSettings": "Tải cài đặt X11",
+ "x11.deepSleep": "Ngủ sâu",
"receiver.assign": "Gán thao tác",
"receiver.search": "Tìm thao tác",
"receiver.all": "Tất cả",
@@ -1222,6 +1230,14 @@ export const vi: Record = {
"hw.checking": "Đang kiểm tra {label}…",
"hw.samplingPrompt": "Di chuyển chuột theo vòng tròn nhỏ trên cửa sổ này — lấy mẫu trong 5 giây.",
"hw.flashPrompt": "Một thiết lập được ghi, đọc lại rồi khôi phục — con trỏ có thể thay đổi tốc độ trong giây lát.",
+ "hw.x11ReadFailed": "Không thể đọc cài đặt X11.",
+ "hw.deviceChanged": "Thiết bị đã chọn thay đổi trong khi kiểm tra.",
+ "hw.testSettingsChanged": "Thiết bị hoặc cài đặt của thiết bị thay đổi trong khi kiểm tra.",
+ "hw.flashNotSent": "Kiểm tra thất bại trước khi gửi lệnh ghi vào bộ nhớ flash.",
+ "hw.flashUnconfirmed": "Không thể xác nhận thao tác ghi vào bộ nhớ flash.",
+ "hw.restoreUnconfirmed": "Không thể xác nhận đã khôi phục về giá trị {value}.",
+ "hw.flashReadbackMismatch": "Không thể đọc lại giá trị {value}. Đã khôi phục giá trị ban đầu.",
+ "hw.noRestorableTarget": "Không thể ghi giá trị khác rồi khôi phục an toàn về giá trị ban đầu.",
"hw.liveHertz": "{hz} Hz · {samples} mẫu",
"hw.finishTime": "Hoàn tất trong {s} giây",
"hw.identity": "VID / PID",
diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts
index a74c81c1..5f444e14 100644
--- a/src/i18n/locales/zh.ts
+++ b/src/i18n/locales/zh.ts
@@ -3,6 +3,14 @@ import { WOOTING_UI_STRINGS } from "./wooting-ui.ts";
import { VENDOR_KEYBOARD_UI_STRINGS } from "./vendor-keyboard-ui.ts";
export const zh: Record = {
+ "x11.macroAssign": "分配到按键",
+ "x11.macroRecording": "按下键盘键或鼠标键。按 Esc 停止录制。",
+ "x11.macroCapacity": "已使用 {n}/{max} 个动作单元。超过 1270 毫秒的延迟会占用两个单元。",
+ "x11.macroBalance": "每次按下都需要有对应的释放。请检查步骤顺序。",
+ "x11.macroShortenedRelease": "为满足宏的容量限制,录制时缩短了一次释放前的延迟。请检查步骤的时序。",
+ "x11.macroStorage": "无法更新此浏览器中的宏库。",
+ "x11.loadSettings": "读取 X11 设置",
+ "x11.deepSleep": "深度休眠",
"receiver.assign": "分配操作",
"receiver.search": "搜索操作",
"receiver.all": "全部",
@@ -260,6 +268,14 @@ export const zh: Record = {
"hw.checking": "正在检查 {label}…",
"hw.samplingPrompt": "在此窗口上方小范围画圈移动鼠标——采样 5 秒。",
"hw.flashPrompt": "将写入一项设置、读回后再恢复——指针速度可能短暂变化。",
+ "hw.x11ReadFailed": "无法读取 X11 设置。",
+ "hw.deviceChanged": "测试期间所选设备发生了变化。",
+ "hw.testSettingsChanged": "测试期间设备或其设置发生了变化。",
+ "hw.flashNotSent": "测试在发送闪存写入命令前失败。",
+ "hw.flashUnconfirmed": "测试无法确认闪存写入成功。",
+ "hw.restoreUnconfirmed": "无法确认已恢复为 {value}。",
+ "hw.flashReadbackMismatch": "无法读回 {value}。原值已恢复。",
+ "hw.noRestorableTarget": "无法写入其他值并安全恢复原值。",
"hw.liveHertz": "{hz} 赫兹 · {samples} 个样本",
"hw.finishTime": "用时 {s} 秒完成",
"hw.identity": "VID / PID",
diff --git a/src/shared/CardSlot.tsx b/src/shared/CardSlot.tsx
index 6315422a..51ac7d47 100644
--- a/src/shared/CardSlot.tsx
+++ b/src/shared/CardSlot.tsx
@@ -69,7 +69,7 @@ export function iconForCard(key: string): LucideIcon | null {
for (const [pattern, icon] of FEATURE_ICONS) if (pattern.test(key)) return icon;
return null;
}
-const WIDE = new Set(["dpi", "eggpolling", "eggcpi", "eggbuttons", "ksnake-macros", "wallhack-macros", "incott-macros", "lighting-tab", "button-mapping", "keychron-dynamic", "keychron-receiver-buttons"]);
+const WIDE = new Set(["dpi", "eggpolling", "eggcpi", "eggbuttons", "ksnake-macros", "wallhack-macros", "incott-macros", "x11-macros", "lighting-tab", "button-mapping", "keychron-dynamic", "keychron-receiver-buttons"]);
export function slotCards(cards: readonly ReactNode[]): ReactNode[] {
return Children.toArray(cards).map((card) => {
diff --git a/src/styles/areas/library.css b/src/styles/areas/library.css
index 64ead379..6e5b3add 100644
--- a/src/styles/areas/library.css
+++ b/src/styles/areas/library.css
@@ -119,7 +119,7 @@
#finalmouse-profiles .profile-rename { margin-top: 8px; }
#finalmouse-profiles .profile-rename input { min-width: 0; flex: 1; }
-:is(#ksnake-macro-settings, #wallhack-macro-settings, #incott-macro-settings, #xiaomi-macro-settings, #leobog-macro-settings) { grid-column: 1 / -1; gap: 16px; }
+:is(#ksnake-macro-settings, #wallhack-macro-settings, #incott-macro-settings, #xiaomi-macro-settings, #leobog-macro-settings, #x11-macro-settings) { grid-column: 1 / -1; gap: 16px; }
.ksnake-macro-lead { margin-top: 4px; color: var(--text-3); font-size: var(--fs-meta); font-weight: 400; line-height: 1.5; }
.ksnake-macro-notice { padding: 12px; background: var(--well); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-meta); line-height: 1.5; }
.ksnake-macro-slot-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--text-2); font-size: var(--fs-meta); }