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
00ee5f76
Commit
00ee5f76
authored
10 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
[HW10] Pull the processed event in its eventual place
Change-Id: I5f7932097627766e907764a99a5e9c170f725bc0
parent
f290d407
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+9
-6
9 additions, 6 deletions
.../com/android/inputmethod/latin/inputlogic/InputLogic.java
with
9 additions
and
6 deletions
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+
9
−
6
View file @
00ee5f76
...
...
@@ -405,6 +405,7 @@ public final class InputLogic {
final
int
keyboardShiftMode
,
// TODO: remove these arguments
final
int
currentKeyboardScriptId
,
final
LatinIME
.
UIHandler
handler
)
{
final
Event
processedEvent
=
mWordComposer
.
processEvent
(
event
);
final
InputTransaction
inputTransaction
=
new
InputTransaction
(
settingsValues
,
event
,
SystemClock
.
uptimeMillis
(),
mSpaceState
,
getActualCapsMode
(
settingsValues
,
keyboardShiftMode
));
...
...
@@ -428,7 +429,6 @@ public final class InputLogic {
// A special key, like delete, shift, emoji, or the settings key.
switch
(
event
.
mKeyCode
)
{
case
Constants
.
CODE_DELETE
:
final
Event
processedEvent
=
mWordComposer
.
processEvent
(
inputTransaction
.
mEvent
);
handleBackspace
(
inputTransaction
,
currentKeyboardScriptId
,
processedEvent
);
// Backspace is a functional key, but it affects the contents of the editor.
inputTransaction
.
setDidAffectContents
();
...
...
@@ -484,7 +484,7 @@ public final class InputLogic {
inputTransaction
.
mSettingsValues
,
tmpEvent
,
inputTransaction
.
mTimestamp
,
inputTransaction
.
mSpaceState
,
inputTransaction
.
mShiftState
);
didAutoCorrect
=
handleNonSpecialCharacter
(
tmpTransaction
,
handler
);
didAutoCorrect
=
handleNonSpecialCharacter
(
tmpTransaction
,
handler
,
processedEvent
);
// Shift + Enter is treated as a functional key but it results in adding a new
// line, so that does affect the contents of the editor.
inputTransaction
.
setDidAffectContents
();
...
...
@@ -515,11 +515,13 @@ public final class InputLogic {
}
else
{
// No action label, and the action from imeOptions is NONE: this is a regular
// enter key that should input a carriage return.
didAutoCorrect
=
handleNonSpecialCharacter
(
inputTransaction
,
handler
);
didAutoCorrect
=
handleNonSpecialCharacter
(
inputTransaction
,
handler
,
processedEvent
);
}
break
;
default
:
didAutoCorrect
=
handleNonSpecialCharacter
(
inputTransaction
,
handler
);
didAutoCorrect
=
handleNonSpecialCharacter
(
inputTransaction
,
handler
,
processedEvent
);
break
;
}
}
...
...
@@ -681,8 +683,9 @@ public final class InputLogic {
*/
private
boolean
handleNonSpecialCharacter
(
final
InputTransaction
inputTransaction
,
// TODO: remove this argument
final
LatinIME
.
UIHandler
handler
)
{
final
Event
processedEvent
=
mWordComposer
.
processEvent
(
inputTransaction
.
mEvent
);
final
LatinIME
.
UIHandler
handler
,
// TODO: remove this argument, put it inside the transaction
final
Event
processedEvent
)
{
final
int
codePoint
=
processedEvent
.
mCodePoint
;
mSpaceState
=
SpaceState
.
NONE
;
final
boolean
didAutoCorrect
;
...
...
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