armory3d/armory

Implementation of physical keyboard logic nodes

Armory-Community-Channel opened this issue · 2 comments

Currently Armory only supports keyboard controls by the letters.
However for people like me, using an AZERTY keyboard my default movement keys are ZSQD where the WSAD is on QWERTY.
On Godot this is not an issue as the is an option to use the physical keyboard so pressing W on either keyboard with (W or Z) works normally.
Can Armory get this feature too? It saves a lot of time and effort having to set up changeable key binds and settings menus to let other keyboard users easily play the games without issue.

If you're only annoyed with having to manually setup a different keymap for the viewport camera controls, Armory already supports AZERTY for viewport controls. 🙂 Go to your Blender Preferences and change the setting highlighted below for your Armory add-on.

image

Then for custom Haxe code (minus logic nodes), you can simply something like this:

#if arm_azerty
static inline var keyUp = "z";
static inline var keyDown = "s";
static inline var keyLeft = "q";
static inline var keyRight = "d";
static inline var keyStrafeUp = "e";
static inline var keyStrafeDown = "a";
#else
static inline var keyUp = "w";
static inline var keyDown = "s";
static inline var keyLeft = "a";
static inline var keyRight = "d";
static inline var keyStrafeUp = "e";
static inline var keyStrafeDown = "q";
#end

Reference: https://github.com/search?q=repo%3Aarmory3d%2Farmory+AZERTY&type=code
It would be relatively simply for someone with knowledge of coding to implement this same keymap redirect for global Haxe + logic nodes too: https://github.com/armory3d/iron/blob/main/Sources/iron/system/Input.hx
However, I'm not sure if that would be a wise idea..

I was more thinking about exported game controls. Godot has the ability to use physical keys or letter keys so was wondering if a similar thing can be implemented in Armory.