side of the sewing machine m indicates a machine motor cont indicates a controller 121 denotes a switch for the motor and its contact 121 39 is positioned at the side of the controller cont when the clutch solenoid 9 in fig1 is not energized and is positioned at the side of the electric source when solenoid is energized the switch 138 operates to cut the controller circuit off from the machine motor m when the solenoid 133 is energized 10 v 20 v are dc supplies for the control source and the solenoid driving source as is shown in fig1 fig1 shows a control circuit in which sa to so indicate pattern selecting switches provided on the outer side of the sewing machine each corresponding to the stitch patterns sewn by the sewing machine and each being normally opened the switches sg and so serve respectively for selecting a first half step of a buttonhole composed of a first bar tack stitch and a left side line tack stitch and a second half step of the buttonhole composed of a second bar tack stitch and a right side line tack stitch the marks h and p which are exluded from the switch indications are as will be described herein made to correspond to the left line tack stitch and the right line tack stitches which are mechanically selected without operating the selecting switches l indicates a latch circuit having input terminals p1 p4 which receive inputs from the switches sa to so which inputs are encoded by.