diff options
author | 2024-07-24 17:50:27 +0000 | |
---|---|---|
committer | 2024-07-24 18:46:20 +0000 | |
commit | 13065beff77ba88c4b23d89b869336a58addd673 (patch) | |
tree | 8aa3807a58f9133155bbffbd491cf43ddf26c280 /libs/input/KeyLayoutMap.cpp | |
parent | 73469a129e26c6a862064eb6975c75ca8c61f6b7 (diff) |
Fix key location API, when many to one key mapping with KL flags
Test: manual
Flag: EXEMPT minor bugfix
Bug: 354333072
Change-Id: Ide657343873f7342cde14fa58fce64b9bbfd6ef9
Diffstat (limited to 'libs/input/KeyLayoutMap.cpp')
-rw-r--r-- | libs/input/KeyLayoutMap.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/input/KeyLayoutMap.cpp b/libs/input/KeyLayoutMap.cpp index 508818852e..f3241c9c32 100644 --- a/libs/input/KeyLayoutMap.cpp +++ b/libs/input/KeyLayoutMap.cpp @@ -240,8 +240,9 @@ const KeyLayoutMap::Key* KeyLayoutMap::getKey(int32_t scanCode, int32_t usageCod std::vector<int32_t> KeyLayoutMap::findScanCodesForKey(int32_t keyCode) const { std::vector<int32_t> scanCodes; + // b/354333072: Only consider keys without FUNCTION flag for (const auto& [scanCode, key] : mKeysByScanCode) { - if (keyCode == key.keyCode) { + if (keyCode == key.keyCode && !(key.flags & POLICY_FLAG_FUNCTION)) { scanCodes.push_back(scanCode); } } |