Given n wires you can have them in 2n different states.
So with 4 wires you can have 16 states. You have to reserve a state for "nothing pressed" so you get
2n -1 keys
Given n wires you can have them in 2n different states.
So with 4 wires you can have 16 states. You have to reserve a state for "nothing pressed" so you get
2n -1 keys