Repository: Avaiga/taipy
File: frontend/taipy-gui/src/components/Taipy/Input.tsx (TypeScript)

Code before:
                    let val =
                        Number(evt.currentTarget.querySelector("input")?.value || 0) -
                        (step || 1) * (stepMultiplier || 10);
                    if (min !== undefined && val < min) {
                        val = min;
                    }
                    setValue(val.toString());
                    updateValueWithDelay(val);
                    evt.preventDefault();
                }
            } else if (!evt.shiftKey && !evt.ctrlKey && !evt.altKey && actionKeys.includes(evt.key)) {
                const val = multiline ? evt.currentTarget.querySelector("textarea")?.value : evt.currentTarget.querySelector("input")?.value;
                if (changeDelay > 0 && delayCall.current > 0) {
                    clearTimeout(delayCall.current);
                    delayCall.current = -1;
                    dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate));
                } else if (changeDelay === -1) {
                    dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate));
                }
                onAction && dispatch(createSendActionNameAction(id, module, onAction, evt.key, updateVarName, val));
                evt.preventDefault();
            }
        },
        [
            type,
            multiline,
            actionKeys,
            step,
            stepMultiplier,
            max,
            updateValueWithDelay,
            onAction,
            dispatch,
            id,
            module,
            updateVarName,
            min,
            changeDelay,
            onChange,
            propagate,
        ]
    );

    const roundBasedOnStep = useMemo(() => {
        const stepString = (step || 1).toString();
        const decimalPlaces = stepString.includes(".") ? stepString.split(".")[1].length : 0;
        const multiplier = Math.pow(10, decimalPlaces);
        return (value: number) => Math.round(value * multiplier) / multiplier;
    }, [step]);

    const calculateNewValue = useMemo(() => {

Review comment (suggestion):
```
const val = evt.currentTarget.querySelector(multiline?"textarea":"input")?.value;
```

Code after:
    const handleAction = useCallback(
        (evt: KeyboardEvent<HTMLDivElement>) => {
            if (evt.shiftKey && type === "number") {
                if (evt.key === "ArrowUp") {
                    let val =
                        Number(evt.currentTarget.querySelector("input")?.value || 0) +
                        (step || 1) * (stepMultiplier || 10);
                    if (max !== undefined && val > max) {
                        val = max;
                    }
                    setValue(val.toString());
                    updateValueWithDelay(val);
                    evt.preventDefault();
                } else if (evt.key === "ArrowDown") {
                    let val =
                        Number(evt.currentTarget.querySelector("input")?.value || 0) -
                        (step || 1) * (stepMultiplier || 10);
                    if (min !== undefined && val < min) {
                        val = min;
                    }
                    setValue(val.toString());
                    updateValueWithDelay(val);
                    evt.preventDefault();
                }
            } else if (!evt.shiftKey && !evt.ctrlKey && !evt.altKey && actionKeys.includes(evt.key)) {
                const val = multiline
                    ? evt.currentTarget.querySelector("textarea")?.value
                    : evt.currentTarget.querySelector("input")?.value;
                if (changeDelay > 0 && delayCall.current > 0) {
                    clearTimeout(delayCall.current);
                    delayCall.current = -1;
                    dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate));
                } else if (changeDelay === -1) {
                    dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate));
                }
                onAction && dispatch(createSendActionNameAction(id, module, onAction, evt.key, updateVarName, val));
                evt.preventDefault();
            }
        },
        [
            type,
            multiline,
            actionKeys,
            step,
            stepMultiplier,
            max,
            updateValueWithDelay,
            onAction,
            dispatch,
            id,
            module,