We have 8 possible directions for an attack/shield, which might sometimes be used while moving. As the directions work very much the same for shielding and attacking, it didn't make sense to us to bind them separately. We had three main options.
We could put the direction on the keyboard, tied to the same keys that movement is, WASD, which is what Hollow Knight does, but, unlike it, we have a shield and 8 directions an attack could go, against Hollow Knight's four. We also do want the shield to be used in some puzzles where a projectile needs to be deflected to the right place to progress, and forcing the player to be moving to aim in diagonal directions made the controls feel imprecise, and the player ended up feeling like the challenge wasn't so much in figuring out what to do, but rather, in making the character behave as intended. Overall, this path made the controls feel clunky.
We could put the choice of a direction in a different set of keys, maybe IJKL, but that would mean having 8 keys just for moving and attacking, plus the ones we need for jumping and dashing, and that's a lot of keys. Considering we'd also need a way to differentiate between shielding and attacking, we'd either need a different set of keys for each action, or require the player to hold another key when shielding. Neither option seemed great, far too many buttons to be pressing, so we ended discarding the keyboard entirely for attacks and shields.
The mouse seems like the best option. It's made for pointing, the player doesn't need to memorize any complicated input to learn how to direct an attack, and as the actions that need be pointed are two, attack and shielding, they fit quite nicely in the mouse buttons.
As for a controller, we do want to support that, but not make it mandatory, as this game is being developed for pc first, and there's no guarantee the player will have a controller at their disposal (not to mention the headache that using a controller on pc can be at times). We are focusing on getting the game to control well with keyboard and mouse first.