diff --git a/frameworks/inputmethod_controller/include/input_method_controller.h b/frameworks/inputmethod_controller/include/input_method_controller.h index 6c5c1988..142676d4 100644 --- a/frameworks/inputmethod_controller/include/input_method_controller.h +++ b/frameworks/inputmethod_controller/include/input_method_controller.h @@ -40,6 +40,7 @@ namespace MiscServices { virtual void SendKeyEventFromInputMethod(const KeyEvent& event) = 0; virtual void SendKeyboardInfo(const KeyboardInfo& info) = 0; virtual void SetKeyboardStatus(bool status) = 0; + virtual void MoveCursor(const Direction direction) = 0; }; class ImsaDeathRecipient : public IRemoteObject::DeathRecipient { diff --git a/frameworks/inputmethod_controller/include/input_method_utils.h b/frameworks/inputmethod_controller/include/input_method_utils.h index 99ea82fd..4207759b 100644 --- a/frameworks/inputmethod_controller/include/input_method_utils.h +++ b/frameworks/inputmethod_controller/include/input_method_utils.h @@ -41,6 +41,15 @@ namespace MiscServices { URL, VISIBLE_PASSWORD, }; + + enum class Direction { + NONE = 0, + UP = 1, + DOWN, + LEFT, + RIGHT, + }; + class Configuration { public: EnterKeyType GetEnterKeyType() const diff --git a/unitest/src/input_method_controller_test.cpp b/unitest/src/input_method_controller_test.cpp index b0330889..702f36c7 100644 --- a/unitest/src/input_method_controller_test.cpp +++ b/unitest/src/input_method_controller_test.cpp @@ -64,6 +64,10 @@ namespace MiscServices { { IMSA_HILOGI("IMC TEST TextListener SendKeyboardInfo"); } + void MoveCursor(const Direction direction) + { + IMSA_HILOGI("IMC TEST TextListener Direction"); + } }; class InputMethodControllerTest : public testing::Test { public: