A little update on the topic: I now have a working implementation of a modified version of USBKeyboard.js ( modified to handle FR layout & "high-type" feature* )
It could be used as a drop-in replacement for USBKeyboard module, and while it's a little bit bigger, it's quite nice to use ( at least to my taste ;p )
*the main goal, aside from having a layout that maps to my keyboard key mapping, is to be able to 'type' stuff while not taking care of which modifier flag(s) have to be set for some specific character: just '.htype()' & this 'll be handled internally :D
Support for accents & additional characters is to be added in a near future ;)
Side note: it seems the ™ character isn't supported in the Espruino IDE ? ( it prints "?", which isn't the mapped key ? .. )
Now onto testing "mixed" device ( appearing as a keyboard + mouse combo ) on it & then on puckjs, I hope this 'll be helpful to some folks out there ;P
+
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi there !
A little update on the topic: I now have a working implementation of a modified version of USBKeyboard.js ( modified to handle FR layout & "high-type" feature* )
https://github.com/stephaneAG/serialToWebsockets/blob/master/USBKeyboard2.js
It could be used as a drop-in replacement for USBKeyboard module, and while it's a little bit bigger, it's quite nice to use ( at least to my taste ;p )
*the main goal, aside from having a layout that maps to my keyboard key mapping, is to be able to 'type' stuff while not taking care of which modifier flag(s) have to be set for some specific character: just '.htype()' & this 'll be handled internally :D
usage examples:
Support for accents & additional characters is to be added in a near future ;)
Side note: it seems the ™ character isn't supported in the Espruino IDE ? ( it prints "?", which isn't the mapped key ? .. )
Now onto testing "mixed" device ( appearing as a keyboard + mouse combo ) on it & then on puckjs, I hope this 'll be helpful to some folks out there ;P
+