Building a toggle with a flipflop?
Use the clocked output from the switch as the clock to a control flop.







simulate this circuit &ndash; Schematic created using CircuitLab

A human pressing a button should be considered a separate clock domain. Therefore, two flops should be used to sync the input for CDC (Clock Domain Crossing). More about CDC here.