Skip to content

Commit

Permalink
Implement escape/cancel key press callback for TextInput (#48680)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #48680

## Changelog:

[General] [Added] - Adds the escape key to the key press event handler payload.

Reviewed By: shwanton

Differential Revision: D68186072

fbshipit-source-id: 01786c309bff4991c12fa667e933ff6105efe638
  • Loading branch information
sbuggay authored and facebook-github-bot committed Jan 15, 2025
1 parent c89c5d7 commit e566c1e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ static jsi::Value keyPressMetricsPayload(
key = "Enter";
} else if (keyPressMetrics.text.front() == '\t') {
key = "Tab";
} else if (keyPressMetrics.text.front() == '\x1B') {
key = "Escape";
} else {
key = keyPressMetrics.text;
}
Expand Down

0 comments on commit e566c1e

Please sign in to comment.