The command property of a menuitem defines the callback to run when an item is activated by click or a key event.