Question Laptop shutdown after any key press

Aug 30, 2020
My HP Spectre x360 Laptop shutdown after any key press in 'bios setup' mode, 'Command prompt' and windows 10 startup through 'hello face'. I disconnected keyboard flat cable and using my laptop with external keyboard. My question is, is it the faulty keyboard or some short in the motherboard itself. "num-lock" key LED stopped functioning few days before this 'shutdown' problem. Also, laptop was shutdown when I press 'volume' buttons at the side of laptop and they are functioning normally after disconnection of flat cable of keyboard. Appreciate your valuable guidance as to whether purchase replacement keyboard or is it any other fault/short on the motherboard.