Because the keyboard seems to work off and on may indicate a hardware issue.
To test if it is a driver issue you could see if the keyboard works in the BIOS
If the keyboard does not work in the BIOS then most likely a hardware issue.
https://www.asus.com/ca-en/support/FAQ/1013015/
Don't make any change is the BIOS just hit the Escape key or a Function key that won't change anything and see if it works
Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.