diff options
author | 2013-01-18 12:19:59 +0900 | |
---|---|---|
committer | 2013-01-23 17:12:28 +0900 | |
commit | cc5e4a444524f73a112d7223d7940d41cf60d1f4 (patch) | |
tree | f8a034e1c1e246c14c0c633580119e687becf0bd /java/res | |
parent | c053293484cd872ee305703886f09c66876fbae7 (diff) | |
download | latinime-cc5e4a444524f73a112d7223d7940d41cf60d1f4.tar.gz latinime-cc5e4a444524f73a112d7223d7940d41cf60d1f4.tar.xz latinime-cc5e4a444524f73a112d7223d7940d41cf60d1f4.zip |
Configurable key long press timeout
The default long presss timeout is 300msec (previous timeout was
400ms).
Bug: 7600340
Change-Id: Ia8b64784ac03588631cfcbad30e021d74f3fd0d8
Diffstat (limited to 'java/res')
-rw-r--r-- | java/res/values/attrs.xml | 6 | ||||
-rw-r--r-- | java/res/values/config.xml | 9 | ||||
-rw-r--r-- | java/res/values/strings.xml | 2 | ||||
-rw-r--r-- | java/res/values/styles.xml | 3 | ||||
-rw-r--r-- | java/res/xml/prefs.xml | 7 |
5 files changed, 18 insertions, 9 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index c41263515..850b1b8dc 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -87,10 +87,8 @@ <attr name="keyRepeatStartTimeout" format="integer" /> <!-- Key repeat interval in millisecond. --> <attr name="keyRepeatInterval" format="integer" /> - <!-- Long press timeout of letter key in millisecond. --> - <attr name="longPressKeyTimeout" format="integer" /> - <!-- Long press timeout of shift key in millisecond. --> - <attr name="longPressShiftKeyTimeout" format="integer" /> + <!-- Long press timeout of shift key to shift lock in millisecond. --> + <attr name="longPressShiftLockTimeout" format="integer" /> <!-- Ignore special key timeout while typing in millisecond. --> <attr name="ignoreAltCodeKeyTimeout" format="integer" /> <!-- Layout resource for key press feedback.--> diff --git a/java/res/values/config.xml b/java/res/values/config.xml index 503e92322..6b3c891c7 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -64,10 +64,13 @@ <bool name="config_sliding_key_input_enabled">true</bool> <integer name="config_key_repeat_start_timeout">400</integer> <integer name="config_key_repeat_interval">50</integer> - <integer name="config_long_press_key_timeout">400</integer> + <integer name="config_default_longpress_key_timeout">300</integer> <!-- milliseconds --> + <integer name="config_longpress_timeout_step">10</integer> <!-- milliseconds --> + <integer name="config_min_longpress_timeout">100</integer> <!-- milliseconds --> + <integer name="config_max_longpress_timeout">700</integer> <!-- milliseconds --> <!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 --> - <integer name="config_long_press_shift_key_timeout">1200</integer> - <integer name="config_ignore_alt_code_key_timeout">350</integer> + <integer name="config_longpress_shift_lock_timeout">1200</integer> <!-- milliseconds --> + <integer name="config_ignore_alt_code_key_timeout">350</integer> <!-- milliseconds --> <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if false --> <bool name="config_show_more_keys_keyboard_at_touched_point">false</bool> diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index fdae3020a..e39cafc7f 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -374,6 +374,8 @@ <!-- Title of an option for usability study mode --> <string name="prefs_usability_study_mode">Usability study mode</string> + <!-- Title of the settings for key long press delay --> + <string name="prefs_key_longpress_timeout_settings">Key long press delay settings</string> <!-- Title of the settings for keypress vibration duration --> <string name="prefs_keypress_vibration_duration_settings">Keypress vibration duration settings</string> <!-- Title of the settings for keypress sound volume --> diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index c398b5924..f71963ad1 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -80,8 +80,7 @@ <item name="slidingKeyInputEnable">@bool/config_sliding_key_input_enabled</item> <item name="keyRepeatStartTimeout">@integer/config_key_repeat_start_timeout</item> <item name="keyRepeatInterval">@integer/config_key_repeat_interval</item> - <item name="longPressKeyTimeout">@integer/config_long_press_key_timeout</item> - <item name="longPressShiftKeyTimeout">@integer/config_long_press_shift_key_timeout</item> + <item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item> <item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item> <item name="keyPreviewLayout">@layout/key_preview</item> <item name="keyPreviewOffset">@dimen/key_preview_offset</item> diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index cc1b52ba6..84e7f54ab 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -146,6 +146,13 @@ android:key="pref_key_preview_popup_dismiss_delay" android:title="@string/key_preview_popup_dismiss_delay" /> <com.android.inputmethod.latin.SeekBarDialogPreference + android:key="pref_key_longpress_timeout" + android:title="@string/prefs_key_longpress_timeout_settings" + latin:valueFormatText="@string/abbreviation_unit_milliseconds" + latin:minValue="@integer/config_min_longpress_timeout" + latin:maxValue="@integer/config_max_longpress_timeout" + latin:stepValue="@integer/config_longpress_timeout_step" /> + <com.android.inputmethod.latin.SeekBarDialogPreference android:key="pref_vibration_duration_settings" android:title="@string/prefs_keypress_vibration_duration_settings" latin:valueFormatText="@string/abbreviation_unit_milliseconds" |