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
009488ea
Commit
009488ea
authored
11 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Haptick and audio feedback on key repeat
Bug: 6522943 Change-Id: I181f7e8722bf1b3042d7f384ae8ebf87f29458a9
parent
d9a87eb8
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/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+3
-1
3 additions, 1 deletion
...rc/com/android/inputmethod/keyboard/MainKeyboardView.java
java/src/com/android/inputmethod/keyboard/PointerTracker.java
+4
-6
4 additions, 6 deletions
.../src/com/android/inputmethod/keyboard/PointerTracker.java
with
7 additions
and
7 deletions
java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+
3
−
1
View file @
009488ea
...
@@ -240,7 +240,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
...
@@ -240,7 +240,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
case
MSG_REPEAT_KEY:
case
MSG_REPEAT_KEY:
final
Key
currentKey
=
tracker
.
getKey
();
final
Key
currentKey
=
tracker
.
getKey
();
if
(
currentKey
!=
null
&&
currentKey
.
mCode
==
msg
.
arg1
)
{
if
(
currentKey
!=
null
&&
currentKey
.
mCode
==
msg
.
arg1
)
{
tracker
.
onRegisterKey
(
currentKey
);
tracker
.
onRepeatKey
(
currentKey
);
AudioAndHapticFeedbackManager
.
getInstance
().
hapticAndAudioFeedback
(
currentKey
.
mCode
,
keyboardView
);
startKeyRepeatTimer
(
tracker
,
mKeyRepeatInterval
);
startKeyRepeatTimer
(
tracker
,
mKeyRepeatInterval
);
}
}
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/keyboard/PointerTracker.java
+
4
−
6
View file @
009488ea
...
@@ -1266,15 +1266,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
...
@@ -1266,15 +1266,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if
(!
key
.
isRepeatable
())
return
;
if
(!
key
.
isRepeatable
())
return
;
// Don't start key repeat when we are in sliding input mode.
// Don't start key repeat when we are in sliding input mode.
if
(
mIsInSlidingKeyInput
)
return
;
if
(
mIsInSlidingKeyInput
)
return
;
onRe
gister
Key
(
key
);
onRe
peat
Key
(
key
);
mTimerProxy
.
startKeyRepeatTimer
(
this
);
mTimerProxy
.
startKeyRepeatTimer
(
this
);
}
}
public
void
onRegisterKey
(
final
Key
key
)
{
public
void
onRepeatKey
(
final
Key
key
)
{
if
(
key
!=
null
)
{
detectAndSendKey
(
key
,
key
.
mX
,
key
.
mY
,
SystemClock
.
uptimeMillis
());
detectAndSendKey
(
key
,
key
.
mX
,
key
.
mY
,
SystemClock
.
uptimeMillis
());
mTimerProxy
.
startTypingStateTimer
(
key
);
mTimerProxy
.
startTypingStateTimer
(
key
);
}
}
}
private
boolean
isMajorEnoughMoveToBeOnNewKey
(
final
int
x
,
final
int
y
,
final
long
eventTime
,
private
boolean
isMajorEnoughMoveToBeOnNewKey
(
final
int
x
,
final
int
y
,
final
long
eventTime
,
...
...
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