/foundation/barrierfree/accessibility/services/aams/test/mock/src/ |
H A D | mock_accessibility_short_key.cpp | 34 void AccessibilityShortKey::SubscribeShortKey(std::set<int32_t> preKeys, int32_t finalKey, int32_t holdTime) in SubscribeShortKey() argument 37 (void)preKeys; in SubscribeShortKey()
|
/foundation/barrierfree/accessibility/services/test/moduletest/mock/src/ |
H A D | mock_mt_accessibility_short_key.cpp | 34 void MockAccessibilityShortKey::SubscribeShortKey(std::set<int32_t> preKeys, int32_t finalKey, int32_t holdTime) in SubscribeShortKey() argument 37 (void)preKeys; in SubscribeShortKey()
|
/foundation/multimodalinput/input/service/subscriber/src/ |
H A D | key_shortcut_manager.cpp | 73 return (preKeys < other.preKeys); in operator <() 81 return (preKeys < other.preKeys); in operator <() 106 .preKeys = key.modifiers, in RegisterSystemKey() 249 cJSON *jsonPreKeys = cJSON_GetObjectItem(jsonSysKey, "preKeys"); in ReadSystemKey() 254 std::set<int32_t> preKeys; in ReadSystemKey() local 263 preKeys.insert(static_cast<int32_t>(cJSON_GetNumberValue(jsonPreKey))); in ReadSystemKey() 271 return AddSystemKey(preKeys, finalKey); in ReadSystemKey() 274 int32_t KeyShortcutManager::AddSystemKey(const std::set<int32_t> &preKeys, int32_ argument 831 auto preKeys = shortcut.GetPreKeys(); MarkShortcutConsumed() local 950 std::set<int32_t> preKeys; ReadHotkey() local 970 AddHotkey(const std::set<int32_t> &preKeys, int32_t finalKey) AddHotkey() argument [all...] |
H A D | key_subscriber_handler.cpp | 649 bool KeySubscriberHandler::IsPreKeysMatch(const std::set<int32_t> &preKeys, in IsPreKeysMatch() argument 652 if (preKeys.size() == 0) { in IsPreKeysMatch() 656 if (preKeys.size() != pressedKeys.size()) { in IsPreKeysMatch() 661 auto it = std::find(preKeys.begin(), preKeys.end(), pressedKey); in IsPreKeysMatch() 662 if (it == preKeys.end()) { in IsPreKeysMatch() 670 bool KeySubscriberHandler::IsEqualPreKeys(const std::set<int32_t> &preKeys, const std::set<int32_t> &pressedKeys) in IsEqualPreKeys() argument 672 if (preKeys.size() != pressedKeys.size()) { in IsEqualPreKeys() 678 auto it = std::find(preKeys.begin(), preKeys in IsEqualPreKeys() 1233 std::set<int32_t> preKeys = keyOption->GetPreKeys(); DumpSubscriber() local [all...] |
/foundation/barrierfree/accessibility/services/aams/src/ |
H A D | accessibility_short_key.cpp | 37 void AccessibilityShortKey::SubscribeShortKey(std::set<int32_t> preKeys, int32_t finalKey, int32_t holdTime) in SubscribeShortKey() argument 40 keyOption->SetPreKeys(preKeys); in SubscribeShortKey()
|
/foundation/multimodalinput/input/frameworks/proxy/event_handler/src/ |
H A D | key_event_input_subscribe_manager.cpp | 113 std::set<int32_t> preKeys = keyOption->GetPreKeys(); in SubscribeKeyEvent() local 114 if (preKeys.size() > PRE_KEYS_NUM) { in SubscribeKeyEvent() 142 for (const auto &preKey : preKeys) { in SubscribeKeyEvent() 185 std::set<int32_t> preKeys = keyOption->GetPreKeys(); in SubscribeHotkey() local 186 if (preKeys.size() > PRE_KEYS_NUM) { in SubscribeHotkey() 214 for (const auto &preKey : preKeys) { in SubscribeHotkey()
|
/foundation/multimodalinput/input/service/subscriber/include/ |
H A D | key_shortcut_manager.h | 104 std::set<int32_t> preKeys; member 122 std::set<int32_t> preKeys; member 131 int32_t AddSystemKey(const std::set<int32_t> &preKeys, int32_t finalKey); 163 int32_t AddHotkey(const std::set<int32_t> &preKeys, int32_t finalKey);
|
H A D | key_subscriber_handler.h | 85 bool IsPreKeysMatch(const std::set<int32_t> &preKeys, const std::vector<int32_t> &pressedKeys) const; 103 bool IsEqualPreKeys(const std::set<int32_t> &preKeys, const std::set<int32_t> &pressedKeys);
|
/foundation/multimodalinput/input/frameworks/proxy/events/src/ |
H A D | key_option.cpp | 34 void KeyOption::SetPreKeys(const std::set<int32_t> &preKeys) in SetPreKeys() argument 36 preKeys_ = preKeys; in SetPreKeys() 96 MMI_HILOGE("The preKeys size:%{public}d, exceeds maximum allowed size:%{public}d", preKeysSize, in ReadFromParcel() 117 MMI_HILOGE("The preKeys size:%{public}zu, exceeds maximum allowed size:%{public}d", preKeys_.size(), in WriteToParcel()
|
/foundation/multimodalinput/input/frameworks/napi/input_consumer/src/ |
H A D | js_register_module.cpp | 96 CHKRP(napi_get_named_property(env, argv[1], "preKeys", &receiveValue), GET_NAMED_PROPERTY); in GetHotkeyEventInfo() 101 std::set<int32_t> preKeys; in GetHotkeyEventInfo() local 102 if (GetPreKeys(env, receiveValue, preKeys) == nullptr) { in GetHotkeyEventInfo() 103 MMI_HILOGE("Get preKeys failed"); in GetHotkeyEventInfo() 106 if (preKeys.size() > INPUT_PARAMETER_MIDDLE) { in GetHotkeyEventInfo() 111 MMI_HILOGD("PreKeys size:%{public}zu", preKeys.size()); in GetHotkeyEventInfo() 112 keyOption->SetPreKeys(preKeys); in GetHotkeyEventInfo() 114 for (const auto &item : preKeys) { in GetHotkeyEventInfo() 182 CHKRP(napi_get_named_property(env, argv[1], "preKeys", &receiveValue), GET_NAMED_PROPERTY); in GetEventInfoAPI9() 184 THROWERR_CUSTOM(env, COMMON_PARAMETER_ERROR, "preKeys no in GetEventInfoAPI9() 187 std::set<int32_t> preKeys; GetEventInfoAPI9() local [all...] |
H A D | js_register_util.cpp | 123 THROWERR_CUSTOM(env, COMMON_PARAMETER_ERROR, "element of preKeys must be number"); in GetPreKeys() 130 THROWERR_CUSTOM(env, COMMON_PARAMETER_ERROR, "element of preKeys must be greater than or equal to 0"); in GetPreKeys() 261 std::set <int32_t> preKeys = keyOption->GetPreKeys(); in AsyncWorkFn() local 264 for (const auto &preKey: preKeys) { in AsyncWorkFn() 269 std::string preKeysStr = "preKeys"; in AsyncWorkFn() 353 std::set<int32_t> preKeys = keyOption->GetPreKeys(); in ConvertHotkeyToNapiValue() local 354 for (auto key : preKeys) { in ConvertHotkeyToNapiValue() 359 CHKRP(napi_set_named_property(env, obj, "preKeys", preKeysArray), SET_NAMED_PROPERTY); in ConvertHotkeyToNapiValue()
|
/foundation/barrierfree/accessibility/services/aams/include/ |
H A D | accessibility_short_key.h | 33 void SubscribeShortKey(std::set<int32_t> preKeys, int32_t finalKey, int32_t holdTime);
|
/foundation/multimodalinput/input/interfaces/native/innerkits/event/include/ |
H A D | key_option.h | 41 * @param preKeys Indicates the previous keys to set. 45 void SetPreKeys(const std::set<int32_t>& preKeys);
|
/foundation/multimodalinput/input/service/subscriber/test/ |
H A D | key_subscriber_handler_test.cpp | 412 * @tc.desc: Test is preKeys match 420 std::set<int32_t> preKeys; in HWTEST_F() local 422 ASSERT_TRUE(handler.IsPreKeysMatch(preKeys, pressedKeys)); in HWTEST_F() 423 preKeys = {1, 2, 3}; in HWTEST_F() 424 ASSERT_TRUE(handler.IsPreKeysMatch(preKeys, pressedKeys)); in HWTEST_F() 426 ASSERT_FALSE(handler.IsPreKeysMatch(preKeys, pressedKeys)); in HWTEST_F() 428 preKeys = {1, 2, 3, 4}; in HWTEST_F() 429 ASSERT_FALSE(handler.IsPreKeysMatch(preKeys, pressedKeys)); in HWTEST_F() 434 * @tc.desc: Test is equal preKeys 442 std::set<int32_t> preKeys in HWTEST_F() local 1126 std::set<int32_t> preKeys; HWTEST_F() local 1152 std::set<int32_t> preKeys; HWTEST_F() local 1403 std::set<int32_t> preKeys; HWTEST_F() local 1847 std::set<int32_t> preKeys; HWTEST_F() local 2515 std::set<int32_t> preKeys = { 2017, 2018, 2019, 2072, 2046 }; HWTEST_F() local 2730 std::set<int32_t> preKeys = { 2020, 2021 }; HWTEST_F() local [all...] |
/foundation/multimodalinput/input/frameworks/native/input/ |
H A D | oh_input_manager.cpp | 84 std::set<int32_t> preKeys {}; 1755 hotkey[i]->preKeys = keyOptions[i]->GetPreKeys(); in OH_Input_GetAllSystemHotkeys() 1781 void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size) in OH_Input_SetPreKeys() argument 1785 CHKPV(preKeys); in OH_Input_SetPreKeys() 1792 hotkey->preKeys.insert(preKeys[i]); in OH_Input_SetPreKeys() 1797 Input_Result OH_Input_GetPreKeys(const Input_Hotkey *hotkey, int32_t **preKeys, int32_t *preKeyCount) in OH_Input_GetPreKeys() argument 1801 CHKPR(preKeys, INPUT_PARAMETER_ERROR); in OH_Input_GetPreKeys() 1802 CHKPR(*preKeys, INPUT_PARAMETER_ERROR); in OH_Input_GetPreKeys() 1804 std::set<int32_t> preKey = hotkey->preKeys; in OH_Input_GetPreKeys() 1850 GetHotkeyName(std::set<int32_t> preKeys, int32_t finalKey, bool isRepeat, std::shared_ptr<OHOS::MMI::KeyOption> keyOption) GetHotkeyName() argument 1887 std::set<int32_t> preKeys = hotkey->preKeys; MakeHotkeyInfo() local [all...] |
/foundation/multimodalinput/input/frameworks/proxy/events/test/ |
H A D | key_event_test.cpp | 481 std::set<int32_t> preKeys; 483 keyOption->SetPreKeys(preKeys); 487 preKeys.insert(0); 488 preKeys.insert(1); 489 keyOption->SetPreKeys(preKeys);
|
H A D | input_manager_test.cpp | 341 std::set<int32_t> preKeys; in HWTEST_F() local 343 InputManagerUtil::InitOption(preKeys, KeyEvent::KEYCODE_VOLUME_MUTE, true, 0); in HWTEST_F() 363 std::set<int32_t> preKeys; in HWTEST_F() local 365 InputManagerUtil::InitOption(preKeys, KeyEvent::KEYCODE_POWER, true, FINAL_KEY_DOWN_DURATION_TWO); in HWTEST_F() 378 std::shared_ptr<KeyOption> keyOption2 = InputManagerUtil::InitOption(preKeys, KeyEvent::KEYCODE_POWER, false, 0); in HWTEST_F() 406 std::set<int32_t> preKeys; in HWTEST_F() local 408 InputManagerUtil::InitOption(preKeys, KeyEvent::KEYCODE_VOLUME_UP, true, FINAL_KEY_DOWN_DURATION_ONE); in HWTEST_F() 415 InputManagerUtil::InitOption(preKeys, KeyEvent::KEYCODE_VOLUME_UP, false, 0); in HWTEST_F() 421 std::shared_ptr<KeyOption> keyOption3 = InputManagerUtil::InitOption(preKeys, KeyEvent::KEYCODE_VOLUME_UP, true, 0); in HWTEST_F() 428 InputManagerUtil::InitOption(preKeys, KeyEven in HWTEST_F() 453 std::set<int32_t> preKeys; HWTEST_F() local 3408 std::set<int32_t> preKeys; HWTEST_F() local [all...] |
H A D | input_manager_inject_test.cpp | 604 std::set<int32_t> preKeys; in HWTEST_F() local 606 keyOption->SetPreKeys(preKeys); in HWTEST_F() 642 std::set<int32_t> preKeys; in HWTEST_F() local 644 keyOption->SetPreKeys(preKeys); in HWTEST_F()
|
/foundation/multimodalinput/input/service/key_command/src/ |
H A D | key_command_handler_util.cpp | 74 if (!shortcutKey.preKeys.emplace(preKeyJson->valueint).second) { in GetPreKeys() 251 MMI_HILOGE("Get preKeys failed"); in ConvertToShortcutKey() 558 std::set<int32_t> preKeys = key.preKeys; in GenerateKey() local 560 for (const auto& preKey : preKeys) { in GenerateKey() 574 .modifiers = shortcutKey.preKeys, in RegisterSystemKey()
|
H A D | key_command_handler.cpp | 1050 for (const auto &prekey : shortcutKey.preKeys) { in Print() 1981 if ((shortcutKey.preKeys.size() + 1) != key->GetKeyItems().size()) { in IsKeyMatch() 1989 if (shortcutKey.preKeys.find(keyCode) == shortcutKey.preKeys.end()) { in IsKeyMatch() 2187 for (const auto &prekey: preKeys) { in Print() 2353 for (const auto &prekey : shortcutKey.preKeys) { in Dump()
|
/foundation/multimodalinput/input/service/key_command/include/ |
H A D | key_command_handler.h | 75 std::set<int32_t> preKeys; member 262 lastMatchedKey_.preKeys.clear(); in ResetLastMatchedKey() 269 currentLaunchAbilityKey_.preKeys.clear(); in ResetCurrentLaunchAbilityKey()
|
/foundation/multimodalinput/input/frameworks/proxy/events/include/ |
H A D | input_manager_util.h | 35 const std::set<int32_t> &preKeys, int32_t finalKey, bool isFinalKeyDown, int32_t duration);
|
/foundation/multimodalinput/input/interfaces/kits/c/input/ |
H A D | oh_input_manager.h | 1301 * @param preKeys List of modifier keys. 1306 void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size); 1312 * @param preKeys List of modifier keys. 1321 Input_Result OH_Input_GetPreKeys(const Input_Hotkey *hotkey, int32_t **preKeys, int32_t *preKeyCount);
|
/foundation/multimodalinput/input/service/key_command/test/ |
H A D | key_command_handler_test.cpp | 807 key1.preKeys = {1, 2, 3}; in HWTEST_F() 960 key.preKeys = {2, 3, 4}; in HWTEST_F() 1245 shortcutKey.preKeys = {2076, 2077}; 2613 shortcutKey.preKeys.insert(2072); 2634 shortcutKey.preKeys.insert(2072); 2781 shortcutKey.preKeys.insert(2072); 2789 shortcutKey.preKeys.insert(2047); 3404 key.preKeys = {1, 2, 3}; 3443 key.preKeys = {1, 2, 3}; 3479 key.preKeys [all...] |
/foundation/multimodalinput/input/service/subscriber/test/src/ |
H A D | key_shortcut_manager_test.cpp | 996 shortcut.preKeys = {1, 2, 3}; in HWTEST_F() 1022 std::set<int32_t> preKeys = {1, 2, 3, 4, 5}; in HWTEST_F() local 1023 shortcut.SetPreKeys(preKeys); in HWTEST_F()
|