I am making a custom controller which emulates a keyboard using additional software (AACKeys). I can see that the controller is working fine, since I can see the keys I send from the controller in various applications like notepad or in web sites(https://typewritesomething.com/). Unfortunately, I can’t make the keys to work in the HTML5 game from GDevelop. It’s doesn’t read the keystrokes unless I use the real keyboard on my PC. I have tested this on win7 and win10 using Firefox and Edge.
The AACKeys software reads ASCII characters from the serial port which translates into keystrokes. It’s a pretty basic application and it working without any issues on win7 and win10 setups.
Anyone has a clue how the keyboard is handled in GDevelop or what I should try?
The keyboard and the gamepad are two different things.
The keyboard is native in the game, it’s bundled with electron (electron is a chrome browser for portable app used in GD as base for run your games.)
And the gamepad used an API in this electron. This API is dedicated to the gamepad only.
With your have you tryed to type here ?
Can you write with your keyboard in Discord ? (discord use electron) Can you type on character here and show me the result.
Maybe your keyboard return a special character and this one cannot be read by the engine.
I said maybe.
I tried both links (not the Discord app though) and I could type/see the characters using the custom controller. No special characters while testing on the second link. I also tried playing around on w3school with some examples that involved a keyboard and it was also working fine.
Well, I did try that at some point. I could see the characters as I was typing on the keyboard, but when using the custom controller I didn’t receive anything.
I am using the Developer tools to debug the game at the moment and I can see that if I enable ‘Event Listener Breakpoints’ I do get the breakpoint to trigger on ‘runtimegame-pixi-renderer,js’ when I use the custom controller. I can also see that the key is correctly identified (it’s d):
I had to switch from “Key pressed” to “Key released” event in the code to make it work with the custom controller. Not sure why it works though, any ideas?
Excuse me Steliosm for spamming your post but what is “Developer tools”.
I see it works in twin with GDevelop but i don’t know what it is and how to get it.
Is it a Javascript tool?