user42227: I am trying to make a launch controller, which will turn on with a key. Like the one in this photo below: 


user28569: A key switch is just a normal switch. What you do with it depends on how you wire it and code for it.

user31105: Check for example here for a key switch (see picture below).
As you can see it has two pins. If the pins are connected the switch is closed (same like a normal switch). So you can just connect one wire to VCC / 5V and the other via a high value resistor to a GPIO pin and check for LOW or HIGH.
(note: in practice it's possible to use almost any (electric/mechanical) component as long as the number of pins is not too high to be reasonably used by an Arduino).


42227: <p>I am trying to make a launch controller, which will turn on with a key. Like the one in this photo below: </p>

<p><a href="https://i.stack.imgur.com/y5D79.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y5D79.png" alt="Switch Controller"></a></p>
 28569: <p>A key switch is just a normal switch. What you do with it depends on how you wire it and code for it.</p>
 31105: <p>Check for example <a href="https://www.aliexpress.com/item/1pc-mini-key-switch-Lock-Switch-Security-Power-Locks-phone-switch/32799985398.html?spm=2114.search0104.3.86.1e172335PfIKpH&amp;ws_ab_test=searchweb0_0,searchweb201602_5_10065_5024915_10068_318_319_317_10696_450_10084_10083_10618_452_535_534_10304_533_10307_10820_532_10301_10821_204_10843_10059_10884_323_10887_100031_320_321_322_5728515_10103_448_449,searchweb201603_35,ppcSwitch_0&amp;algo_expid=24658571-3e24-48b0-bd58-540bb5cb5392-12&amp;algo_pvid=24658571-3e24-48b0-bd58-540bb5cb5392&amp;transAbTest=ae803_4" rel="nofollow noreferrer">here</a> for a key switch (see picture below).</p>

<p>As you can see it has two pins. If the pins are connected the switch is closed (same like a normal switch). So you can just connect one wire to VCC / 5V and the other via a high value resistor to a GPIO pin and check for LOW or HIGH.</p>

<p>(note: in practice it's possible to use almost any (electric/mechanical) component as long as the number of pins is not too high to be reasonably used by an Arduino).</p>

<p><a href="https://i.stack.imgur.com/iWQtW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iWQtW.png" alt="enter image description here"></a></p>
