How to code input.

Hi, i’m new to scripting and i’m still trying to learn to code efficiently. so far i have a small list of possible inputs inside my character script’s ‘update’ function. one for the flashlight, kicking, interacting, picking up objects. its a small list but as my game grows and the amount of keys the player has access to increases the game will just constantly be checking every update to see if they are pressing the 20-30 some keys they can press. is there a better way to do this? or should i just keep them all lined up in the ‘update’?

This won’t make any performance problems arise unless you have a really crappy computer lol. GetKeyDown only returns true if the user presses the key. Otherwise, nothing is going on that would affect performance.