How to click and select individual canvas objects in PySimpleGUI (a tkinter wrapper)?

need a method to select individual canvas objects added into the canvas by my program by clicking on one of them. It’s like there are 2 squares, A and B. I click on A, and it selects A (or prints that A has been selected). I tried using for A in B but it didn’t work. As this is in PySimpleGUI, make sure your method does not use self or anything class related.

import PySimpleGUI as sg

items_files = [  [sg.Button(pad = (0, 0), tooltip = 'Delete from Frontmost', key = 'DelF')]  ]

tab2 = [  [sg.Button(key = 'Rect', pad = (0, 0), tooltip = 'Rectangle')]  ]

BC = 'white'
CW = 600
CH = 450
LXM = (CW / 2)
LYM = (CH / 2)

mid_left = [  [sg.Text(text = "X:"), sg.Input(default_text = "0", key = "TLX", size = (3, 1))],
              [sg.Text(text = "Y:"), sg.Input(default_text = "0", key = "TLY", size = (3, 1))],
              [sg.Text(text = "Scale X:"), sg.Input(default_text = "0", key = "TSX", size = (3, 1))],
              [sg.Text(text = "Scale Y:"), sg.Input(default_text = "0", key = "TSY", size = (3, 1))]  ]

can = sg.Canvas(size = (CW, CH), background_color = BC, border_width = 1, key = "canvas")

mid_screen = [  [sg.Frame("Insert Values", mid_left, expand_x = True, expand_y = True), can]  ]

layout = [  [sg.Frame("", items_files, pad = (1, 1), expand_x = False, expand_y = False), sg.TabGroup([[sg.Tab('Insert', tab2)]])],
            [mid_screen]  ]
window = sg.Window('title', layout, finalize = True)
tkc = can.TKCanvas

N = 0

OL = [0]

while True:
    event, values = window.read()
    if event in (None, sg.WIN_CLOSED, 'Exit'):
        break

    TLX = values["TLX"]
    TLY = values["TLY"]
    TSX = values["TSX"]
    TSY = values["TSY"]
    LT = 1
    FC = 'red'
    LC = 'black'

    def MakeRect():
        pum = N
        OL.insert(pum, tkc.create_rectangle((float(LXM) + float(TLX) + float(TSX)), (float(LYM) + float(TLY) + float(TSY)), (float(LXM) + float(TLX) - float(TSX)), (float(LYM) + float(TLY) - float(TSY)), fill = FC, outline = LC, width = LT,  tag = pum))
        pum = N + 1
        return pum

    def DeleteObj():
        pum = N
        tkc.delete(OL[pum])
        del OL[pum]
        pum = N - 1

    if event == 'Rect':
        MakeRect()
        print (OL)
        print (N)

    if event == 'DelF':
        DeleteObj()
        print (OL)
        print (N)

window.close()

How do you try to use the code - step by step? You run the code, and then a window pops up, right? And then where do you click, in what order? What happens when you do that? What is supposed to happen instead, and how is that different?