From 3e7657f9c4e6ec46ce72f40bbd06225f7d165390 Mon Sep 17 00:00:00 2001 From: Karan Yadav Date: Fri, 11 Apr 2025 21:14:17 +0000 Subject: [PATCH] [#3450] change text-size using arrow-keys This PR add onKeyDown event listener to input field and check for up or down key press and updates the font size. --- client/modules/IDE/components/Preferences/index.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/modules/IDE/components/Preferences/index.jsx b/client/modules/IDE/components/Preferences/index.jsx index fa5859400e..e8b3dec2d7 100644 --- a/client/modules/IDE/components/Preferences/index.jsx +++ b/client/modules/IDE/components/Preferences/index.jsx @@ -179,6 +179,13 @@ export default function Preferences() { onClick={() => { fontSizeInputRef.current?.select(); }} + onKeyDown={(event) => { + if (event.key === 'ArrowUp') { + increaseFontSize(); + } else if (event.key === 'ArrowDown') { + decreaseFontSize(); + } + }} />