Skip to content

Commit

Permalink
Merge pull request unoplatform#14108 from unoplatform/Youssef1313/key…
Browse files Browse the repository at this point in the history
…down-android-enter

fix(android): Fix KeyDown not firing for Enter key
  • Loading branch information
MartinZikmund authored Oct 25, 2023
2 parents ef8a5af + 6f803ed commit f3f0051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ public bool OnEditorAction(TextView v, [GeneratedEnum] ImeAction actionId, KeyEv
//We need to force a keypress event on editor action.
//the key press event is not triggered if we press the enter key depending on the ime.options
var modifiers = e is not null ? VirtualKeyHelper.FromModifiers(e.Modifiers) : VirtualKeyModifiers.None;
RaiseEvent(KeyUpEvent, new KeyRoutedEventArgs(this, global::Windows.System.VirtualKey.Enter, modifiers));
RaiseEvent(KeyDownEvent, new KeyRoutedEventArgs(this, global::Windows.System.VirtualKey.Enter, modifiers));
RaiseEvent(KeyUpEvent, new KeyRoutedEventArgs(this, global::Windows.System.VirtualKey.Enter, modifiers));

// Action will be ImeNull if AcceptsReturn is true, in which case we return false to allow the new line to register.
Expand Down

0 comments on commit f3f0051

Please sign in to comment.