Skip to content

Commit 1bd6dff

Browse files
Uses Done action instead of newLine
1 parent f2ece22 commit 1bd6dff

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

library/linux/src/internal/text_input_plugin.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static constexpr char kUpdateEditingStateMethod[] =
2727
static constexpr char kPerformActionMethod[] = "TextInputClient.performAction";
2828

2929
static constexpr char kNewLineAction[] = "TextInputAction.newline";
30+
static constexpr char kDoneAction[] = "TextInputAction.done";
3031

3132
static constexpr char kSelectionBaseKey[] = "selectionBase";
3233
static constexpr char kSelectionExtentKey[] = "selectionExtent";
@@ -178,7 +179,7 @@ void TextInputPlugin::SendStateUpdate(const TextInputModel &model) {
178179
void TextInputPlugin::EnterPressed(const TextInputModel &model) {
179180
Json::Value args = Json::arrayValue;
180181
args.append(model.client_id());
181-
args.append(kNewLineAction);
182+
args.append(kDoneAction);
182183

183184
InvokeMethod(kPerformActionMethod, args);
184185
}

library/linux/src/internal/text_input_plugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TextInputPlugin : public KeyboardHookHandler, public JsonPlugin {
4646
// Sends the current state of the given model to the Flutter engine.
4747
void SendStateUpdate(const TextInputModel &model);
4848

49-
// Sends a "newline" action to the Flutter engine.
49+
// Sends an action triggered by the Enter key to the Flutter engine.
5050
void EnterPressed(const TextInputModel &model);
5151

5252
// Mapping of client IDs to text input models.

0 commit comments

Comments
 (0)