Best arduino to write code in javascript and use it as an HID device

Sorry if i'm writing to the wrong place(if it is the moderator please move it where appropriate).

So what i want to do is take an arudino(totally a noob with it) and get a usb extension board for it. Then plug my usb keyboard into it and plug arduino in my ps4. And here comes the questions: 1) can i totally override info about hid device eg arduino like this: { vendorId: 9390, productId: 8194, path: 'USB_24ae_2002_fa130000', serialNumber: '', manufacturer: 'RAPOO', product: 'RAPOO 5G Wireless Device', release: 4097, interface: -1, usagePage: 1, usage: 2 } // just for example - dumped from my work pc 2) would this be enough to override this info to make a fake dualshock gamepad if hid device eg arduino will send and receive the same buffer as dualshock gamepad.

Also i already have some experience in LiveScript/CoffeeScript(both compiling to javascript) and node js and a bit more then basic knowledge on how to use terminal in OSX/Linux, also had some experience with raspberry pi and switching it's pins(obviously much easier than working with arduino) so i want to use my scope of knowledge and not dig into c language(even though my daywork is objective-c developer) but write code in javascript for arduino; i'm aware of johnny-five project on github. So my next question is which arduino will fit best for this simple requirements: full override of main usb for use with ps4 as hid device eg dualshock 4 and writing code in javascript. Totally not trying to save any money on cheaper arduino model, but just want to make sure i don't buy something which exceeds my needs for this current project.

Hope what i wrote sounds clear to you guys to give me right advices or directions or links to what to read. Sorry my english is bad - not a native speaker.

You can only program an Arduino with C/C++

I don't know anything about re-programming USB devices - but I don't think it is a job for the inexperienced.

...R

Done some reading just before writing this post and possibility to override the hid info and read/write to buffer stream are possible with most of boards which have ATmega8u2 on board. Or for example arduino micro with ATmega32u4 can present itself to computers both as COM port or HID device (this info are on my local arduino dealer site). But what i wanted to know is how much can i redo it. Also some fast googling leaded me to this project on github https://github.com/NicoHood/HID which tells which devices compatible and allows to do what i want, but still need to read a lot and dig into details to be sure it's possible to do what i want fully without a headache, so thats why i'm asking in hope for someone more experienced with arduino than me.

And about javascript coding for arduino like check this(yep mistaken seems like it's only a case when i have a pc controlling arduino over serialport and gaining control over it's pins): https://github.com/rwaldron/johnny-five (which i mentioned from the start) https://www.npmjs.com/package/arduino-firmata (npm package to control arduino from pc)

And i'm not a newbie to C/C++ just don't really like to use them as need to keep mind on memory management and lots of stuff not needed in other languages i know so hoped there is a way to do it without it but seems that it's not an option.

igormuzyka: And i'm not a newbie to C/C++ just don't really like to use them as need to keep mind on memory management and lots of stuff not needed in other languages i know so hoped there is a way to do it without it but seems that it's not an option.

Nice thing about the Arduino is there is very little memory to manage. The Arduno IDE makes programming fairly painless.

...R

PS I only use C/C++ because I have no choice.