Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Schloss der Wölfe

A minimalist WW2 FPS with a classic horror twist. · By David Lindsey Pittman

Layout-independent keyboard controls?

A topic by Guntha created Nov 23, 2023 Views: 181 Replies: 3
Viewing posts 1 to 4

Hi, I've been delighted to play this game as well as your previous ones and enjoyed how clean it feels overall.

Even though it's all about mercilessly killing Nazis, there's something about it that makes you want to hide in shadows and peak around corners :p

However, there's still one thing that's still bugging me and also happens in your previous games: since I'm playing on an AZERTY keyboard, the first thing I have to do before playing every one of your games re-binding the controls to assign movement to ZQSD instead of WASD, even though Windows is perfectly capable of reporting keys based on their position on the keyboard, independently of the layout ( https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#sc..., and I assume there's something similar on Linux).

Would it be possible for you to fix this in the next game, or update the existing ones if you're motivated enough?

Thanks for making this!

Developer (1 edit)

Hey Guntha, thanks for bringing this to my attention. I'll look into it for future games.

Since I'd still want to support rebinding (and display the correct key names), I think I'd still want to use virtual keycodes, but I could use scancodes to initialize the default bindings? Could you suggest some games that have the behavior you'd want, and which also support rebinding, so I can research how they work?

Thanks!

Hi David,

It's hard to remember which games do it right, usually the first time you launch a game, you either rebind the controls, or are pleasantly surprised they already work as expected, and then you forget about it.

Also, for some big games, you can't know for sure if they use scan codes or if they change the default bindings based on localization; for example, I know that when you set Sniper Elite 4 in Simplified Chinese, its controls menu will display key names in Chinese, even when the same Windows machine would still return English names.

I happen to know that Mad Tracks ( https://store.steampowered.com/app/1202970/Mad_Tracks/ ) does it how I expect (because I was tasked by my company to make a Steam update for it a few years ago; and it's not something I added, it was already correct back in 2006! Probably because it's a French game and we have to care about this stuff.): I launch the game without any options saved, first with my original keyboard layout, it displays "ZQSD" for Player 1 controls, I leave the game, switch my keyboard layout (with Alt+Shift), relaunch the game, go back to the Controls menu, it shows "WASD" for Player 1 controls.
Actually, the fact that it uses Windows' driver's key localization was an issue for us (for one Chinese publisher, we had to never display any non-Chinese text, and we were not sure how the controls menu would behave on Chinese users' machines, so... we just removed the menu. It's mostly a controller game though.)
Anyway that's closed source so you can only test the behaviour.

I also know that in Godot, the Controls in the Project Settings suggest 3 modes: key codes, "physical key codes" (which I assume are scan codes under the hood on Windows), and the actual key's letter:

I don't know how games manage to display the key names though.

Hope this helps, and that I didn't bury the useful information too deep under my life stories.

Developer

Thanks so much for all the useful information! I'll try to get this right in my next game.