Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's an annoying manifestation of this where some games only partially allow remapping controls. For example, when Cyberpunk 2077 was released, it was not possible to rebind to some keys or rebind some actions.

Another pattern I've noticed is some games do not respect Windows' mouse button settings. If other left handed mousers are like me and swap the primary and secondary mouse buttons, they'll probably have noticed that some games ignore this setting and seemingly hard code primary and secondary mouse buttons to be left and right click respectively. The key bindings are understandable to me because nowhere in Windows does it let me set IJKL as my WASD. But I know it's possible to get the primary and secondary mouse button config from the OS but some games ignore or are ignorant of this fact.

Wherever I rebind my keys, I usually start with movement from WASD to IJKL. For everything else, I basically mirror what the default setting is to the right side of the keyboard.

F > H E > U R > Y Q > O C > N L Tab > any of P, Colon, Apostrophe, L square bracket L Shift> any of whatever I didn't use for L Tab X > Comma or M (though comma makes more sense because my right middle finger would type that so it matches developer intention for default setting)

There's actually more keys to choose from on the right side of the keyboard that you can reach with your pinky. This is significant because in some games being able to press buttons while maintaining movement can be advantageous.



> The key bindings are understandable to me because nowhere in Windows does it let me set IJKL as my WASD. But I know it's possible to get the primary and secondary mouse button config from the OS but some games ignore or are ignorant of this fact.

I'll chip in. As a developer, Unity and Unreal don't really expose that information, and generally devs will not fetch it on their own because that requires dealing with linking to Windows libraries, rather than letting the platform deal with that. Using Windows specific libraries seems like an anti-pattern with Unity too, because now your game is no longer cross platform.


You'd think that rather than getting low-level events for "LMB Click" / "RMB Click", the Windows DirectInput API would be handing Unity events for "Primary Mouse Button Click" / "Secondary Mouse Button Click." OSes don't emit raw un-keymapped keysyms to apps, so why are they emitting raw un-mapped mouse-syms?


Unity APIs have always been an incomplete mess.

Big sprawling projects will do it themselves, with a proper action dispatch pattern somewhere, and small indie projects will do it the basic way, like so:

https://docs.unity3d.com/ScriptReference/Input.GetMouseButto...

Meanwhile Unity has tried releasing several different input management solutions, none of which are particularly popular. With more exotic stuff like XR/VR or Steam Input it's even more of a mess.


Time to either lobby for Unity and Unreal to implement it, or to use something better.


I genuinely was not aware that Windows lets you swap the left and right mouse buttons, and I've been building Windows games for nearly 20 years. Thanks for calling that out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: