Linear mechanical switches