diff --git a/app/src/main/assets/layouts/main/hcesar.json b/app/src/main/assets/layouts/main/hcesar.json new file mode 100644 index 000000000..dbbb11caf --- /dev/null +++ b/app/src/main/assets/layouts/main/hcesar.json @@ -0,0 +1,66 @@ +[ + [ + { "label": "h" }, + { "label": "c" }, + { "label": "e" }, + { "label": "s" }, + { "label": "a" }, + { "label": "r" }, + { "label": "o" }, + { "label": "p" }, + { "label": "z" }, + { "$": "shift_state_selector", + "shifted": { "label": "«" }, + "default": { + "label": ",", + "popup": { + "relevant": [ + { "label": "}"}, + { "label": "0" }, + { "label": ";" }, + { "label": "!" }, + { "label": "!fixedColumnOrder!4" } + ] + } + } + } + ], + [ + { "label": "q" }, + { "label": "t" }, + { "label": "d" }, + { "label": "i" }, + { "label": "n" }, + { "label": "u" }, + { "label": "l" }, + { "label": "m" }, + { "label": "x" }, + { "$": "shift_state_selector", + "shifted": { "label": "»" }, + "default": { + "label": ".", + "popup": { + "relevant": [ + { "label": "/" }, + { "label": ":" }, + {"label": "?" }, + { "label": "!fixedColumnOrder!3" } + ] + } + } + } + ], + [ + { "label": "ç" }, + { "label": "j" }, + { "label": "b" }, + { "label": "f" }, + { "label": "v" }, + { "label": "g" }, + { "label": "k" } + ], + [ + { "label": "y" }, + { "label": "w" } + ] +] diff --git a/app/src/main/java/helium314/keyboard/keyboard/KeyboardSwitcher.java b/app/src/main/java/helium314/keyboard/keyboard/KeyboardSwitcher.java index 19e7bde5f..3fab62c84 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/KeyboardSwitcher.java +++ b/app/src/main/java/helium314/keyboard/keyboard/KeyboardSwitcher.java @@ -331,8 +331,9 @@ public boolean isImeSuppressedByHardwareKeyboard( private void setMainKeyboardFrame( @NonNull final SettingsValues settingsValues, @NonNull final KeyboardSwitchState toggleState) { - final int visibility = isImeSuppressedByHardwareKeyboard(settingsValues, toggleState) ? View.GONE - : View.VISIBLE; + final boolean suppressKeyboard = isImeSuppressedByHardwareKeyboard(settingsValues, toggleState) + || (settingsValues.mShowOnlyToolbarWithHardwareKeyboard && settingsValues.mHasHardwareKeyboard); + final int visibility = suppressKeyboard ? View.GONE : View.VISIBLE; final int stripVisibility = settingsValues.mToolbarMode == ToolbarMode.HIDDEN ? View.GONE : View.VISIBLE; mStripContainer.setVisibility(stripVisibility); PointerTracker.switchTo(mKeyboardView); diff --git a/app/src/main/java/helium314/keyboard/keyboard/TouchpadView.java b/app/src/main/java/helium314/keyboard/keyboard/TouchpadView.java index ef5a2a54d..87460447d 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/TouchpadView.java +++ b/app/src/main/java/helium314/keyboard/keyboard/TouchpadView.java @@ -9,6 +9,8 @@ import android.view.MotionEvent; import android.view.LayoutInflater; import android.view.View; +import android.os.Handler; +import android.os.Looper; import android.widget.LinearLayout; import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode; @@ -59,6 +61,29 @@ public interface TouchpadListener { private static final int SCROLL_THRESHOLD = 40; + // Edge-scroll acceleration constants (mirrors HeliBoard's TouchpadHandler) + private static final float EDGE_THRESHOLD_PERCENTAGE = 0.1f; + private static final float EDGE_ACCELERATION_FACTOR = 0.95f; + private static final int MIN_EDGE_ACCELERATION_DELAY = 20; + + // Edge-scroll state + private final Handler mEdgeScrollHandler = new Handler(Looper.getMainLooper()); + private boolean mIsEdgeScrolling = false; + private int mEdgeScrollDirection = KeyCode.UNSPECIFIED; + private long mEdgeScrollDelay = 200; + + private final Runnable mEdgeScrollRunnable = new Runnable() { + @Override + public void run() { + if (mIsEdgeScrolling && mListener != null) { + mListener.onCursorMove(mEdgeScrollDirection, mSelectionMode); + mEdgeScrollDelay = Math.max(MIN_EDGE_ACCELERATION_DELAY, + (long) (mEdgeScrollDelay * EDGE_ACCELERATION_FACTOR)); + mEdgeScrollHandler.postDelayed(this, mEdgeScrollDelay); + } + } + }; + public TouchpadView(Context context) { super(context); init(context); @@ -187,35 +212,46 @@ private void setupTouchSurface() { mScrollAccY += SCROLL_THRESHOLD; } } else if (mIsDragging && pointerCount == 1) { - float deltaX = event.getX() - mLastTouchX; - float deltaY = event.getY() - mLastTouchY; - mLastTouchX = event.getX(); - mLastTouchY = event.getY(); - - mAccX += deltaX; - mAccY += deltaY; - - int sensitivity = Settings.getValues().mTouchpadSensitivity; - // Base threshold is 110 for normal slow cursor, but 70 for fast selection - int baseThreshold = mSelectionMode ? 70 : 110; - int threshold = baseThreshold - (int) (sensitivity * 0.6f); - if (threshold < 10) threshold = 10; - - while (mAccX >= threshold) { - if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_RIGHT, mSelectionMode); - mAccX -= threshold; - } - while (mAccX <= -threshold) { - if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_LEFT, mSelectionMode); - mAccX += threshold; - } - while (mAccY >= threshold) { - if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_DOWN, mSelectionMode); - mAccY -= threshold; - } - while (mAccY <= -threshold) { - if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_UP, mSelectionMode); - mAccY += threshold; + float x = event.getX(); + float y = event.getY(); + float deltaX = x - mLastTouchX; + float deltaY = y - mLastTouchY; + mLastTouchX = x; + mLastTouchY = y; + + // Edge-scroll acceleration: when pref enabled and touch is near an edge, + // start a repeating accelerating cursor-move instead of normal tracking. + if (Settings.getValues().mTouchpadEdgeScroll && handleEdgeScrolling(x, y)) { + mAccX = 0; + mAccY = 0; + } else { + stopEdgeScrolling(); + + mAccX += deltaX; + mAccY += deltaY; + + int sensitivity = Settings.getValues().mTouchpadSensitivity; + // Base threshold is 110 for normal slow cursor, but 70 for fast selection + int baseThreshold = mSelectionMode ? 70 : 110; + int threshold = baseThreshold - (int) (sensitivity * 0.6f); + if (threshold < 10) threshold = 10; + + while (mAccX >= threshold) { + if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_RIGHT, mSelectionMode); + mAccX -= threshold; + } + while (mAccX <= -threshold) { + if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_LEFT, mSelectionMode); + mAccX += threshold; + } + while (mAccY >= threshold) { + if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_DOWN, mSelectionMode); + mAccY -= threshold; + } + while (mAccY <= -threshold) { + if (mListener != null) mListener.onCursorMove(KeyCode.ARROW_UP, mSelectionMode); + mAccY += threshold; + } } } return true; @@ -223,6 +259,7 @@ private void setupTouchSurface() { case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: mIsDragging = false; + stopEdgeScrolling(); mIsTwoFingerScroll = false; mIsTwoFingerTap = false; if (mSelectionMode) { @@ -244,4 +281,41 @@ private void setupTouchSurface() { return true; }); } + + /** Returns true and starts/continues edge scrolling if (x, y) is within the edge threshold. */ + private boolean handleEdgeScrolling(float x, float y) { + int w = mTouchpadSurface.getWidth(); + int h = mTouchpadSurface.getHeight(); + int thresholdX = (int) (w * EDGE_THRESHOLD_PERCENTAGE); + int thresholdY = (int) (h * EDGE_THRESHOLD_PERCENTAGE); + + int direction; + if (y <= thresholdY) { + direction = KeyCode.ARROW_UP; + } else if (y >= h - thresholdY) { + direction = KeyCode.ARROW_DOWN; + } else if (x <= thresholdX) { + direction = KeyCode.ARROW_LEFT; + } else if (x >= w - thresholdX) { + direction = KeyCode.ARROW_RIGHT; + } else { + return false; + } + + if (mIsEdgeScrolling && mEdgeScrollDirection == direction) { + return true; // already running in this direction + } + stopEdgeScrolling(); + mEdgeScrollDirection = direction; + mIsEdgeScrolling = true; + int sensitivity = Settings.getValues().mTouchpadSensitivity; + mEdgeScrollDelay = 300L - (long) (sensitivity * 2.5f); + mEdgeScrollHandler.post(mEdgeScrollRunnable); + return true; + } + + private void stopEdgeScrolling() { + mIsEdgeScrolling = false; + mEdgeScrollHandler.removeCallbacks(mEdgeScrollRunnable); + } } diff --git a/app/src/main/java/helium314/keyboard/latin/LatinIME.java b/app/src/main/java/helium314/keyboard/latin/LatinIME.java index cec4c8537..a670093a7 100644 --- a/app/src/main/java/helium314/keyboard/latin/LatinIME.java +++ b/app/src/main/java/helium314/keyboard/latin/LatinIME.java @@ -1799,6 +1799,11 @@ public void removeExternalSuggestions() { mHandler.postResumeSuggestions(false); } + @Override + public void onSwipeDownOnToolbar() { + requestHideSelf(0); + } + private void loadKeyboard() { // Since we are switching languages, the most urgent thing is to let the // keyboard graphics diff --git a/app/src/main/java/helium314/keyboard/latin/settings/Defaults.kt b/app/src/main/java/helium314/keyboard/latin/settings/Defaults.kt index ea0459f9a..280eade97 100644 --- a/app/src/main/java/helium314/keyboard/latin/settings/Defaults.kt +++ b/app/src/main/java/helium314/keyboard/latin/settings/Defaults.kt @@ -180,6 +180,7 @@ object Defaults { const val PREF_SPACE_TO_CHANGE_LANG = true const val PREF_LANGUAGE_SWIPE_DISTANCE = 5 const val PREF_TOUCHPAD_SENSITIVITY = 50 + const val PREF_TOUCHPAD_EDGE_SCROLL = false const val PREF_FORCE_AUTO_CAPS = false const val PREF_OFFLINE_TEMP = 0.1f // Lower for faster, more deterministic proofreading const val PREF_OFFLINE_TOP_P = 0.5f // Lower for faster token sampling @@ -214,6 +215,8 @@ object Defaults { const val PREF_AUTO_HIDE_TOOLBAR = true const val PREF_AUTO_HIDE_PINNED_KEYS = true const val PREF_REMEMBER_TOOLBAR_STATE = false + const val PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE = false + const val PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD = false const val PREF_TOOLBAR_EXPANDED = false val PREF_CLIPBOARD_TOOLBAR_KEYS = defaultClipboardToolbarPref const val PREF_ABC_AFTER_EMOJI = false diff --git a/app/src/main/java/helium314/keyboard/latin/settings/Settings.java b/app/src/main/java/helium314/keyboard/latin/settings/Settings.java index 57a785c9b..664ea8194 100644 --- a/app/src/main/java/helium314/keyboard/latin/settings/Settings.java +++ b/app/src/main/java/helium314/keyboard/latin/settings/Settings.java @@ -209,6 +209,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public static final String PREF_SPACE_TO_CHANGE_LANG = "prefs_long_press_keyboard_to_change_lang"; public static final String PREF_LANGUAGE_SWIPE_DISTANCE = "language_swipe_distance"; public static final String PREF_TOUCHPAD_SENSITIVITY = "touchpad_sensitivity"; + public static final String PREF_TOUCHPAD_EDGE_SCROLL = "touchpad_edge_scroll"; public static final String PREF_PERSIST_FLOATING_KEYBOARD = "persist_floating_keyboard"; public static final String PREF_FORCE_AUTO_CAPS = "force_auto_caps"; public static final String PREF_OFFLINE_TEMP = "offline_temp"; @@ -257,6 +258,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public static final String PREF_TOOLBAR_MODE = "toolbar_mode"; public static final String PREF_TOOLBAR_HIDING_GLOBAL = "toolbar_hiding_global"; public static final String PREF_SPLIT_TOOLBAR = "split_toolbar"; + public static final String PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE = "toolbar_swipe_down_to_hide"; + public static final String PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD = "only_toolbar_with_hw_keyboard"; // Emoji public static final String PREF_EMOJI_MAX_SDK = "emoji_max_sdk"; diff --git a/app/src/main/java/helium314/keyboard/latin/settings/SettingsValues.java b/app/src/main/java/helium314/keyboard/latin/settings/SettingsValues.java index cdb694c7f..72a9c257c 100644 --- a/app/src/main/java/helium314/keyboard/latin/settings/SettingsValues.java +++ b/app/src/main/java/helium314/keyboard/latin/settings/SettingsValues.java @@ -82,6 +82,7 @@ public class SettingsValues { public final int mSpaceSwipeVertical; public final int mLanguageSwipeDistance; public final int mTouchpadSensitivity; + public final boolean mTouchpadEdgeScroll; public final boolean mForceAutoCaps; public final boolean mDeleteSwipeEnabled; public final boolean mShortcutRowsEnabled; @@ -171,6 +172,8 @@ public class SettingsValues { public final boolean mAutoHideToolbar; public final boolean mAutoHidePinnedKeys; public final boolean mRememberToolbarState; + public final boolean mToolbarSwipeDownToHide; + public final boolean mShowOnlyToolbarWithHardwareKeyboard; public final boolean mAlphaAfterEmojiInEmojiView; public final boolean mAlphaAfterClipHistoryEntry; public final boolean mAlphaAfterSymbolAndSpace; @@ -426,6 +429,8 @@ public SettingsValues(final Context context, final SharedPreferences prefs, fina Defaults.PREF_LANGUAGE_SWIPE_DISTANCE); mTouchpadSensitivity = prefs.getInt(Settings.PREF_TOUCHPAD_SENSITIVITY, Defaults.PREF_TOUCHPAD_SENSITIVITY); + mTouchpadEdgeScroll = prefs.getBoolean(Settings.PREF_TOUCHPAD_EDGE_SCROLL, + Defaults.PREF_TOUCHPAD_EDGE_SCROLL); mForceAutoCaps = prefs.getBoolean(Settings.PREF_FORCE_AUTO_CAPS, Defaults.PREF_FORCE_AUTO_CAPS); mDeleteSwipeEnabled = prefs.getBoolean(Settings.PREF_DELETE_SWIPE, Defaults.PREF_DELETE_SWIPE); mShortcutRowsEnabled = prefs.getBoolean(Settings.PREF_SHORTCUT_ROWS, Defaults.PREF_SHORTCUT_ROWS); @@ -505,6 +510,11 @@ public SettingsValues(final Context context, final SharedPreferences prefs, fina && prefs.getBoolean(Settings.PREF_AUTO_HIDE_PINNED_KEYS, Defaults.PREF_AUTO_HIDE_PINNED_KEYS); mRememberToolbarState = prefs.getBoolean(Settings.PREF_REMEMBER_TOOLBAR_STATE, Defaults.PREF_REMEMBER_TOOLBAR_STATE); + mToolbarSwipeDownToHide = prefs.getBoolean(Settings.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE, + Defaults.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE); + mShowOnlyToolbarWithHardwareKeyboard = prefs.getBoolean( + Settings.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD, + Defaults.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD); // Migration: clear any old saved value and reset to default if (!prefs.contains(Settings.PREF_AUTO_HIDE_PINNED_KEYS)) { prefs.edit().putBoolean(Settings.PREF_AUTO_HIDE_PINNED_KEYS, Defaults.PREF_AUTO_HIDE_PINNED_KEYS).apply(); diff --git a/app/src/main/java/helium314/keyboard/latin/suggestions/SuggestionStripView.kt b/app/src/main/java/helium314/keyboard/latin/suggestions/SuggestionStripView.kt index 6a20dd4ca..95e9ea8fd 100644 --- a/app/src/main/java/helium314/keyboard/latin/suggestions/SuggestionStripView.kt +++ b/app/src/main/java/helium314/keyboard/latin/suggestions/SuggestionStripView.kt @@ -66,6 +66,7 @@ import helium314.keyboard.latin.utils.setToolbarButtonsActivatedState import helium314.keyboard.latin.utils.setToolbarButtonsActivatedStateOnPrefChange import helium314.keyboard.settings.SettingsWithoutKey import java.util.concurrent.atomic.AtomicBoolean +import kotlin.math.abs import kotlin.math.min @SuppressLint("InflateParams") @@ -82,6 +83,7 @@ class SuggestionStripView(context: Context, attrs: AttributeSet?, defStyle: Int) fun removeExternalSuggestions() fun addToDictionary(word: String) fun blockWord(word: String) + fun onSwipeDownOnToolbar() } private val moreSuggestionsContainer: View @@ -293,6 +295,11 @@ class SuggestionStripView(context: Context, attrs: AttributeSet?, defStyle: Int) override fun onScroll(down: MotionEvent?, me: MotionEvent, deltaX: Float, deltaY: Float): Boolean { if (down == null) return false val dy = me.y - down.y + val dx = me.x - down.x + if (Settings.getValues().mToolbarSwipeDownToHide && dy > 50.dpToPx(resources) && abs(dy) > abs(dx)) { + listener.onSwipeDownOnToolbar() + return true + } return if (toolbarContainer.visibility != VISIBLE && deltaY > 0 && dy < (-10).dpToPx(resources)) showMoreSuggestions() else false } diff --git a/app/src/main/java/helium314/keyboard/settings/screens/GestureTypingScreen.kt b/app/src/main/java/helium314/keyboard/settings/screens/GestureTypingScreen.kt index 489b036a4..bb9d310e0 100644 --- a/app/src/main/java/helium314/keyboard/settings/screens/GestureTypingScreen.kt +++ b/app/src/main/java/helium314/keyboard/settings/screens/GestureTypingScreen.kt @@ -72,6 +72,7 @@ fun GestureTypingScreen( add(Settings.PREF_SPACE_HORIZONTAL_SWIPE) add(Settings.PREF_SPACE_VERTICAL_SWIPE) add(Settings.PREF_TOUCHPAD_SENSITIVITY) + add(Settings.PREF_TOUCHPAD_EDGE_SCROLL) add(Settings.PREF_DELETE_SWIPE) add(Settings.PREF_SHORTCUT_ROWS) if (prefs.getBoolean(Settings.PREF_SHORTCUT_ROWS, Defaults.PREF_SHORTCUT_ROWS)) { @@ -169,6 +170,9 @@ fun createGestureTypingSettings(context: Context) = listOf( description = { value -> value.toInt().toString() } ) }, + Setting(context, Settings.PREF_TOUCHPAD_EDGE_SCROLL, R.string.touchpad_edge_scroll, R.string.touchpad_edge_scroll_summary) { + SwitchPreference(it, Defaults.PREF_TOUCHPAD_EDGE_SCROLL) + }, Setting(context, Settings.PREF_DELETE_SWIPE, R.string.delete_swipe, R.string.delete_swipe_summary) { SwitchPreference(it, Defaults.PREF_DELETE_SWIPE) }, diff --git a/app/src/main/java/helium314/keyboard/settings/screens/ToolbarScreen.kt b/app/src/main/java/helium314/keyboard/settings/screens/ToolbarScreen.kt index e86fe7958..0b6d128d8 100644 --- a/app/src/main/java/helium314/keyboard/settings/screens/ToolbarScreen.kt +++ b/app/src/main/java/helium314/keyboard/settings/screens/ToolbarScreen.kt @@ -79,6 +79,8 @@ fun ToolbarScreen( if (toolbarMode == ToolbarMode.EXPANDABLE && !isSplitToolbar) Settings.PREF_AUTO_HIDE_PINNED_KEYS else null, if (toolbarMode == ToolbarMode.EXPANDABLE) Settings.PREF_REMEMBER_TOOLBAR_STATE else null, if (toolbarMode != ToolbarMode.HIDDEN) Settings.PREF_VARIABLE_TOOLBAR_DIRECTION else null, + if (toolbarMode != ToolbarMode.HIDDEN) Settings.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE else null, + if (toolbarMode != ToolbarMode.HIDDEN) Settings.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD else null, ) SearchSettingsScreen( onClickBack = onClickBack, @@ -188,7 +190,17 @@ fun createToolbarSettings(context: Context): List { } KeyboardSwitcher.getInstance().setThemeNeedsReload() } - } + }, + Setting(context, Settings.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE, + R.string.toolbar_swipe_down_to_hide, R.string.toolbar_swipe_down_to_hide_summary) + { + SwitchPreference(it, Defaults.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE) + }, + Setting(context, Settings.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD, + R.string.toolbar_only_with_hw_keyboard, R.string.toolbar_only_with_hw_keyboard_summary) + { + SwitchPreference(it, Defaults.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD) + }, ) } diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml index dfd355053..9c49dbffc 100644 --- a/app/src/main/res/values/donottranslate.xml +++ b/app/src/main/res/values/donottranslate.xml @@ -38,6 +38,7 @@ workman bepo pcqwerty + hcesar @@ -51,6 +52,7 @@ Workman Bépo PC + HCÉSAR diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index af45c4520..7568f00af 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1301,6 +1301,8 @@ New dictionary: Touchpad mode Touchpad sensitivity + Touchpad edge scrolling + Accelerate cursor movement when holding near the edge of the touchpad Force auto-capitalize Force auto-capitalization Force sentence capitalization on all text fields except passwords @@ -1335,6 +1337,10 @@ New dictionary: Hide pinned keys when the toolbar is expanded Remember toolbar state Keep the toolbar expanded or collapsed between sessions and while typing + Swipe down to hide + Swipe down on the toolbar to hide the keyboard + Only show toolbar with hardware keyboard + When a physical keyboard is connected, show only the toolbar instead of the full on-screen keyboard Close language selector diff --git a/app/src/test/java/helium314/keyboard/settings/SettingsContainerTest.kt b/app/src/test/java/helium314/keyboard/settings/SettingsContainerTest.kt index afc560f28..a51cfb673 100644 --- a/app/src/test/java/helium314/keyboard/settings/SettingsContainerTest.kt +++ b/app/src/test/java/helium314/keyboard/settings/SettingsContainerTest.kt @@ -80,4 +80,22 @@ class SettingsContainerTest { val context = ApplicationProvider.getApplicationContext() assertEquals("Delete last fragment", context.getString(R.string.two_thumb_backspace_fragment)) } + + @Test + fun touchpadEdgeScrollSettingIsRegistered() { + assertEquals(Settings.PREF_TOUCHPAD_EDGE_SCROLL, + container[Settings.PREF_TOUCHPAD_EDGE_SCROLL]?.key) + } + + @Test + fun toolbarSwipeDownToHideSettingIsRegistered() { + assertEquals(Settings.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE, + container[Settings.PREF_TOOLBAR_SWIPE_DOWN_TO_HIDE]?.key) + } + + @Test + fun onlyToolbarWithHardwareKeyboardSettingIsRegistered() { + assertEquals(Settings.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD, + container[Settings.PREF_SHOW_ONLY_TOOLBAR_WITH_HARDWARE_KEYBOARD]?.key) + } }