/*SPDX-FileCopyrightText: 2018 Tomaz Canabrava <tcanabrava@kde.org>SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL*/import QtQuickimport QtQuick.Layoutsimport QtQuick.Controls as QQC2import org.kde.kcmutils as KCMUtilsimport org.kde.kirigami as KirigamiKirigami.Form {Kirigami.FormGroup {Kirigami.FormEntry {title: i18nc("@option:check", "Sticky keys:")contentItem: QQC2.CheckBox {Layout.fillWidth: truetext: i18nc("@option:check Enable sticky keys", "Enable")KCMUtils.SettingStateBinding {configObject: kcm.keyboardSettingssettingName: "StickyKeys"}checked: kcm.keyboardSettings.stickyKeysonToggled: kcm.keyboardSettings.stickyKeys = checked}trailingItems: [Kirigami.ContextualHelpButton {toolTipText: i18nc("@info:tooltip", "Modifier keys like Ctrl, Shift, Alt, and the Meta/Super/Windows key act as though they βstick in placeβ and no longer need to be held down when typing a keyboard shortcut.")}]}Kirigami.FormEntry {contentItem: QQC2.CheckBox {Layout.fillWidth: truetext: i18nc("@option:check", "Lock sticky keys")KCMUtils.SettingStateBinding {configObject: kcm.keyboardSettingssettingName: "StickyKeysLatch"extraEnabledConditions: kcm.keyboardSettings.stickyKeys}checked: kcm.keyboardSettings.stickyKeysLatchonToggled: kcm.keyboardSettings.stickyKeysLatch = checked}trailingItems: [Kirigami.ContextualHelpButton {toolTipText: i18nc("@info:tooltip", "Pressing a modifier key twice will keep it in active state until pressed again.")}]}Kirigami.FormEntry {contentItem: QQC2.CheckBox {id: stickyKeysAutoOffLayout.fillWidth: truetext: i18nc("@option:check", "Disable when two keys are held down")KCMUtils.SettingStateBinding {configObject: kcm.keyboardSettingssettingName: "StickyKeysAutoOff"extraEnabledConditions: kcm.keyboardSettings.stickyKeys}checked: kcm.keyboardSettings.stickyKeysAutoOffonToggled: kcm.keyboardSettings.stickyKeysAutoOff = checked}}Kirigami.FormEntry {contentItem: QQC2.CheckBox {Layout.fillWidth: truetext: i18nc("@option:check", "Ring system bell when modifier keys are used")KCMUtils.SettingStateBinding {configObject: kcm.keyboardSettingssettingName: "StickyKeysBeep"extraEnabledConditions: kcm.keyboardSettings.stickyKeys}checked: kcm.keyboardSettings.stickyKeysBeeponToggled: kcm.keyboardSettings.stickyKeysBeep = checked}}Kirigami.FormSeparator {}Kirigami.FormEntry {title: i18nc("@option:check Feedback options:", "Feedback:")contentItem: QQC2.CheckBox {Layout.fillWidth: truetext: i18nc("@option:check", "Ring system bell when locking keys are used")KCMUtils.SettingStateBinding {configObject: kcm.keyboardSettingssettingName: "ToggleKeysBeep"}checked: kcm.keyboardSettings.toggleKeysBeeponToggled: kcm.keyboardSettings.toggleKeysBeep = checked}trailingItems: [Kirigami.ContextualHelpButton {toolTipText: i18nc("@info:tooltip", "The locking keys are Caps Lock, Num Lock, and Scroll Lock.")}]}Kirigami.FormEntry {contentItem: QQC2.CheckBox {text: i18nc("@option:check", "Show notification when modifier or locking keys are used")Layout.fillWidth: trueKCMUtils.SettingStateBinding {configObject: kcm.keyboardSettingssettingName: "KeyboardNotifyModifiers"}checked: kcm.keyboardSettings.keyboardNotifyModifiersonToggled: kcm.keyboardSettings.keyboardNotifyModifiers = checked}}Kirigami.FormAction {action: QQC2.Action {text: i18nc("@action:button", "Configure Notificationsβ¦")icon.name: "preferences-desktop-notification"onTriggered: kcm.configureKNotify()}}}}