How to setkeycodes at boot?

Hello comunity,
for my lenovo yoga13
in console i have to run the following command as sudo:

sudo setkeycodes e03e 255

i would like to do that automatically.

I tried the following:

  • a) running as a service, but i suppose the service sometimes starts to early so it fails sometimes. I tried under section [service]

no success

  • b) with a shell script but it failed becauese i do not know how to execute a shell skript with sudo rhigts

any ideas? Thank you