My excavator keeps turning off as soon an I let the key go. I’ve checked the fuel pump and the ignition system but they are working fine.
Key switch need to be replaced
Are you allowing the key to "snap" back? It may be jumping past ignition on to the off or accessory position . Or are you saying it will start and run but only while cranking?