Implement escape/cancel key press callback for TextInput (#48680)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
Devan Buggay
2025-01-15 08:34:55 -08:00
committed by Facebook GitHub Bot
parent c89c5d7e3d
commit e566c1ec06
@@ -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;
}