On Android, with Unity how do I get the status of caps lock, scroll lock and num lock LED's and blink these LEDs for caps lock, scroll lock and num lock from Unity 3D?
Blinking the LEDs will of course enable caps, num or scroll lock.
On Android, with Unity how do I get the status of caps lock, scroll lock and num lock LED's and blink these LEDs for caps lock, scroll lock and num lock from Unity 3D?
Blinking the LEDs will of course enable caps, num or scroll lock.
Unity3D's Input class has no function for firing a keypress, only reading it.
You'll need to find some other solution to emulate keypresses. Which on other platforms isn't all that easy ( Windows w/ user32.dll hook, MAC OSX (similar to Windows), Linux with xdotool ).
On Android these won't do (as while Android is Linux, it probably won't work with xdotool as there's no X windowing system). My proposal would be to use a Java program with this code and call it from the JNI from C#.
EV_LED
is written to the device. The hid-input driver handles this automatically. At the time of this writing, Android uses LED_CAPSLOCK
, LED_SCROLLLOCK
, and LED_NUMLOCK
. These LEDs only need to be supported when the keyboard actually has the associated indicator lights." Not a complete answer since it doesn't address how to write to EV_LED
from Unity..
\$\endgroup\$