Arduino uno for car ignition key help

hi
I want to change car ignition key with arduino uno and i need e help,This key have two position one open current supply and other start engine.First press open current supply, second press open current supply and start engine with delay and if start,.ignore from alternator current low and stop starter,Third press all off.

Which make car? Which model? Which year?
A picture of the key might also help.

Thanks
My car is smart roadster 2004 with audi S3 engine modifi and immo off

I tried to modify this sketch but something i made wrong.

int switchPin = 2; // switch is connected to pin 2
int altenator = 3;
int currentSupply = 13;
int engineStart = 12;

int val; // variable for reading the pin status
int val2; // variable for reading the delayed status
int buttonState; // variable to hold the button state
int altenatorState;
int Mode = 0; // What mode is the light in?

void setup() {
pinMode(switchPin, INPUT); // Set the switch pin as input
pinMode(altenator, INPUT);
pinMode(currentSupply, OUTPUT);
pinMode(engineStart, OUTPUT);
buttonState = digitalRead(switchPin); // read the initial state
altenatorState = digitalRead(altenator);
}

void loop(){
val = digitalRead(switchPin); // read input value and store it in val
delay(10); // 10 milliseconds is a good amount of time
val2 = digitalRead(switchPin); // read the input again to check for bounces
if (val == val2) { // make sure we got 2 consistant readings!
if (val != buttonState) { // the button state has changed!
if (val == LOW) { // check if the button is pressed
if (Mode == 0) {
Mode = 1;
} else {
if (Mode == 1) {
Mode = 2;
} else {
if (Mode == 2) {
Mode = 3;
} else {
if (Mode == 3) {
Mode = 0;
}
}
}
}
}
}
buttonState = val; // save the new state in our variable
}

// Now do whatever the lightMode indicates
if (Mode == 0) { // all-off
digitalWrite(currentSupply, LOW);
digitalWrite(engineStart, LOW);
}

if (Mode == 1) {
digitalWrite(currentSupply, HIGH);
digitalWrite(engineStart, LOW);
}

if (Mode == 2) {
digitalWrite(currentSupply, HIGH);
if (altenatorState == LOW){
digitalWrite(engineStart, HIGH);
delay (300);
if (altenatorState == HIGH)
digitalWrite(engineStart, LOW);
}
}
}

if (Mode == 3) {
digitalWrite(currentSupply, LOW);
digitalWrite(engineStart, LOW);
}

manito:
I tried to modify this sketch but something i made wrong.

if (Mode == 2) { 
    digitalWrite(currentSupply, HIGH);
        if (digitalRead (altenator) == LOW){  //read the pin, not a variable.
            digitalWrite(engineStart, HIGH);
               delay (300);
               if (digitalRead (altenator) == HIGH)
       //read the pin which may have changed, not a variable that's not changed.
                digitalWrite(engineStart, LOW);
        }
}

Thank you for the reply
Now i have problem with delay how to stop (engineStart) when engine run '(digitalRead (alternator) == HIGH)'