1# inputmethod_types_capi.h 2<!--Kit: IME Kit--> 3<!--Subsystem: MiscServices--> 4<!--Owner: @illybyy--> 5<!--Designer: @andeszhang--> 6<!--Tester: @murphy1984--> 7<!--Adviser: @zhang_yixin13--> 8 9## Overview 10 11Defines the types related to the input method. 12 13**File to include**: <inputmethod/inputmethod_types_capi.h> 14 15**Library**: libohinputmethod.so 16 17**System capability**: SystemCapability.MiscServices.InputMethodFramework 18 19**Since**: 12 20 21**Related module**: [InputMethod](capi-inputmethod.md) 22 23## Summary 24 25### Enums 26 27| Name| typedef Keyword| Description| 28| -- | -- | -- | 29| [InputMethod_KeyboardStatus](#inputmethod_keyboardstatus) | InputMethod_KeyboardStatus | Keyboard status.| 30| [InputMethod_EnterKeyType](#inputmethod_enterkeytype) | InputMethod_EnterKeyType | Enter key type.| 31| [InputMethod_Direction](#inputmethod_direction) | InputMethod_Direction | Moving direction.| 32| [InputMethod_ExtendAction](#inputmethod_extendaction) | InputMethod_ExtendAction | Type of the extended edit action on the text box.| 33| [InputMethod_TextInputType](#inputmethod_textinputtype) | InputMethod_TextInputType | Text input type.| 34| [InputMethod_CommandValueType](#inputmethod_commandvaluetype) | InputMethod_CommandValueType | Private data type.| 35| [InputMethod_ErrorCode](#inputmethod_errorcode) | InputMethod_ErrorCode | Error code of the input method.| 36| [InputMethod_RequestKeyboardReason](#inputmethod_requestkeyboardreason) | InputMethod_RequestKeyboardReason | Reason for requesting the keyboard.| 37 38## Enum Description 39 40### InputMethod_KeyboardStatus 41 42``` 43enum InputMethod_KeyboardStatus 44``` 45 46**Description** 47 48Enumerates the keyboard status. 49 50**Since**: 12 51 52| Enum Item| Description| 53| -- | -- | 54| IME_KEYBOARD_STATUS_NONE = 0 | NONE.| 55| IME_KEYBOARD_STATUS_HIDE = 1 | Invisible.| 56| IME_KEYBOARD_STATUS_SHOW = 2 | Visible.| 57 58### InputMethod_EnterKeyType 59 60``` 61enum InputMethod_EnterKeyType 62``` 63 64**Description** 65 66Enumerates the Enter key types. 67 68**Since**: 12 69 70| Enum Item| Description| 71| -- | -- | 72| IME_ENTER_KEY_UNSPECIFIED = 0 | Unspecified.| 73| IME_ENTER_KEY_NONE = 1 | NONE.| 74| IME_ENTER_KEY_GO = 2 | Go.| 75| IME_ENTER_KEY_SEARCH = 3 | Search.| 76| IME_ENTER_KEY_SEND = 4 | Send.| 77| IME_ENTER_KEY_NEXT = 5 | Next.| 78| IME_ENTER_KEY_DONE = 6 | Done.| 79| IME_ENTER_KEY_PREVIOUS = 7 | Previous.| 80| IME_ENTER_KEY_NEWLINE = 8 | Line break.| 81 82### InputMethod_Direction 83 84``` 85enum InputMethod_Direction 86``` 87 88**Description** 89 90Enumerates the moving directions. 91 92**Since**: 12 93 94| Enum Item| Description| 95| -- | -- | 96| IME_DIRECTION_NONE = 0 | NONE.| 97| IME_DIRECTION_UP = 1 | Upward.| 98| IME_DIRECTION_DOWN = 2 | Downward.| 99| IME_DIRECTION_LEFT = 3 | Leftward.| 100| IME_DIRECTION_RIGHT = 4 | Rightward.| 101 102### InputMethod_ExtendAction 103 104``` 105enum InputMethod_ExtendAction 106``` 107 108**Description** 109 110Enumerates the types of the extended edit action on the text box. 111 112**Since**: 12 113 114| Enum Item| Description| 115| -- | -- | 116| IME_EXTEND_ACTION_SELECT_ALL = 0 | Select all.| 117| IME_EXTEND_ACTION_CUT = 3 | Cut.| 118| IME_EXTEND_ACTION_COPY = 4 | Copy.| 119| IME_EXTEND_ACTION_PASTE = 5 | Paste.| 120 121### InputMethod_TextInputType 122 123``` 124enum InputMethod_TextInputType 125``` 126 127**Description** 128 129Enumerates the text input types. 130 131**Since**: 12 132 133| Enum Item| Description| 134| -- | -- | 135| IME_TEXT_INPUT_TYPE_NONE = -1 | NONE.| 136| IME_TEXT_INPUT_TYPE_TEXT = 0 | Text.| 137| IME_TEXT_INPUT_TYPE_MULTILINE = 1 | Multi-line.| 138| IME_TEXT_INPUT_TYPE_NUMBER = 2 | Number.| 139| IME_TEXT_INPUT_TYPE_PHONE = 3 | Phone number.| 140| IME_TEXT_INPUT_TYPE_DATETIME = 4 | Date.| 141| IME_TEXT_INPUT_TYPE_EMAIL_ADDRESS = 5 | Email address.| 142| IME_TEXT_INPUT_TYPE_URL = 6 | URL.| 143| IME_TEXT_INPUT_TYPE_VISIBLE_PASSWORD = 7 | Password.| 144| IME_TEXT_INPUT_TYPE_NUMBER_PASSWORD = 8 | Numeric password.| 145| IME_TEXT_INPUT_TYPE_SCREEN_LOCK_PASSWORD = 9 | Lock screen password.| 146| IME_TEXT_INPUT_TYPE_USER_NAME = 10 | Username.| 147| IME_TEXT_INPUT_TYPE_NEW_PASSWORD = 11 | New password.| 148| IME_TEXT_INPUT_TYPE_NUMBER_DECIMAL = 12 | Decimal number.| 149| IME_TEXT_INPUT_TYPE_ONE_TIME_CODE = 13 | Verification code. **Since**: 20| 150 151### InputMethod_CommandValueType 152 153``` 154enum InputMethod_CommandValueType 155``` 156 157**Description** 158 159Enumerates the private data types. 160 161**Since**: 12 162 163| Enum Item| Description| 164| -- | -- | 165| IME_COMMAND_VALUE_TYPE_NONE = 0 | NONE.| 166| IME_COMMAND_VALUE_TYPE_STRING = 1 | String.| 167| IME_COMMAND_VALUE_TYPE_BOOL = 2 | Boolean.| 168| IME_COMMAND_VALUE_TYPE_INT32 = 3 | 32-bit signed integer.| 169 170### InputMethod_ErrorCode 171 172``` 173enum InputMethod_ErrorCode 174``` 175 176**Description** 177 178Enumerates the input method error codes. 179 180**Since**: 12 181 182| Enum Item| Description| 183| -- | -- | 184| IME_ERR_OK = 0 | Success.| 185| IME_ERR_UNDEFINED = 1 | Query failed.| 186| IME_ERR_PARAMCHECK = 401 | Parameter check failed.| 187| IME_ERR_PACKAGEMANAGER = 12800001 | Package management error.| 188| IME_ERR_IMENGINE = 12800002 | Input method application error.| 189| IME_ERR_IMCLIENT = 12800003 | Text box client error.| 190| IME_ERR_CONFIG_PERSIST = 12800005 | Configuration persistence failed. This error code is reported when the configuration fails to be saved.| 191| IME_ERR_CONTROLLER = 12800006 | Input method controller error.| 192| IME_ERR_SETTINGS = 12800007 | Input method setter error.| 193| IME_ERR_IMMS = 12800008 | Input method manager service error.| 194| IME_ERR_DETACHED = 12800009 | Text box unbound.| 195| IME_ERR_NULL_POINTER = 12802000 | Null pointer.| 196| IME_ERR_QUERY_FAILED = 12802001 | Query failed.| 197 198### InputMethod_RequestKeyboardReason 199 200``` 201enum InputMethod_RequestKeyboardReason 202``` 203 204**Description** 205 206Enumerates the reasons for requesting the keyboard. 207 208**Since**: 15 209 210| Enum Item| Description| 211| -- | -- | 212| IME_REQUEST_REASON_NONE = 0 | No reason.| 213| IME_REQUEST_REASON_MOUSE = 1 | Mouse operation.| 214| IME_REQUEST_REASON_TOUCH = 2 | Touch operation.| 215| IME_REQUEST_REASON_OTHER = 20 | Other reasons.| 216