Get a Grip: Substituting Gamepads for Keyboards and Mice

DZone 's Guide to

Get a Grip: Substituting Gamepads for Keyboards and Mice

Trying to use a gamepad instead of KBAM? Gamepad API uses JavaScript to enable controller support in HTML5 games. Plus, we'll look at Xpadder, Pinnacle, and JoyToKey.

· Integration Zone ·
Free Resource

Confession time: I grew up gaming primarily on consoles. Wait, no come back! Don't leave! Before you click that red x and grumble "PC master race," just hear me out. My first foray into gaming was on my friend's N64 back in the day, and involved a lot of flying off the side of Rainbow Road. The first console I ever owned was a Playstation 2, which I still have and miraculously functions as it did on day one. Even as I've migrated more towards PC gaming, there's one aspect of consoles I definitely prefer: gamepads.

For me, it's more relaxing and comfortable to play on the couch, or relaxing in bed. As wonderful and accurate as the keyboard and mouse (KBAM) combination is, it's not conducive to couch-based gaming. Thankfully, more developers are implementing controller support, which I've utilized with my Xbox 360 controller on my PC. Valve's Steam controller offers a delightful, and pleasantly surprising hybrid controller/KBAM fusion.

If you're like me, there are some sweet options for swapping your keyboard and mouse for a gamepad:

Xpadder -- Among the gaming input device programs, Xpadder is one of the most widely used, and there's a reason. It's comprehensive and simple to use. Mapping keys to buttons couldn't be easier. There's a catch though: the older version of Xpadder is free, but the new iteration will cost you $10.

JoyToKey -- JoyToKey is phenomenal, and the main appeal is the advanced customization options. However, it's not for the faint of heart. Expect to slog through several menus, and be forewarned it's not necessarily the most intuitive piece of software. 

Pinnacle Game Profiler -- Looking for something incredibly user-friendly? Pinnacle is your best pick. Unfortunately it's not libre, but Pinnacle boasts compatibility with almost any gamepad you throw at it, and has profiles for loads of games to save you the time of key-mapping.

Gamepad API -- Web-based games abound, and unlike disc-based, or digital delivery games, typically these aren't compatible with gamepads. Enter Gamepad API. It's pretty recent, so don't expect it to be perfect. What's neat about Gamepad API is that is works with HTML5 games, and connects with gamepads using JavaScript. Charlie Walter has a cool write up at Smashing Magazine, complete with browser support, compatible controllers, and code snippets for getting started. It's quite a novel concept, so stay tuned to see how the project unravels. 

Happy gaming!

enterprise integration, integration

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}