Skip to content

Input improvements - #250

Merged
marchc1 merged 7 commits into
SourceDotNET:mainfrom
spacevx:input-improvements
Nov 12, 2026
Merged

marchc1 merged 7 commits into
SourceDotNET:mainfrom
spacevx:input-improvements

Conversation

@spacevx

@spacevx spacevx commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

While using Source.NET on an AZERTY keyboard I noticed the default key to run/move was Z instead of W like in gmod
While fixing that I ended up fixing a few other input things

  • Windows keys now follow the keyboard layout like gmod, and menus use the Windows virtual key

  • Linux has nothing to change normally

  • macOS now uses the same key mapping as gmod. (NOT TESTED!!), only checked against inputsystem.dylib and launcher.dylib in IDA (I can remove it if no one can test it)

  • Input state is only reset when the window loses focus. Which is how it's working in gmod and also checked in obsolete-source-engine

  • F1-F12 now run their binds in the main menu, so F10 (by default on azerty it's ` and not F10) opens the console like in gmod

Note: in some places obsolete-source-engine doesn't match what gmod actually does (it has -nonqwerty on Linux and goes through SDL on macOS, gmod has neither), so I prioritized gmod implementation/logic

@spacevx
spacevx marked this pull request as draft November 12, 2026 16:01
@spacevx

spacevx commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

I also fixed the Keyboard tab in the options

The Keyboard tab was empty in game, the map pakfile was returning a size of 0 for files it doesn't have, so kb_act.lst was never read

Changing a key now actually binds it and saves it (apply/unbind/defaults were never ported)

config.cfg is now written like gmod (on startup, on quit and with host_writeconfig), also added unbind, bind_mac, unbind_mac and host_writeconfig_lua

Lua archived convars (client.vdf / server.vdf) were never saved because of a KeyValues bug, and the KeyValues text writer was writing broken files

Didn't do the steam cloud logic as i don't know if it's really useful and something you want/can implement?

@spacevx
spacevx marked this pull request as ready for review November 12, 2026 16:59
marchc1
marchc1 previously approved these changes Nov 12, 2026

@marchc1 marchc1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only could find this

@marchc1
marchc1 merged commit eda217a into SourceDotNET:main Nov 12, 2026
16 checks passed
@spacevx
spacevx deleted the input-improvements branch November 12, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants