Allow devices to provide advanced keyboard settings.
Unfortunatelly this can't be done with existing IA settings,
so use the RemotePreference API to allow the external app
to update the view. The action for this is:
"org.lineageos.settings.device.ADVANCED_KEYBOARD_SETTINGS"
Change-Id: I1c46d3568c4d5bfc78e1cbae033071c7641fdf29
94 lines
3.9 KiB
XML
94 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2016 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<PreferenceScreen
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
|
android:title="@string/physical_keyboard_title">
|
|
<!-- Additional preference screens are inserted here programmatically
|
|
with low order values to set the key map of each attached keyboard. -->
|
|
<PreferenceCategory
|
|
android:key="keyboard_options_category"
|
|
android:title="@string/keyboard_options_category">
|
|
<Preference
|
|
android:key="keyboard_shortcuts_helper"
|
|
android:title="@string/keyboard_shortcuts_helper"/>
|
|
|
|
<Preference
|
|
android:key="modifier_keys_settings"
|
|
android:title="@string/modifier_keys_settings"
|
|
android:summary="@string/modifier_keys_settings_summary"
|
|
android:fragment="com.android.settings.inputmethod.ModifierKeysSettings" />
|
|
|
|
<com.android.settingslib.PrimarySwitchPreference
|
|
android:key="physical_keyboard_repeat_keys"
|
|
android:title="@string/keyboard_repeat_keys_title"
|
|
android:summary="@string/keyboard_repeat_keys_summary"
|
|
android:defaultValue="false"
|
|
android:fragment="com.android.settings.inputmethod.KeyboardRepeatKeysMainFragment"
|
|
settings:controller="com.android.settings.inputmethod.KeyboardRepeatKeysController" />
|
|
|
|
<Preference
|
|
android:key="physical_keyboard_a11y"
|
|
android:title="@string/keyboard_a11y_settings"
|
|
android:summary="@string/keyboard_a11y_settings_summary"
|
|
android:fragment="com.android.settings.inputmethod.PhysicalKeyboardA11yFragment" />
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:key="keyboard_a11y_category"
|
|
android:title="@string/keyboard_a11y_category">
|
|
|
|
<SwitchPreferenceCompat
|
|
android:key="accessibility_sticky_keys"
|
|
android:title="@string/sticky_keys"
|
|
android:summary="@string/sticky_keys_summary"
|
|
android:defaultValue="false" />
|
|
|
|
<SwitchPreferenceCompat
|
|
android:key="accessibility_bounce_keys"
|
|
android:title="@string/bounce_keys"
|
|
android:defaultValue="false" />
|
|
|
|
<SwitchPreferenceCompat
|
|
android:key="accessibility_slow_keys"
|
|
android:title="@string/slow_keys"
|
|
android:defaultValue="false" />
|
|
|
|
<SwitchPreferenceCompat
|
|
android:key="accessibility_mouse_keys"
|
|
android:title="@string/mouse_keys"
|
|
android:summary="@string/mouse_keys_summary"
|
|
android:defaultValue="false" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
<!-- Device-specific keyboard settings. -->
|
|
<PreferenceCategory
|
|
android:key="keyboard_extras_category"
|
|
android:title="@string/keyboard_extras_title" >
|
|
|
|
<lineageos.preference.RemotePreference
|
|
android:key="advanced_keyboard_settings"
|
|
android:title="@string/advanced_keyboard_settings_title"
|
|
settings:requiresAction="org.lineageos.settings.device.ADVANCED_KEYBOARD_SETTINGS">
|
|
<intent
|
|
android:action="org.lineageos.settings.device.ADVANCED_KEYBOARD_SETTINGS" />
|
|
</lineageos.preference.RemotePreference>
|
|
|
|
</PreferenceCategory>
|
|
|
|
</PreferenceScreen>
|