Open QuintillusCFC opened 2 years ago
This is done in the godot4 branch with pr https://github.com/C7-Game/Prototype/pull/405
Not sure about closing this just yet as there's a configuration element that's still unimplemented. Maybe a follow-on task?
I'm not sure this is finished on the Godot branch - I use Colemak keyboard and shortcuts are based on the position in the Qwerty keyboard. Shortcuts like Enter, Esc, etc, all work. However, if I want to build a road with a worker, I need to press "P", which is located where "R" is on Qwerty. Wouldn't setting the key bindings to the "Unicode" setting automatically make other (English) keyboard layouts work? I did some testing and that seemed to make key bindings work for me. @pcen thoughts on making this change?
I'm not sure this is finished on the Godot branch - I use Colemak keyboard and shortcuts are based on the position in the Qwerty keyboard. Shortcuts like Enter, Esc, etc, all work. However, if I want to build a road with a worker, I need to press "P", which is located where "R" is on Qwerty. Wouldn't setting the key bindings to the "Unicode" setting automatically make other (English) keyboard layouts work? I did some testing and that seemed to make key bindings work for me. @pcen thoughts on making this change?
I didn't test on anything except the macbook keyboard, in fact I had no idea there's a unicode setting. Sounds like a great change!
I'm all in favor of improved portability. Eventually there should be an in-game keymapping utility, but for now at least a single place in code to statically assign all keycodes.
At some point we should generalize our keyboard shortcuts. Currently, many of these are configured in UnitButtons.cs (although there will eventually be a wider variety of other ones, e.g. Clear Map), and they are hard-coded to specific keys. This works great if you are used to the QWERTY layout and the English version of Civ, but if you have different layouts or languages, it may not be intuitive.
This item is to make a generalized system, so the configuration can be loaded from some sort of settings file, with the default one corresponding to English + QWERTY. Once that is set up, we can work with the community to create additional default options; for example there's an active German civ community that can likely contribute sensible defaults for that version fairly quickly once we can load them from a config file.