I am using the keyboard module on python to input text using Selenium. I am trying to simulate shift + up_key to highlight and delete text but I am not familiar with the keycodes in python. I am using macOS to simulate the keypresses.
if current_url == TARGET_URL:
print("success!")
else:
#up_key not being a valid keystroke
keyboard.send("shift+up_key")
keyboard.send("delete")