Get desktop application:
View/edit binary Protocol Buffers messages
Annotation against a candidate.
Used in: ,
Annotation prepended to the value.
Annotation appended to the value.
Type of the candidate such as [HALF][KATAKANA], [GREEK], [Black square], etc...
Shortcut key to select this candidate.
Set to true if this candidate can be deleted from history.
Note there is another ApplicationInfo inside RendererCommand. Since Input is not using nested message, define ApplicationInfo here.
Used in:
The time difference between local time and UTC time in seconds. This field is not supported except for NaCl. We use this field in NaCl Mozc because we can't know the local timezone in NaCl environment.
Used in:
This value represents the focused position of the next |candidates|. If the |candidates| is a part of the whole candidate words (as a result of paging), this value indicates the position from the beginning of that part. (ex. where |candidates| contatins 10th to 18th candidates, focused_index=0 means the 10th candidate, but not 1st candidate. The existense of |focused_index| does not represents whether this candidate list is a 'suggestion' or not. |category| represents it.
Category of the candidates.
Used in:
Unique number specifing the candidate. This may be a negative value.
The first index should be zero and index numbers should increase by one.
Reading of the value. The value is only used when the key is different from the input composition (e.g. suggestion/prediction).
Converted value. (e.g. Kanji value).
TODO(komatsu) rename it to CandidateWindow.
Used in: ,
TODO(komatsu): Use CandidateList. When has_focused_index() is true, this message contains predicted and normally converted candidates. Otherwise, when the field is not set, this message contains a 'suggestion'.
The size of the total candidates in this candidate list. The value does not include the size of subcandidate lists. Note, the next repeated-Candidate=3 may not contain all candidates. all_candidates contains the values of subcandidate lists.
The position on the preedit. The number represents the left edge of the candidate window.
Nested candidates aka cascading window.
Usages of candidates.
TODO(komatsu): Use CandidateList. Category of the candidates
Information to be used for rendering.
Footer of the GUI window.
This position is used for suggest window position.
TODO(komatsu): Use CandidateList.
Used in:
The first index should be zero and index numbers should increase by one.
Unique number specifing the candidate.
Used in:
Shows candidate window under the caret. This is used for prediction and conversion
Shows candidate window aligned with composition area. This is used for suggestion.
The direction of candidates in the window. This is just a suggestion from the server and client does not have to follow.
Used in:
Clients' capability. Users cannot modify this. The server has to obey this capability.
Used in:
Bit fields to notify what the client can do.
Used in:
Can delete preceding text which is adjacent to preedit.
Category describes the attribute of the words.
Used in: , ,
Used in:
This message is used for unittest.
This enum is used by SessionCommand::input_mode with CHANGE_INPUT_MODE and Output::mode.
Used in: , , ,
Used in:
Former part of surrounding text.
Latter part of surrounding text.
If this is true, suggestion feature is disabled regardless the congiguration. If this is false, suggestion feature is followed by the user's configuration. If you want to omit interim suggestions during the key typing, you might want to use request_suggestion. TODO(komatsu): Delete this field and use experimental_features.
Type of the input field being focused.
An unique revision ID to specify one specific typing session. A client can use arbitrary value for this field. The converter is expected to clear its internal history segments whenever this value is changed. A client should use the same revision ID whenever the converter should keep it internal history segments. In order to avoid unexpected history learnings, a client should update the revision whenever the input focus is changed.
Repeated fields to be used for experimental features.
Input field type. The types are based on the input types defined in HTML5. http://dev.w3.org/html5/spec/Overview.html#attr-input-type Other types are to be added later.
Used in: ,
No restrictions nor special functions. The IME operates as usual.
Password field. Text is hidden after input. For Android, In order to make the last character visible to the user, the IME must not hold more than 2 characters in preedit.
Telephone number
Number
This messsage contains which characters are to be deleted by client. E.g. if current composition and surrounding text are "この感じは漢字は" ^^^^^^ and we send DeletionRange with offset == -3 and length == 3, then they will be rendered like: "この漢字は" ^^^^^^
Used in:
Offset of start of range.
Length of the range.
DisplayType is a hint to UI renderers describing how the words are displayed.
Used in: ,
Message representing the footer part of the candidate window.
Used in:
Message shown like a status bar.
Whether index (e.g. 10/120) is visible or not.
Whether the logo image is visible or not.
Message modestly shown. It is used for displaying the version on dev-channel now.
Used in: ,
The type must be bytes instead of string because value might have U+0000 character as a terminator. In this case, characters after the terminator are undefined. Such byte stream cannot be treaed by Java's String class, which is used for PB's string type. Instead, PB's bytes type is converted into ByteString in Java, which can treat C laguage style string described above.
Used in:
Additional information to a candidate word. This message is used for describing a word usage for instance.
Used in:
Unique number specifying the information.
Title string of the information. For usage, this value is probably equal to Candidate::value or its canonicalized value.
The content of the information. For usage, this value actually describes how to use the word.
The IDs of candidates which connect with the information.
Used in:
Category of the infolist.
Information to be used for rendering.
How long rendere needs to wait before the infolist is displayed. the default setting is 500 msec.
Used in:
Session ID created by CREATE_SESSION.
Key combinations used for SEND_KEY or TEST_SEND_KEY.
Command sent to the session layer used with SEND_COMMAND.
Input config
Context data
Client capability
Application information, like process id. Server may be able to change the behavior by seeing the the program name.
Client request
If the command is INSERT_TO_STORAGE, all the fields must be filled. If READ_ALL_FROM_STORAGE, key and value fields are ignored.
A flag to control if the server should return suggest-results or not. If this is set to false, regardless of other configurations, the server won't return suggestion results. This is set to true by default. Note that even if this flag is set to false, when a suggestion is shown in the previous phase, it is possible from the client to submit it. This works only for suggestions for the key insersion, but not for others commands, such as predictions or conversions. This flag is used for the performance improvement in terms of the latency. If you want to suppress the suggestions for the UX improment, you may want to use suppress_suggestion in the Context message.
Used in:
Check only if the key event will be consumed. This command is for TSF on Windows. You do not need to use this command, if it is not necessary.
Evaluate the command specified by SessionCommand. The output format should be the same with an output of a SEND_KEY command.
Config accessors. There are three configurations. Stored config, Imposed config, One-shot config. Stored config : Set by SET_CONFIG command. Its lifetime is permanent (stored into a storage). GET_CONFIG returns stored config. Imposed config : Set by SET_IMPOSED_CONFIG. Its lifetime is the same as the process (*not* stored into a storage as opposed to Stored config). Imposed config is prioritized over Stored config. Only the values explicitly set are effective and override ones in Stored config. In typical usage, most fields are not set. GET_CONFIG's result is *not* affected by imposed config (stored config returns). One-shot config : Set by each key events. It is effective while the key event is processed. This is prioritized over Imposed config. Like as Imposed config, some fields can be omitted. TODO(matsuzakit): Rename (GET|SET)_CONFIG to (GET|SET)_STORED_CONFIG
Set client's request
sync dictionary/history data to local file
shutdowon server safely
reload mutable data (like config, user-dic, history)
clear user history data
clear user prediction data
clear unused prediction
clean up sessions shutdwon if session is empty and mozc_server is launched with timeout mode
no operation can be used for pinging the server
Sync feature is deprecated since 1.13 dev. TODO(mozc-team): Remove following variables.
Send a command for user dictionary session.
Number of commands. When new command is added, the command should use below number and NUM_OF_COMMANDS should be incremented. Note: This enum lack the value for 15 and 19 and it may cause a crash. Please reuse these value if you can. 15 have never been used before, and 19 was used to clear synced data on dev channel.
Used in:
TouchEvent contains source_id and stroke. Touch_events contain all key touch event. Statistical information are collected for each source_id by SessionUsageObserver.
Used in:
source_id specifies the user action such as "X button pressed". It must be unique within the same keyboard_name, which is set in Request message.
Used in:
x, y potision: keyboad left-top is (0, 0), right-bottom is (1, 1).
timestamp (in ms) is set to zero when the touch event starts.
Used in: ,
Printable key in UCS4. If key_code is empty, key_string is used as a raw input.
Going to be obsolete.
Unprintable key listed above.
ModifierKeys
String used for preedit. Kana characters and strings typed from a software keyboard are supposed to be stored here. If key_code is also set, key_code is treated as the raw input and key_string is treated as the composition input. For example, to set Kana value, when key_string is "ち", key_code should be 'a' (97). If key_code is empty, key_string is also treated as the raw input.
Input mode For histrical reasons, this field expects a temporary conversion mode rather than comeback input mode.
Probable key events Even if you can fill this field, don't omit Input.key_code and so on because preedit string is composed based on them.
IME on/off mode You can use this field to change the IME on/off mode indirectly without sending SpecialKey:ON or SpecialKey:OFF events. If the internal ImeContext::State is DIRECT and this field is true, the converter will change the state to PRECONPOSITION and then handles this key event. If the internal ImeContext::State is not DIRECT and this field is false, the converter will change the state to DIRECT and then handles this key event. Implementation note: We need both |mode| and |activated| to support indirect IME off, where |mode| should contain the next mode. If this field is not set, the server will act as if indirect on/off was not supported.
Used in:
Follow the current input mode (default).
Do not transliterate key_string and use it as-is.
Immediately output key_string on the precomposition mode. Same with AS_IS on the preedit mode.
Used in: ,
Probable key event, mainly for touch screen. User's input has ambiguity (e.g. the touch position is merginal) so this message expresses the probable event.
Used in:
message ID is the same as Input message.
Unprintable key listed above.
ModifierKeys
Sum of probabilities must be lesser or equal than 1. 0<= probability <= 1
Used in: ,
On Windows, SpecialKey::On and SpecialKey::OFF are obsolete. Use TURN_ON_IME session command should be used instead. See b/10216365. On other platforms, especially on Mac, please note that client/client.cc still relies on SpecialKey::On for session playback. We need to fix b/10250883 first. TODO(team): Unsupport SpecialKey::On and SpecialKey::OFF.
not DELETE because DELETE is reserved in MSVC
VK_DBE_HIRAGANA(Win), kVK_JIS_Kana(Mac)
TODO(toshiyuki): It is better to rename this to HIRAGANA In Windows, we have Katakana and it may confusing.
alphanumeric VK_DBE_ALPHANUMERIC(Win), kVK_JIS_Eisu(Mac)
Numpad [*]
Numpad [+]
Numpad [enter]
Numpad [-]
Numpad [.]
Numpad [/]
Numpad [=]
Meta key event representing any text input.
VK_DBE_KATAKANA(Win)
Unsupported keys (e.g. PrtSc, Pause) fall back to UNDEFINED_KEY.
Numpad [,]
Numpad [5] without NUMLOCK
Used in: ,
This variable is going to be obsolete.
when URL is non empty, UI can open the page with a browser, after finishing the all rendering part. We are using this feature for bug-report system.
Output config
The current IME status.
All flatten candidate words stored in 1D array. This value is filled only when the content is changed.
Range of characters to be deleted by client.
Used when the command is READ_ALL_FROM_STORAGE.
Callback request to the client.
Used in:
Callback command to be sent from the client to the server. The optional values such as id and composition_mode can be modified or added by the client.
Callback command should be sent after this delay.
ErrorCode: if SessionHandler::EvalCommand() returns false, return output with error_code = SESSION_FAILURE;
Used in:
PreeditMethod: this is the default input mode of the session. If the user's config is "kana-input", it returns KANA. Only CreateSession response will have this field.
Used in:
if launch_tool_mode is set, MozcTool is supposed to be launched by client.
Used in:
no need to launch tool
Preedit represents a composition data, which is rendered on the host application by the ime client. On Japanese IME, the both Preedit and Conversion statuses are represented by this message.
Used in: ,
The position of the first segment whose annotation is 'HIGHLIGHT'. Not set if there are no such segments.
The string data of Preedit is separated into Segment messages presenting the ime server's status. On Preedit status of Japanese IME, there are up to three segments; left side chars of cursor, forcused char, right side chars of cursor. On Conversion status of Japanese IME, the messages literally represent the segments of the conversion.
Used in:
The length of value in characters. This is NOT a number in bytes or logical character units. So, the length of "abc" and "あいう" should be 3, "ヴ" should be 1 and "ヴ" and "う゛" should be 2.
Source of the value. It is almost always the reading of the value.
Used in:
TODO(nona): merge to RendererCommand::Rectangle
Used in: ,
set visibility if visible is false, the content of output is basically ignored.
Preedit rectangle
Application information Mozc UI is attaching
Used in:
used in Windows: WHND of the message-only window:
used in Windows: HWND of the window where composition is displayed.
used in Windows: Preffered font for composition string.
Specifies which IM Framework is used in the client.
used in Windows: Specifies where and how the renderer process shows the composition window (if necessary).
used in Windows: Specifies where and how the renderer process shows the candidate window (if necessary). Currently only one candidate window is supported. TODO(yukawa): support multiple candidate windows.
used in Windows:
ShowUIDefault
used in Windows: Specifies the target position in composition window.
used in Windows: Represents caret information.
A string representation of PangoFontDescription http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-from-string This field is not application specific information but temporaly locate here. TODO(nona): Make new message if necessary.
used in Windows:
Represents IM Framework used in the client. Currently only Windows IM frameworks are supported.
Used in:
Default. For backward compatibility.
Renderer sends RendererCommand to renderer itself in order to extend InfoList.
Used in:
used in Windows: Indicates if a UI element is expected to be displayed or not. Note taht |RendererCommand::visible| should be prior to these flags, that is, you should hide all UI elements if |RendererCommand::visible| is false regardless of the visibility specified in this field.
An equivalent to CANDIDATEFORM in IMM32. (For Windows only) TODO(yukawa): make a common candidate form format for all platforms.
Used in:
Use |style_bits| instead in case there is an applications which specifies a combination of style bits.
0 means Style::DEFAULT
These constants correspond to CFS_* in Imm.h
Used in:
CFS_DEFAULT
CFS_CANDIDATEPOS
CFS_EXCLUDE
This message is a subset of Win32 GUITHREADINFO. (For Windows only) TODO(yukawa): make a common candidate form format for all platforms.
Used in:
An equivalent to IMECHARPOSITION in IMM32. (For Windows only) TODO(yukawa): make a common candidate form format for all platforms.
Used in:
Used in:
No operation
Update the current window
shutdown renderer
An equivalent to COMPOSITIONFORM in IMM32. (For Windows only) TODO(yukawa): make a common composition form format for all platforms.
Used in:
Use |style_bits| instead because there are some applications which specify a combination of style bits like CFS_RECT + CFS_POINT.
0 means Style::DEFAULT
These constants correspond to CFS_* in Imm.h
Used in:
CFS_DEFAULT
CFS_RECT
CFS_POINT
CFS_FORCE_POSITION
Visual information about mode indicator.
Used in:
Used in: , ,
Used in: , , , ,
TODO(yukawa): make a common font format for all platforms.
Used in:
FW_DONTCARE
DEFAULT_CHARSET
OUT_DEFAULT_PRECIS
CLIP_DEFAULT_PRECIS
DEFAULT_QUALITY
DEFAULT_PITCH
should be within 32 TCHARs (w/ '\0')
Clients' request to the server. Users cannot modify this. In the future each request may be able to be overwirtten by Config. The server does not have to obey this request.
Used in: ,
Enable zero query suggestion.
true for android
Conversion's candidate includes suggestion, prediction and conversion.
true for android
Combine all segments like mobile IME.
true for android
Use special Romanji table.
TWELVE_KEYS_TO_HIRAGANA for android.
Keyboard name for touch devices. For example, "TWELVE_KEY_TOGGLE_KANA", "QWERTY_KANA_NUMBER". It is used to analyze touch event usage stats.
Enables Composer's input mode auto updating by using surrounding text. For example, when a composition string is "ad", a carret is at the end, and a user selects HIRAGANA mode, if the user moves the carret to between "a" and "d" the mode will be automatically switch to ASCII (temporarily). See details in the Composer::UpdateInputMode.
Enables Kana-modifier-insensitive conversion as follows: 1) Voiced/Semi-voiced kana will be hit by non-modified kana. e.g.) "ば" and "ぱ" will be hit by key "は". 2) Geminate consonant "っ" will be hit by non-modified kana "つ". 3) Palatalized kana will be hit by non-modified kana. e.g.) "ゃ" will be hit by key "や". Here is an example of the search: "学校" ("がっこう") will be hit by "かつこう".
Enables Auto partial suggestion. For Auto partial suggestion, we can see first segment only candidates adding to normal realtime conversion suggestion results. If we commit that candidate, we will show suggestions for remaining part of key. Note: This feature can be enabled only for mobile due to UX design.
By default, UNICODE emoji is available.
By default, Emoji rewriter works on conversion mode only.
Controls the behavior when a user types the left/right key at the edge of the preedit string (in more precise, the left key at the beginning of the preedit string, or the right key at the end).
Used in:
This is the default behavior. The cursor movement at the edge will make nothing, i.e., keeping the current cursor position (at the edge), consume the key event.
This is the behavior, especially designed for alphabet keyboards on mobile devices. Assuming the following text: XXXXabcde|YYYYY where XXXX is preceding text, abcde is composing text, YYYYY is following text and '|' is the caret, when a user sends "RIGHT" cursor key, we'd like to commit the abcde and move the caret to right. So the user will get: XXXXabcdeY|YYYY Here, what we need is commiting the "abcde" with the appropriate caret position. (Note that we need to handle the left cursor key, too). Also, we should *NOT* consume the key, so that the key event will be handled appropriately by the target application.
Nowadays, four kinds of emoji characters are used in Japan. - Unicode: Unicode based emoji (since Unicode 6.0). - Docomo: Docomo's carrier emoji. - Softbank: Softbank's carrier emoji. - Kddi: Kddi's carrier emoji. Note that especially latter three kinds are used on Mobile phones. So, it is necessary to control what kinds of emoji can be used or not based on client's (or connected application's) information. For example, on Android; - Unicode emoji characters are available only on Android 4.1 or later only. - JP mobile carriers' emoji characters depend on the devices. Also, we need to check the text field's attribute for them. The following bit set tells the emoji availability to EmojiRewriter.
Controls the behavior of language aware input. Language aware input guesses the actual language regardless the input mode. For example, if user type "てst" it will be treated as "test".
Used in:
Performs the default behavior considering the platform and channel.
Does not perform this functionarity.
Adds a language aware candidate to the suggestion.
For emoji rewriter, it is necessary to control when the rewriter runs based on the clients. The following bit set is sync'ed to RewriterInterface::CapabilityType (see rewriter_interface.h, too), so that clients can fill the value.
CONVERSION | PREDICTION | SUGGESTION.
Used in:
The first input is treated as a space, double input is treated as a conversion. If a character is input after the first input, the composition will remain. For example, "ab<space>dc" becomes "ab dc" as a single composition.
The first input is treated as a space, double input is treated as a conversion. If a character is input after the first input, the previous composition will be committed. For example, "ab<space>dc" results "ab " as a committed string and "dc" as a composition.
Commit the composition and a space.
Used in:
Do not use special table. Romanji table is selected based on Config.
Use special table for 12keys (to hiragana).
Use special table for 12keys (to half-width ascii).
Use special table for 12keys (to number).
Use special table for flick (to hiragana).
Use special table for flick (to half-width ascii).
Use special table for flick (to number).
Use special table for both toggle and flick (to hiragana).
Use special table for both toggle and flick (to half-width ascii).
Use special table for both toggle and flick (to number).
Use special table for Qwerty (for Mobile) (to hiragana).
Use special table for Qwerty (for Mobile) (to hiragana's number).
Use special table for Qwerty (for Mobile) (to half-width ascii).
Use special table for Godan (to hiragana).
Use special table for Godan (to half-width ascii).
Use special table for Godan (to number).
Result contains data to be submitted to the host application by the ime client.
Used in: ,
The result of conversion.
Source of the value. It is almost always the reading of the value.
The caret position after the result submission. "0" means the end of the result, and a positive value means moving forward and a negative value backward. e.g.) "-s", where s is the length of value, means the caret position after the committing should be the beginning of the committed value.
Used in:
Used in: ,
Unique number specifying a candidate word.
This is used with SWITCH_INPUT_MODE, TURN_ON_IME and TURN_OFF_IME.
Text argument. This is used by CONVERT_REVERSE at this moment.
New cursor position in preedit. Used with MOVE_CURSOR.
Specify the current caret location, this is used for suggest window position calculation. Used with SEND_CARET_LOCATION.
Unique number specifying an asynchronous request.
Used in:
Revert the session, this is usually similar to type ESC several times.
Commit the session, this is usually similar to type Enter. SUBMIT session command is accepted in any status. Pre-condition: - Any states of IME are acceptable. Post-condition: - Preedit text becomes empty.
Select the specified candidate word by id. This command is usually used with mouse clicking.
Set the focus to the candidate by id. This is usually used with mouse dragging. The difference from SELECT_CANDIDATE is that HIGHLIGHT_CANDIDATE does not close the candidate window while SELECT_CANDIDATE closes the candidate window.
Specify the input mode. This command should be used with composition_mode.
Return the current status such as composition mode, preedit method, etc.
This command is typically used for mobile IME's partial conversion, but currently it is on the way. This description is for current spec. This command requires that candidates exist. If there is a focused candidate (Conversion or Prediction state), the candidate matched with the given id in the first segment is submitted, even though the selected segment is not the first segment (Important thing is whether focused candidate exists or not. Focused index itself is ignored). This behavior should be updated because current cursor position and position of focused segment affects nothing. We should fix this non-intuitive behavior. Intuitive behavior might be submitting segments from first one to focused one (inclusive). If no focused candidate (Suggestion, including ZeroQuery suggestion), first (and only) segment's candiadte of which id is equal to id field of Input message is submitted. This behavior should be fixed because current cursor position affects nothing. In future, the characters after the cursor should be kept as preedit. This command's pre- and post- conditions are differenct from SUBMIT command's. Following conditions will be kept after updating the behavior. Pre-condition: - There should be candidate. Post-condition: - No guarantee on preedit text. TODO(yamaguchi): Update corresponding implementation please.
Perform reverse conversion.
Perform Undo.
Reset convert history and revert current composition. This is usually used by moving cursor with mouse clicking.
Change cursor position in preedit.
Specify the input field type.
Client side event information for collecting usage statistics
This command is used in only Android. Works UNDO or rewind HIRAGANA characters based on the state.
Expand suggestion candidates. Usual suggestion algorithm is not "rich" but "fast" because suggestion is executed every key event (On the other hand predicition is "rich" because prediction is executed only when a user types TAB key). This command expands suggestion candidate but IME state is kept as is (Note : PredictAndConvert key command does almost the same thing but it changes IME state to prediction).
The client can send the current caret position whenever the caret position is changed. The caret position is used for suggest window position calculation. This is an optional message. If client can show suggest window on the correct position, this message can be ignored.
Obsolete command. Don't simply remove this command for NUM_OF_COMMANDS. TODO(team): Replace this command by useful one.
When the server is hadling asynchronous request, the server returns the message with callback request which session_command is GET_ASYNC_RESULT. After the delay_millisec, the client sends this command to the server.
Commit the raw text of the composed string.
Call ConvertPrevPage session command to show the previous page of candidates.
Call ConvertNextPage session command to show the next page of candidates.
Make sure IME is turned on. Optionally you can also provide new input mode in |composition_mode| (but you must not set DIRECT to it). |composition_mode| is honored even when IME is already turned on.
Make sure IME is turned off. Optionally you can also provide new input mode in |composition_mode| (but you must not set DIRECT to it). If IME |composition_mode| is honored even when IME is already turned off.
Number of commands. When new command is added, the command should use below number and NUM_OF_COMMANDS should be incremented.
Client side event for collecting usage statistics
Used in:
Used in: ,
Whether IME is ON or OFF
Visible composition mode when IME is activated. This mode may come from a temporary composition mode. See |comeback_mode|. TODO(yukawa): Rename this field to "visible_mode".
True composition mode that is suitable for system global and permanent composition mode. When a temporary composition mode exists, |comeback_mode| can be different from |mode|. TODO(yukawa): Use more appropriate name.