Skip to content

eh-am/fightcade-gamepad-navigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fightcade Gamepad Navigation

Control the Fightcade frontend with a gamepad (or a keyboard).

fightcade-720.mp4

Motivation

I have Steam Deck docked and plugged to a TV and an Arcade Stick, so I wanted to control the Fightcade frontend with only the stick, without requiring a keyboard/mouse.

How to use

Installation

Download the latest Release.

Then copy the inject.js app to "INJECT_JS_PATH", which depends on the OS/way of installation:

  • On steam deck (no flatpak), it's under /home/deck/Documents/Fightcade/fc2-electron/resources/app/inject/
  • On a mac, it's under /home/deck/Documents/Fightcade/fc2-electron/resources/app/inject/

Running

Open Fightcade, then press any button for the plugin to recognize the controller, a notification message should tell the controller has been recognized.

Then navigate with the D-pad (or equivalent). By default, BUTTON_1 is translated to "Enter", and SHOULDER_LEFT and SHOULDER_RIGHT to Shift+Tab and Tab, respectively.

Caveats

  • It only handles the frontend, ie not the emulators part. So initial setup for the inputs still requires a mouse/keyboard.
  • It relies on the DOM structure, so if it ever changes, it will break and require updates. PRs welcome :)

Strategy

The approach is to make everything more keyboard accessible, and then translate gamepad inputs to keyboard events.

Acknowledgments