Android HOW to code 'WASD' controls on CHROMEBOOK??

JesterOC

Member
So my friend has a Chromebook and has been helping me test my project...
I have WASD code using the keyboard_check() function as such:
Code:
var W = keyboard_check(ord("W"));
that works on PC, but somehow fails on Chromebook?
I trieded changing it to:
Code:
var W = keyboard_check_direct(ord("W"));
but apparently that doesn't work either...

Anyone got any ideas/suggestions on what to do? I'm stumped.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
I seem to remember some platforms use the lower case W when using ord(), have you tried that?
That should NEVER be the case and if it is then it's a bug and someone should make a test project proving the issue and letting YYG know...

As for the issue with the keyboard... How are you running the game on the Chromebook? Natively, Chrome OS doesn't run EXE files, so what are you doing to have it run on the device? Are you using the Linux export instead as I believe that could run (assuming you have the correct dependencies installed)? Or are you building an Android app? If it's Android, then keyboard input just won't work as that export does not support the keyboard events... That said, you can debug the input from the keyboard using keyboard_string or keyboard_lastchar to get the letter/code for what keys are being pressed. It may be that you can simply parse and clear keyboard_string every step to get the input and make it work on both platforms.
 

JesterOC

Member
As for the issue with the keyboard... How are you running the game on the Chromebook? Natively, Chrome OS doesn't run EXE files, so what are you doing to have it run on the device? Are you using the Linux export instead as I believe that could run (assuming you have the correct dependencies installed)? Or are you building an Android app? If it's Android, then keyboard input just won't work as that export does not support the keyboard events... That said, you can debug the input from the keyboard using keyboard_string or keyboard_lastchar to get the letter/code for what keys are being pressed. It may be that you can simply parse and clear keyboard_string every step to get the input and make it work on both platforms.
Compile Android .apk, so looks like I'll have to parse keys for android? Thats so lame tho, what if the player wants hold down 2 keys?

This sounds do-able... Though quite a pain... šŸ‘šŸ¤ 

Thinking maybe i could write an Android extension? Just to detect WASD proper on Chromebook...
 
Top