Can I reinstall macOS using only an external keyboard?
Yes, it’s straightforward. Connect any USB or Bluetooth keyboard before you start, then turn on the MacBook Air and immediately hold Command + R on the external keyboard to boot into macOS Recovery. Use Disk Utility to erase the drive, then reinstall macOS — the external keyboard works throughout. If the internal keyboard is shorting, unplug its ribbon cable or cover it to prevent interference.