Okay, so, for anyone reading this, I fixed it by doing these steps:
1. Making sure the keyboard layout is consistent across all systems (at least the main one)
2. Uninstall and reinstall your keyboard drivers
3. The third and final step that worked for me: go to your KSP main settings, and go to Input > Layout. Check if the keyboard layout matches up with the one you're using. If it doesn't, change it to the correct one. (For example, mine was set as US Dvorak when I use US QWERTY.)