Mini ROV project

Hello Everyone
I have signed up on this website to find some help with programming in Python 3.0

I am struggling to control PWM values by using keys on the laptop
I have a bit of code which works when I press run :
import board
import busio
from time import sleep
import adafruit_pca9685
i2c = busio.I2C(board.SCL, board.SDA)
hat = adafruit_pca9685.PCA9685(i2c)
hat.frequency = 50 # Hz
led_channel = hat.channels[0]
#led_channel = hat.channels[3]

MAX_POSITIVE = 0x2100
HALF_POSITIVE = 0x1800
MAX_NEGATIVE = 0x0690
OFF = 0x1340

led_channel.duty_cycle = HALF_POSITIVE

My aim is to press any key to set duty cycle in this case HALF_POSITIVE rather than opening 4 different programs and run them separately.

I have found and proved working simple key event code :
import keyboard
a = input (“Start motor”)
print (a)
but I need to press return key to run it every time is there a possibility enter any command to skip this return key so if i will press “a” with no confirming by return key the input will work?