Home
last modified time | relevance | path

Searched refs:keyEvent (Results 1 – 18 of 18) sorted by relevance

/base/web/webview/ohos_nweb/src/
Dnweb_input_event_consumer.cpp38 bool NWebInputEventConsumer::OnInputEvent(const std::shared_ptr<MMI::KeyEvent>& keyEvent) const in OnInputEvent()
40 if (keyEvent == nullptr) { in OnInputEvent()
44 DispatchKeyEvent(keyEvent); in OnInputEvent()
45 keyEvent->MarkProcessed(); in OnInputEvent()
102 void NWebInputEventConsumer::DispatchKeyEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const in DispatchKeyEvent()
109 if (keyEvent == nullptr) { in DispatchKeyEvent()
113 int32_t keyCode = keyEvent->GetKeyCode(); in DispatchKeyEvent()
/base/web/webview/test/unittest/ohos_nweb/
Dnweb_input_event_test.cpp96 std::shared_ptr<MMI::KeyEvent> keyEvent = MMI::KeyEvent::Create(); variable
97 EXPECT_NE(keyEvent, nullptr);
102 result = g_input->OnInputEvent(keyEvent);
120 result = input->OnInputEvent(keyEvent);
125 keyEvent->SetKeyCode(keyCode);
126 result = input->OnInputEvent(keyEvent);
129 keyEvent = nullptr;
131 input->DispatchKeyEvent(keyEvent);
135 result = input->OnInputEvent(keyEvent);
/base/web/webview/test/ohos_nweb/
Dnweb_input_event_consumer_test.cpp30 bool NWebInputEventConsumerTest::OnInputEvent(const std::shared_ptr<MMI::KeyEvent>& keyEvent) const in OnInputEvent()
32 DispatchKeyEvent(keyEvent); in OnInputEvent()
33 keyEvent->MarkProcessed(); in OnInputEvent()
90 void NWebInputEventConsumerTest::DispatchKeyEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const in DispatchKeyEvent()
97 if (keyEvent == nullptr) { in DispatchKeyEvent()
101 int32_t keyCode = keyEvent->GetKeyCode(); in DispatchKeyEvent()
Dnweb_input_event_consumer_test.h31 bool OnInputEvent(const std::shared_ptr<MMI::KeyEvent>& keyEvent) const override;
37 void DispatchKeyEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const;
/base/web/webview/test/unittest/mmi_adapter/
Dmmi_adapter_impl_test.cpp170 std::shared_ptr<MMI::KeyEvent> keyEvent = MMI::KeyEvent::Create(); variable
173 keyEvent->SetKeyAction(MMI::KeyEvent::KEY_ACTION_DOWN);
174 listenerAdapter.OnInputEvent(keyEvent);
178 keyEvent->SetKeyAction(MMI::KeyEvent::KEY_ACTION_UP);
179 listenerAdapter.OnInputEvent(keyEvent);
180 keyEvent->SetKeyAction(MMI::KeyEvent::KEY_ACTION_CANCEL);
181 listenerAdapter.OnInputEvent(keyEvent);
184 listenerAdapterImpl.OnInputEvent(keyEvent);
/base/web/webview/ohos_adapter/multimodalinput_adapter/src/
Dmmi_adapter_impl.cpp54 void MMIInputListenerAdapterImpl::OnInputEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const in OnInputEvent()
59 if (keyEvent->GetKeyAction() != MMI::KeyEvent::KEY_ACTION_DOWN && in OnInputEvent()
60 keyEvent->GetKeyAction() != MMI::KeyEvent::KEY_ACTION_UP) { in OnInputEvent()
63 …int32_t keyAction = (keyEvent->GetKeyAction() == MMI::KeyEvent::KEY_ACTION_DOWN) ? KEY_DOWN : KEY_… in OnInputEvent()
64 listener_(keyEvent->GetKeyCode(), keyAction); in OnInputEvent()
/base/inputmethod/imf/services/adapter/keyboard/src/
Dinput_event_callback.cpp32 void InputEventCallback::OnInputEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const in OnInputEvent()
34 auto keyCode = keyEvent->GetKeyCode(); in OnInputEvent()
35 auto keyAction = keyEvent->GetKeyAction(); in OnInputEvent()
/base/web/webview/ohos_nweb/include/
Dnweb_input_event_consumer.h32 bool OnInputEvent(const std::shared_ptr<MMI::KeyEvent>& keyEvent) const override;
38 void DispatchKeyEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const;
/base/inputmethod/imf/unitest/src/
Dinput_method_service_test.cpp124 std::shared_ptr<MMI::KeyEvent> keyEvent = MMI::KeyEvent::Create(); in SetKeyEvent() local
130 if (keyEvent != nullptr) { in SetKeyEvent()
131 keyEvent->SetKeyCode(keyCode); in SetKeyEvent()
132 keyEvent->SetKeyAction(keyAction); in SetKeyEvent()
133 keyEvent->AddPressedKeyItems(keyItem); in SetKeyEvent()
135 return keyEvent; in SetKeyEvent()
/base/web/webview/test/fuzztest/dispatchkeyevent_fuzzer/
Ddispatchkeyevent_fuzzer.cpp132 auto keyEvent = MMI::KeyEvent::Create(); in DoSomethingInterestingWithMyAPI() local
133 if (keyEvent == nullptr) { in DoSomethingInterestingWithMyAPI()
136 inputEvent.DispatchKeyEvent(keyEvent); in DoSomethingInterestingWithMyAPI()
/base/web/webview/test/fuzztest/oninputkeyevent_fuzzer/
Doninputkeyevent_fuzzer.cpp130 auto keyEvent = MMI::KeyEvent::Create(); in DoSomethingInterestingWithMyAPI() local
131 if (keyEvent == nullptr) { in DoSomethingInterestingWithMyAPI()
134 inputEvent.OnInputEvent(keyEvent); in DoSomethingInterestingWithMyAPI()
/base/inputmethod/imf/test/unitest/src/
DInputMethodTest.js717 KeyboardDelegate.off('keyDown', (keyEvent) => {
718 console.info("inputMethodEngine beforeEach keyDown:" + keyEvent.keyCode);
719 expect(keyEvent.keyCode).assertEqual('1');
721 console.info("inputMethodEngine beforeEach keyDown:" + keyEvent.keyAction);
722 expect(keyEvent.keyAction).assertEqual('1');
725 KeyboardDelegate.off('keyUp', (keyEvent) => {
726 console.info("inputMethodEngine beforeEach keyUp:" + keyEvent.keyCode);
727 expect(keyEvent.keyCode).assertEqual('1');
728 console.info("inputMethodEngine beforeEach keyDown:" + keyEvent.keyAction);
729 expect(keyEvent.keyAction).assertEqual('0');
[all …]
/base/inputmethod/imf/test/fuzztest/inputmethodcontroller_fuzzer/
Dinputmethodcontroller_fuzzer.cpp74 std::shared_ptr<MMI::KeyEvent> keyEvent = MMI::KeyEvent::Create(); in TestDispatchKeyEvent() local
75 keyEvent->SetKeyAction(fuzzedInt32); in TestDispatchKeyEvent()
76 keyEvent->SetKeyCode(fuzzedInt32); in TestDispatchKeyEvent()
77 imc->dispatchKeyEvent(keyEvent); in TestDispatchKeyEvent()
/base/inputmethod/imf/services/adapter/keyboard/include/
Dinput_event_callback.h31 virtual void OnInputEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const;
/base/powermgr/power_manager/services/native/src/
Dpower_mgr_service.cpp148 virtual void OnInputEvent(std::shared_ptr<KeyEvent> keyEvent) const;
153 void InputCallback::OnInputEvent(std::shared_ptr<KeyEvent> keyEvent) const in OnInputEvent()
160 pms->HandleKeyEvent(keyEvent->GetKeyCode()); in OnInputEvent()
194 [this](std::shared_ptr<OHOS::MMI::KeyEvent> keyEvent) { in KeyMonitorInit() argument
206 [this](std::shared_ptr<OHOS::MMI::KeyEvent> keyEvent) { in KeyMonitorInit() argument
221 [this](std::shared_ptr<OHOS::MMI::KeyEvent> keyEvent) { in KeyMonitorInit() argument
233 [this](std::shared_ptr<OHOS::MMI::KeyEvent> keyEvent) { in KeyMonitorInit() argument
235 this->HandleKeyEvent(keyEvent->GetKeyCode()); in KeyMonitorInit()
/base/web/webview/ohos_adapter/multimodalinput_adapter/include/
Dmmi_adapter_impl.h45 void OnInputEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const override;
/base/inputmethod/imf/frameworks/inputmethod_controller/src/
Dinput_method_controller.cpp647 bool InputMethodController::dispatchKeyEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) in dispatchKeyEvent() argument
661 && data.WriteInt32(keyEvent->GetKeyCode()) in dispatchKeyEvent()
662 && data.WriteInt32(keyEvent->GetKeyAction()))) { in dispatchKeyEvent()
/base/inputmethod/imf/frameworks/inputmethod_controller/include/
Dinput_method_controller.h78 IMF_API bool dispatchKeyEvent(std::shared_ptr<MMI::KeyEvent> keyEvent);