The application relates to a method for controlling an auxiliary function by a control element in an electronic control system of an agricultural machine, the method comprising displaying a virtual control element configuration menu, receiving user configuration input for mapping at least one virtual control element displayable on the display to an auxiliary function of the electronic control unit, mapping the at least one virtual control element to the auxiliary function of the electronic control unit according to the user configuration input, displaying the at least one virtual control element receiving user control input for the auxiliary function, and generating a control signal mapped to the auxiliary function. Furthermore, an electronic control system and a computer-readable medium are disclosed.