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
3b82e816
Commit
3b82e816
authored
13 years ago
by
Svetoslav Ganov
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fixed typing uppercase letters when touch exploration is enabled."
parents
f7ef21d4
e87fd4d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java
+11
-10
11 additions, 10 deletions
...d/inputmethod/accessibility/KeyCodeDescriptionMapper.java
with
11 additions
and
10 deletions
java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java
+
11
−
10
View file @
3b82e816
...
...
@@ -136,16 +136,14 @@ public class KeyCodeDescriptionMapper {
if
(!
TextUtils
.
isEmpty
(
key
.
mLabel
))
{
final
String
label
=
key
.
mLabel
.
toString
().
trim
();
// First, attempt to map the label to a pre-defined description.
if
(
mKeyLabelMap
.
containsKey
(
label
))
{
return
context
.
getString
(
mKeyLabelMap
.
get
(
label
));
}
else
if
(
label
.
length
()
==
1
||
(
keyboard
.
isManualTemporaryUpperCase
()
&&
!
TextUtils
.
isEmpty
(
key
.
mHintLabel
)))
{
return
getDescriptionForKeyCode
(
context
,
keyboard
,
key
,
shouldObscure
);
}
else
{
return
label
;
}
}
else
if
(
key
.
mCode
!=
Keyboard
.
CODE_DUMMY
)
{
}
// Just attempt to speak the description.
if
(
key
.
mCode
!=
Keyboard
.
CODE_DUMMY
)
{
return
getDescriptionForKeyCode
(
context
,
keyboard
,
key
,
shouldObscure
);
}
...
...
@@ -187,11 +185,14 @@ public class KeyCodeDescriptionMapper {
* @return the key code for the specified key
*/
private
int
getCorrectKeyCode
(
Keyboard
keyboard
,
Key
key
)
{
if
(
keyboard
.
isManualTemporaryUpperCase
()
&&
!
TextUtils
.
isEmpty
(
key
.
mHintLabel
))
{
// If keyboard is in manual temporary upper case state and key has
// manual temporary uppercase letter as key hint letter, alternate
// character code should be sent.
if
(
keyboard
.
isManualTemporaryUpperCase
()
&&
key
.
hasUppercaseLetter
()
&&
!
TextUtils
.
isEmpty
(
key
.
mHintLabel
))
{
return
key
.
mHintLabel
.
charAt
(
0
);
}
else
{
return
key
.
mCode
;
}
return
key
.
mCode
;
}
/**
...
...
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