Skip to content

Commit 3e7657f

Browse files
committed
[#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.
1 parent 5b7b8d8 commit 3e7657f

File tree

1 file changed

+7
-0
lines changed
  • client/modules/IDE/components/Preferences

1 file changed

+7
-0
lines changed

client/modules/IDE/components/Preferences/index.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ export default function Preferences() {
179179
onClick={() => {
180180
fontSizeInputRef.current?.select();
181181
}}
182+
onKeyDown={(event) => {
183+
if (event.key === 'ArrowUp') {
184+
increaseFontSize();
185+
} else if (event.key === 'ArrowDown') {
186+
decreaseFontSize();
187+
}
188+
}}
182189
/>
183190
</form>
184191
<button

0 commit comments

Comments
 (0)