From 4c6cf8d21b70ca8c8d949ac164b2e03269957639 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Tue, 25 Nov 2025 20:32:04 +0800 Subject: [PATCH 1/2] feat: Add setting to disable lock key OSD notifications --- Assets/Translations/en.json | 4 ++++ Assets/settings-default.json | 3 ++- Commons/Settings.qml | 1 + Modules/OSD/OSD.qml | 6 ++++++ Modules/Panels/Settings/Tabs/OsdTab.qml | 7 +++++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 76a3eb259..37c6fe45f 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1675,6 +1675,10 @@ "label": "General" } }, + "show-lock-key-notifications": { + "description": "Show notifications when Caps Lock, Num Lock, or Scroll Lock keys are toggled.", + "label": "Show lock key notifications" + }, "title": "On-Screen Display" }, "screen-recorder": { diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 377db5d30..44b129f48 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -284,7 +284,8 @@ "monitors": [], "autoHideMs": 2000, "overlayLayer": true, - "backgroundOpacity": 1 + "backgroundOpacity": 1, + "showLockKeyNotifications": true }, "audio": { "volumeStep": 5, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 940837df8..9d793d55b 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -460,6 +460,7 @@ Singleton { property int autoHideMs: 2000 property bool overlayLayer: true property real backgroundOpacity: 1.0 + property bool showLockKeyNotifications: true } // audio diff --git a/Modules/OSD/OSD.qml b/Modules/OSD/OSD.qml index e2949b4dc..b8a1f135a 100644 --- a/Modules/OSD/OSD.qml +++ b/Modules/OSD/OSD.qml @@ -205,6 +205,8 @@ Variants { target: LockKeysService function onCapsLockChanged(active) { + if (!Settings.data.osd.showLockKeyNotifications) + return; root.currentOSDType = "lockkey"; root.lastLockKeyChanged = active ? "CAPS ON" : "CAPS OFF"; if (!root.active) @@ -214,6 +216,8 @@ Variants { } function onNumLockChanged(active) { + if (!Settings.data.osd.showLockKeyNotifications) + return; root.currentOSDType = "lockkey"; root.lastLockKeyChanged = active ? "NUM ON" : "NUM OFF"; if (!root.active) @@ -223,6 +227,8 @@ Variants { } function onScrollLockChanged(active) { + if (!Settings.data.osd.showLockKeyNotifications) + return; root.currentOSDType = "lockkey"; root.lastLockKeyChanged = active ? "SCROLL ON" : "SCROLL OFF"; if (!root.active) diff --git a/Modules/Panels/Settings/Tabs/OsdTab.qml b/Modules/Panels/Settings/Tabs/OsdTab.qml index 9a6377dff..7c218d2b3 100644 --- a/Modules/Panels/Settings/Tabs/OsdTab.qml +++ b/Modules/Panels/Settings/Tabs/OsdTab.qml @@ -99,6 +99,13 @@ ColumnLayout { onToggled: checked => Settings.data.osd.overlayLayer = checked } + NToggle { + label: I18n.tr("settings.osd.show-lock-key-notifications.label", "Show lock key notifications") + description: I18n.tr("settings.osd.show-lock-key-notifications.description", "Show notifications when Caps Lock, Num Lock, or Scroll Lock keys are toggled.") + checked: Settings.data.osd.showLockKeyNotifications + onToggled: checked => Settings.data.osd.showLockKeyNotifications = checked + } + NLabel { label: I18n.tr("settings.osd.background-opacity.label", "Background opacity") description: I18n.tr("settings.osd.background-opacity.description", "Controls the transparency of the OSD background.") From f9f83a6db3d21ef5c90e8f6f873306e64101a44e Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Tue, 25 Nov 2025 21:20:08 +0800 Subject: [PATCH 2/2] i18n: Add show-lock-key-notifications translation --- Assets/Translations/de.json | 4 ++++ Assets/Translations/es.json | 4 ++++ Assets/Translations/fr.json | 4 ++++ Assets/Translations/nl.json | 4 ++++ Assets/Translations/pt.json | 4 ++++ Assets/Translations/ru.json | 4 ++++ Assets/Translations/tr.json | 4 ++++ Assets/Translations/uk-UA.json | 4 ++++ Assets/Translations/zh-CN.json | 4 ++++ 9 files changed, 36 insertions(+) diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 80f26d5e6..3595b249b 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -1675,6 +1675,10 @@ "label": "Allgemein" } }, + "show-lock-key-notifications": { + "description": "Benachrichtigungen anzeigen, wenn sich der Status von Feststelltaste, Num-Taste oder Rollen-Taste ändert.", + "label": "Tastensperr-Benachrichtigungen anzeigen" + }, "title": "On-Screen Display" }, "screen-recorder": { diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index b6f2e15c3..6097ce79a 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -1675,6 +1675,10 @@ "label": "General" } }, + "show-lock-key-notifications": { + "description": "Mostrar notificaciones cuando se activen o desactiven las teclas Bloq Mayús, Bloq Num o Bloq Despl.", + "label": "Mostrar notificaciones de teclas de bloqueo" + }, "title": "Visualización en pantalla" }, "screen-recorder": { diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 7c8aa9229..425650f94 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -1675,6 +1675,10 @@ "label": "Général" } }, + "show-lock-key-notifications": { + "description": "Afficher les notifications lorsque les touches Verr. Maj., Verr. Num. ou Arrêt défil. sont activées/désactivées.", + "label": "Afficher les notifications des touches de verrouillage" + }, "title": "Affichage à l'écran" }, "screen-recorder": { diff --git a/Assets/Translations/nl.json b/Assets/Translations/nl.json index 4debb37a0..215ffc51c 100644 --- a/Assets/Translations/nl.json +++ b/Assets/Translations/nl.json @@ -1675,6 +1675,10 @@ "label": "Algemeen" } }, + "show-lock-key-notifications": { + "description": "Toon meldingen wanneer Caps Lock, Num Lock of Scroll Lock toetsen worden omgeschakeld.", + "label": "Vergrendeltoetsmeldingen tonen" + }, "title": "On-screenweergave" }, "screen-recorder": { diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index adad3ca00..9bebce308 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -1675,6 +1675,10 @@ "label": "Geral" } }, + "show-lock-key-notifications": { + "description": "Mostrar notificações quando as teclas Caps Lock, Num Lock ou Scroll Lock forem alternadas.", + "label": "Mostrar notificações das teclas de bloqueio" + }, "title": "Exibição na tela" }, "screen-recorder": { diff --git a/Assets/Translations/ru.json b/Assets/Translations/ru.json index be42b9988..14c0aef8f 100644 --- a/Assets/Translations/ru.json +++ b/Assets/Translations/ru.json @@ -1675,6 +1675,10 @@ "label": "Общие" } }, + "show-lock-key-notifications": { + "description": "Показывать уведомления при переключении клавиш Caps Lock, Num Lock или Scroll Lock.", + "label": "Показывать уведомления о состоянии клавиш" + }, "title": "Экранное отображение (OSD)" }, "screen-recorder": { diff --git a/Assets/Translations/tr.json b/Assets/Translations/tr.json index 5b84ef814..d1720844d 100644 --- a/Assets/Translations/tr.json +++ b/Assets/Translations/tr.json @@ -1675,6 +1675,10 @@ "label": "Genel" } }, + "show-lock-key-notifications": { + "description": "Caps Lock, Num Lock veya Scroll Lock tuşları değiştirildiğinde bildirimleri göster.", + "label": "Kilit tuşu bildirimlerini göster" + }, "title": "Ekran Görüntüsü" }, "screen-recorder": { diff --git a/Assets/Translations/uk-UA.json b/Assets/Translations/uk-UA.json index 2aa879876..7eb0d75cd 100644 --- a/Assets/Translations/uk-UA.json +++ b/Assets/Translations/uk-UA.json @@ -1675,6 +1675,10 @@ "label": "Загальні" } }, + "show-lock-key-notifications": { + "description": "Показувати сповіщення, коли перемикаються клавіші Caps Lock, Num Lock або Scroll Lock.", + "label": "Показувати сповіщення про стан клавіш" + }, "title": "Екранна індикація" }, "screen-recorder": { diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 54c3de1eb..064946a8f 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -1675,6 +1675,10 @@ "label": "常规" } }, + "show-lock-key-notifications": { + "description": "当大写锁定键、数字锁定键或滚动锁定键被切换时显示通知。", + "label": "显示锁定键通知" + }, "title": "屏显菜单" }, "screen-recorder": {