Yes, keyboards are tournament legal. There is no reason why they should not be. If you think having many keys gives you an advantage, most fighting games do not even utilize all of the buttons on an arcade stick. Thus, the number of keys on a keyboard is overkill. However, the question is still valid. It is uncommon to see keyboards at fighting game tournaments, and it is still in good practice to check a specific tournament’s rules. Otherwise, there is an issue with SOCD cleaning when it comes to unorthodox controllers.
What is SOCD?
SOCD stands for simultaneous opposing cardinal directions. Tournaments that ban unorthodox controllers do so in fear of those controllers unfairly allowing you to register two directional inputs at the same time.
If you press back and forward at the same time in Street Fighter, you may end up blocking both directions, which is not meant to happen. If your controller does not have SOCD cleaning, you might be able to pull off this usually impossible feat. Fortunately, this is rarely a concern with keyboards.
Fun fact: there has already been at least one competitor at EVO, the most prestigious fighting game competition, who was a keyboard user.
But why keyboards?
While keyboards are generally tournament legal, consider stepping up to mixboxes, which are a hybrid between keyboards and arcade sticks. Essentially, you get arcade buttons on the right complemented by WASD keys on the left. The trend started with the Mixbox.