2 diodes conneccted to circuit input middle to input
others to ground and + power supply culd prevent static damage . Actually there are such diodes inside the mcu , but I suppose they could not drive either the static voltage or static shortcircuit current - there will be damaged . Actully it is better to prevent circuit first ,
becausse in some case damage can also be done by not only static electricity but by let dsay mobile phones placecd closed to your mcu . So even perfectly combined materials will not help , or another method could be to use high impedance resistors discharging the static electricity but not affecting circuit , or zener or other type of protecting
components . Also it iss possible to connect keyboard not directly but through resistors and following them diodes as mentioend above or we can avoid diodes as well - as the input impedance is high resistors will not affect input input signal but will reduce static discharge current and protecting diodes ion mcu chip will be enough to handle discharge current . These methods can be combined to find relevant and cheapest solution .