From 6390cf67d065727c810fcf4ef32b0cac7efac8e2 Mon Sep 17 00:00:00 2001 From: wh201906 Date: Tue, 23 Jul 2024 03:57:39 -0700 Subject: [PATCH] Add upper case keys to the debug key handler (#45559) Summary: The CLI of Metro bundler only accepts key presses when the Caps Lock is off. This is somehow inconvenient because the developers might think the Metro bundler doesn't response when the Caps Lock is on. ## Changelog: [GENERAL] [ADDED] - Add upper case keys to the debug key handler Pull Request resolved: https://github.com/facebook/react-native/pull/45559 Test Plan: n/a Reviewed By: huntie Differential Revision: D60107316 Pulled By: dmytrorykun fbshipit-source-id: 045dcd382d84c4781dff75a1ff913cd3ccc8d288 --- .../src/commands/start/attachKeyHandlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js index 0db4df40b9e..0393c9c1437 100644 --- a/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js +++ b/packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js @@ -44,7 +44,7 @@ export default function attachKeyHandlers({ }; const onPress = async (key: string) => { - switch (key) { + switch (key.toLowerCase()) { case 'r': logger.info('Reloading connected app(s)...'); messageSocket.broadcast('reload', null);