while you're in a state of walking forward without w pressed, quickly type -forward in the console and see if you stop. if you do, then while still in a game (important) do bind w +forward. now try to walk forward. if it persists, check any and all configs in /cfg and /custom that deal with movement or "forward" cvars.
if nothing, consider closing every user-run program on your machine down to the barebones windows processes and services and launch steam/tf2. give it a try
if it's still not working, first you should fully refresh tf2. this way is similar to a full reinstall but technically more thorough (except you get to keep your screenshots, demos, replays etc) and with less time downloading shit
1. disable steam cloud for tf2 if not done already
2. temporarily delete/move/rename the following:
- steam\userdata<yoursteamid>\440\remote\config.cfg (this regenerates every time you launch tf2 if you have steam cloud disabled globally, but not if you have steam cloud enabled globally and tf2 steam cloud disabled. valve pls fix)
- tf\cfg (the entire folder, not just config.cfg)
- tf\custom
3. reverify the integrity of tf2's game files
4. remove all launch options and add -dxlevel 95 -default -autoconfig +quit, launch, then remove all of it and keep it empty
5. launch the game for real and give it a go
------
if nothing still, try to purge and reinstall + experiment with your keyboard driver (attempt at your own risk):
1. disable the windows update service through services.msc to be sure you won't have another one automatically installed (re-enable after you're done with everything)
2. uninstall your proprietary keyboard driver software if any and restart windows
3. boot back in and navigate to device manager. right click every keyboard driver, navigate to the details tab and copy every instance of the topmost "hardware id" to a text file in case you can't get it back.feel free to copy all if paranoid
4. uninstall the device driver(s) now through device manager and reboot your computer. windows might install the driver before you reboot (from a generic driver repository in the windows folder) but do it anyway just as a safe measure
if they don't install or you can't use your keyboard (highly doubtful), search (using windows on screen keyboard) the make and model number of your keyboard online (probably on a visible part of your physical keyboard). if you're really not sure, use the hardware id's you recorded to search online and figure out what driver will work with your keyboard. only find a driver from your manufacturer's website (not from some other site, please be certain). most likely your keyboard will work just fine with the generic HID compliant driver provided by windows, but if not you might want to do a system file check (cmd.exe as admin: sfc /scannow). if none of that works just re-enable windows update and check for updates
5. run tf2 and test (assuming you've fully refreshed tf2 as per above)
after testing tf2 with the generic windows driver, now install your keyboard manufacturer's drivers if any and see if it's broken. if the generic works fine but proprietary don't, try the above steps repeatedly but with older/newer versions of your prop drivers
it's always possible windows update fucked something, in which case i can only tell you to try and revert until you figure it out. but again, do this at your own risk
other useful tools:
- cmd.exe as admin: sfc /scannow (check windows files for errors)
- cmd.exe as admin: chkdsk /R C: (replace C with your system drive and the drive that holds tf2. this may take a while)
- services.msc and the task manager (view as admin "for all users") can reveal a lot about what is running on your system and what could influence certain functionality (do be careful)
gl