from pynput.keyboard import Key
from pynput.keyboard import Controller

keyboard = Controller()

import time
time.sleep(3)

with keyboard.pressed(Key.shift):
    keyboard.press(Key.home)
#     keyboard.release(Key.left)
#     keyboard.press(Key.left)
    keyboard.release(Key.left)
c89407e53740e5bc540016b83ddb85afdc462bfc
<mask token>

<mask token>
time.sleep(3)
with keyboard.pressed(Key.shift):
    keyboard.press(Key.home)
    keyboard.release(Key.left)

<mask token>
keyboard = Controller()
<mask token>
time.sleep(3)
with keyboard.pressed(Key.shift):
    keyboard.press(Key.home)
    keyboard.release(Key.left)

from pynput.keyboard import Key
from pynput.keyboard import Controller
keyboard = Controller()
import time
time.sleep(3)
with keyboard.pressed(Key.shift):
    keyboard.press(Key.home)
    keyboard.release(Key.left)

from pynput.keyboard import Key
from pynput.keyboard import Controller

keyboard = Controller()

import time
time.sleep(3)

with keyboard.pressed(Key.shift):
    keyboard.press(Key.home)
#     keyboard.release(Key.left)
#     keyboard.press(Key.left)
    keyboard.release(Key.left)