1 year ago

#372383

test-img

JFerro

python ipywidgets button clicked with CONTROL combination

The typical way to create a button in python with widgets is as follows:

button = wd.Button(description = "Click")
output = wd.Output()
display(button, output)

def on_button_clicked(b):
    with output:
        print("button clicked")

button.on_click(on_button_clicked)

when clicking the button the corresponding method runs.

Is it possible to distinguish between simply click and CTRL+click? i.e. having like two methods,on_click, or on_CTRL_click

thanks

enter image description here

python

button

ipywidgets

0 Answers

Your Answer

Accepted video resources