Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
ba037c62
Commit
ba037c62
authored
12 years ago
by
alanv
Browse files
Options
Downloads
Patches
Plain Diff
Add accessibility descriptions for additional non-character keys.
Bug: 6621009 Change-Id: I82fb2dc6af0fda795397e8be8c09a4f53b1656ab
parent
467f829b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/res/values/strings.xml
+6
-0
6 additions, 0 deletions
java/res/values/strings.xml
java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java
+5
-5
5 additions, 5 deletions
...d/inputmethod/accessibility/KeyCodeDescriptionMapper.java
with
11 additions
and
5 deletions
java/res/values/strings.xml
+
6
−
0
View file @
ba037c62
...
...
@@ -181,6 +181,12 @@
<string
name=
"spoken_description_search"
>
Search
</string>
<!-- Spoken description for the "U+2022" (BULLET) keyboard key. -->
<string
name=
"spoken_description_dot"
>
Dot
</string>
<!-- Spoken description for the "Switch language" keyboard key. -->
<string
name=
"spoken_description_language_switch"
>
Switch language
</string>
<!-- Spoken description for the "Next" action keyboard key. -->
<string
name=
"spoken_description_action_next"
>
Next
</string>
<!-- Spoken description for the "Previous" action keyboard key. -->
<string
name=
"spoken_description_action_previous"
>
Previous
</string>
<!-- Spoken feedback after turning "Shift" mode on. -->
<string
name=
"spoken_description_shiftmode_on"
>
Shift enabled
</string>
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java
+
5
−
5
View file @
ba037c62
...
...
@@ -60,10 +60,8 @@ public class KeyCodeDescriptionMapper {
// Manual label substitutions for key labels with no string resource
mKeyLabelMap
.
put
(
":-)"
,
R
.
string
.
spoken_description_smiley
);
// Symbols that most TTS engines can't speak
mKeyCodeMap
.
put
(
' '
,
R
.
string
.
spoken_description_space
);
// Special non-character codes defined in Keyboard
mKeyCodeMap
.
put
(
Keyboard
.
CODE_SPACE
,
R
.
string
.
spoken_description_space
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_DELETE
,
R
.
string
.
spoken_description_delete
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_ENTER
,
R
.
string
.
spoken_description_return
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_SETTINGS
,
R
.
string
.
spoken_description_settings
);
...
...
@@ -71,6 +69,9 @@ public class KeyCodeDescriptionMapper {
mKeyCodeMap
.
put
(
Keyboard
.
CODE_SHORTCUT
,
R
.
string
.
spoken_description_mic
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_SWITCH_ALPHA_SYMBOL
,
R
.
string
.
spoken_description_to_symbol
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_TAB
,
R
.
string
.
spoken_description_tab
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_LANGUAGE_SWITCH
,
R
.
string
.
spoken_description_language_switch
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_ACTION_NEXT
,
R
.
string
.
spoken_description_action_next
);
mKeyCodeMap
.
put
(
Keyboard
.
CODE_ACTION_PREVIOUS
,
R
.
string
.
spoken_description_action_previous
);
}
/**
...
...
@@ -274,8 +275,7 @@ public class KeyCodeDescriptionMapper {
return
context
.
getString
(
OBSCURED_KEY_RES_ID
);
}
final
int
resId
=
mKeyCodeMap
.
get
(
code
);
if
(
resId
!=
0
)
{
if
(
mKeyCodeMap
.
indexOfKey
(
code
)
>=
0
)
{
return
context
.
getString
(
mKeyCodeMap
.
get
(
code
));
}
else
if
(
isDefinedNonCtrl
)
{
return
Character
.
toString
((
char
)
code
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment