There is a 3DS emulator, however it's very buggy and can play very few games.
What I meant was using my 3DS as a controller for a PS2 emulator. I got all the buttons working, but the c-stick is the only thing not functioning x.x
I've googled, and found a few helpful answers, but not to the extend where I can do it, so I thought I'd ask here!
Also, if you're still curious about the 3DS emulator, search up Citra 3DS
I also misspelled the title; it's JoyToKey