diff options
| author | 2014-03-17 13:03:47 -0700 | |
|---|---|---|
| committer | 2014-03-17 14:13:25 -0700 | |
| commit | 39ca0522928fe134c1164a091806547e4ef1ed0b (patch) | |
| tree | a4fb98091d6893a3cf5bfcd80d6300758770d326 /libs/input/InputReader.cpp | |
| parent | 006209c2fc1b6deef10f6d52831e9cef35cca212 (diff) | |
Add idc config option for handling key repeats
Bug: 13285870
Change-Id: Iea2a5d03e29c86dcee5f99a25e48736ebc6dd913
Diffstat (limited to 'libs/input/InputReader.cpp')
| -rw-r--r-- | libs/input/InputReader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/input/InputReader.cpp b/libs/input/InputReader.cpp index 3c037fb8b668..48c5223dd415 100644 --- a/libs/input/InputReader.cpp +++ b/libs/input/InputReader.cpp @@ -2030,6 +2030,10 @@ void KeyboardInputMapper::configureParameters() { if (mParameters.orientationAware) { mParameters.hasAssociatedDisplay = true; } + + mParameters.handlesKeyRepeat = false; + getDevice()->getConfiguration().tryGetProperty(String8("keyboard.handlesKeyRepeat"), + mParameters.handlesKeyRepeat); } void KeyboardInputMapper::dumpParameters(String8& dump) { @@ -2038,6 +2042,8 @@ void KeyboardInputMapper::dumpParameters(String8& dump) { toString(mParameters.hasAssociatedDisplay)); dump.appendFormat(INDENT4 "OrientationAware: %s\n", toString(mParameters.orientationAware)); + dump.appendFormat(INDENT4 "HandlesKeyRepeat: %s\n", + toString(mParameters.handlesKeyRepeat)); } void KeyboardInputMapper::reset(nsecs_t when) { @@ -2155,6 +2161,10 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode, policyFlags |= POLICY_FLAG_WAKE_DROPPED; } + if (mParameters.handlesKeyRepeat) { + policyFlags |= POLICY_FLAG_DISABLE_KEY_REPEAT; + } + if (metaStateChanged) { getContext()->updateGlobalMetaState(); } |