mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-23 07:39:11 +00:00
make long press symbols key -> numpad optional, fixes #588
This commit is contained in:
parent
58e56e5528
commit
1c075de0c8
6 changed files with 19 additions and 9 deletions
|
@ -72,9 +72,8 @@ Features that may go unnoticed, and further potentially useful information
|
|||
* Emoji View and Language Switch will disappear if you have the corresponding key enabled;
|
||||
* For some layouts it\'s not the Comma-key, but the key at the same position (e.g. it\'s `q` for Dvorak layout).
|
||||
* When incognito mode is enabled, no words will be learned, and no emojis will be added to recents.
|
||||
* Sliding key input: Swipe from shift to another key to type a single uppercase key
|
||||
* This also works for the `?123` key to type a single symbol from the symbols keyboard, and for related keys.
|
||||
* Long-press the `?123` from main view to directly open numpad.
|
||||
* Sliding key input: Swipe from shift or symbol key to another key. This will enter a single uppercase key or symbol and return to the previous keyboard.
|
||||
* Hold shift or symbol key, press one or more keys, and then release shift or symbol key to return to the previous keyboard.
|
||||
* Long-press a suggestion in the suggestion strip to show more suggestions, and a delete button to remove this suggestion.
|
||||
* Swipe up from a suggestion to open more suggestions, and release on the suggestion to select it.
|
||||
* Long-press an entry in the clipboard history to pin it (keep it in clipboard until you unpin).
|
||||
|
|
|
@ -1107,7 +1107,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element,
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (code == KeyCode.ALPHA_SYMBOL) {
|
||||
if (code == KeyCode.ALPHA_SYMBOL && Settings.getInstance().getCurrent().mLongPressSymbolsForNumpad) {
|
||||
sListener.onCodeInput(KeyCode.NUMPAD, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
public static final String PREF_GESTURE_SPACE_AWARE = "gesture_space_aware";
|
||||
public static final String PREF_SHOW_SETUP_WIZARD_ICON = "show_setup_wizard_icon";
|
||||
public static final String PREF_USE_CONTACTS = "use_contacts";
|
||||
public static final String PREFS_LONG_PRESS_SYMBOLS_FOR_NUMPAD = "long_press_symbols_for_numpad";
|
||||
|
||||
// one-handed mode gravity, enablement and scale, stored separately per orientation
|
||||
public static final String PREF_ONE_HANDED_MODE_PREFIX = "one_handed_mode_enabled_p_";
|
||||
|
|
|
@ -54,7 +54,7 @@ public class SettingsValues {
|
|||
public final Locale mLocale;
|
||||
public final boolean mHasHardwareKeyboard;
|
||||
public final int mDisplayOrientation;
|
||||
// From preferences, in the same order as xml/prefs.xml:
|
||||
// From preferences
|
||||
public final boolean mAutoCap;
|
||||
public final boolean mVibrateOn;
|
||||
public final boolean mSoundOn;
|
||||
|
@ -86,8 +86,7 @@ public class SettingsValues {
|
|||
public final List<String> mPopupKeyTypes;
|
||||
public final List<String> mPopupKeyLabelSources;
|
||||
public final List<Locale> mSecondaryLocales;
|
||||
// Use bigrams to predict the next word when there is no input for it yet
|
||||
public final boolean mBigramPredictionEnabled;
|
||||
public final boolean mBigramPredictionEnabled;// Use bigrams to predict the next word when there is no input for it yet
|
||||
public final boolean mGestureInputEnabled;
|
||||
public final boolean mGestureTrailEnabled;
|
||||
public final boolean mGestureFloatingPreviewTextEnabled;
|
||||
|
@ -119,12 +118,13 @@ public class SettingsValues {
|
|||
private final boolean mOverrideShowingSuggestions;
|
||||
public final SettingsValuesForSuggestion mSettingsValuesForSuggestion;
|
||||
public final boolean mIncognitoModeEnabled;
|
||||
public final boolean mLongPressSymbolsForNumpad;
|
||||
|
||||
// User-defined colors
|
||||
public final Colors mColors;
|
||||
|
||||
@Nullable
|
||||
public final String mAccount;
|
||||
public final String mAccount; // todo: always null, remove?
|
||||
|
||||
// creation of Colors and SpacingAndPunctuations are the slowest parts in here, but still ok
|
||||
public SettingsValues(final Context context, final SharedPreferences prefs, final Resources res,
|
||||
|
@ -232,6 +232,7 @@ public class SettingsValues {
|
|||
);
|
||||
mSpacingAndPunctuations = new SpacingAndPunctuations(res, mUrlDetectionEnabled);
|
||||
mBottomPaddingScale = prefs.getFloat(Settings.PREF_BOTTOM_PADDING_SCALE, DEFAULT_SIZE_SCALE);
|
||||
mLongPressSymbolsForNumpad = prefs.getBoolean(Settings.PREFS_LONG_PRESS_SYMBOLS_FOR_NUMPAD, false);
|
||||
}
|
||||
|
||||
public boolean isApplicationSpecifiedCompletionsOn() {
|
||||
|
|
|
@ -248,10 +248,12 @@
|
|||
<string name="show_popup_hints">Show functional hints</string>
|
||||
<!-- Description of the show_popup_hints setting -->
|
||||
<string name="show_popup_hints_summary">Show hints if long-pressing a key triggers additional functionality</string>
|
||||
<!-- Title of the settings enabling long press on space key to change IME -->
|
||||
<!-- Title of the setting enabling long press on space key to change IME -->
|
||||
<string name="prefs_long_press_keyboard_to_change_lang">Change input method with space key</string>
|
||||
<!-- Description of the settings to change IME indicating long press triggers change. -->
|
||||
<string name="prefs_long_press_keyboard_to_change_lang_summary">Long pressing space key will prompt input method selection menu</string>
|
||||
<!-- Title of the setting enabling long press on symbols key to switch to numpad -->
|
||||
<string name="prefs_long_press_symbol_for_numpad">Long press symbols key for numpad</string>
|
||||
<!-- Title of the setting for reduced distance between keys -->
|
||||
<string name="prefs_narrow_key_gaps">Narrow key gaps</string>
|
||||
<!-- Title of the settings for setting keyboard height -->
|
||||
|
@ -269,6 +271,7 @@
|
|||
<string name="subtype_es_US">Spanish (US)</string>
|
||||
<!-- Description for Hinglish (https://en.wikipedia.org/wiki/Hinglish) keyboard subtype [CHAR LIMIT=25] -->
|
||||
<string name="subtype_hi_Latn">Hinglish</string>
|
||||
<!-- Description for Kaitag (https://en.wikipedia.org/wiki/Kaitag_language) keyboard subtype [CHAR LIMIT=25] -->
|
||||
<string name="subtype_xdq">Kaitag</string>
|
||||
<!-- Description for Serbian (Latin) keyboard subtype [CHAR LIMIT=25]
|
||||
(Latin) can be an abbreviation to fit in the CHAR LIMIT. -->
|
||||
|
|
|
@ -54,6 +54,12 @@
|
|||
android:persistent="true"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="long_press_symbols_for_numpad"
|
||||
android:title="@string/prefs_long_press_symbol_for_numpad"
|
||||
android:persistent="true"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="enable_emoji_alt_physical_key"
|
||||
android:title="@string/prefs_enable_emoji_alt_physical_key"
|
||||
|
|
Loading…
Add table
Reference in a new issue