Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions shell/platform/windows/text_input_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,9 @@ void TextInputPlugin::KeyboardHook(FlutterWindowsView* view,
return;
}
if (action == WM_KEYDOWN) {
// Most editing keys (arrow keys, backspace, delete, etc.) are handled in
// the framework, so don't need to be handled at this layer.
switch (key) {
case VK_LEFT:
if (active_model_->MoveCursorBack()) {
SendStateUpdate(*active_model_);
}
break;
case VK_RIGHT:
if (active_model_->MoveCursorForward()) {
SendStateUpdate(*active_model_);
}
break;
case VK_END:
active_model_->MoveCursorToEnd();
SendStateUpdate(*active_model_);
break;
case VK_HOME:
active_model_->MoveCursorToBeginning();
SendStateUpdate(*active_model_);
break;
case VK_BACK:
if (active_model_->Backspace()) {
SendStateUpdate(*active_model_);
}
break;
case VK_DELETE:
if (active_model_->Delete()) {
SendStateUpdate(*active_model_);
}
break;
case VK_RETURN:
EnterPressed(active_model_.get());
break;
Expand Down