Skip to main content
Hydra supports both keyboard and game controller input using Apple’s GameController framework. This guide covers default controls and how to customize them.

Input Devices

Keyboard

Built-in keyboard support with customizable mappings

Game Controllers

Support for MFi and compatible controllers

Default Keyboard Controls

Hydra uses keyboard input to emulate Nintendo Switch controller buttons:

Movement and D-Pad

D-Pad / Menu Navigation
KeySwitch Button
↑ (Up Arrow)D-Pad Up
↓ (Down Arrow)D-Pad Down
← (Left Arrow)D-Pad Left
→ (Right Arrow)D-Pad Right

Action Buttons

Face Buttons (Nintendo Layout)
KeySwitch ButtonDescription
KAConfirm (bottom)
JBCancel (right)
IXLeft action
LYTop action
The layout follows Nintendo’s button positioning: A is on the bottom, B on the right, X on the left, and Y on the top.

Shoulder Buttons

KeySwitch Button
QL (Left shoulder)
ER (Right shoulder)
UZL (Left trigger)
OZR (Right trigger)

System Buttons

KeySwitch Button
Enter+ (Plus/Start)
Backspace- (Minus/Select)
SpaceCapture

Right Analog Stick

KeyDirection
TStick R Up
GStick R Down
FStick R Left
HStick R Right

Stick Click Buttons

KeySwitch Button
RL Stick Click
YR Stick Click

Additional Keys

The following keys are recognized by Hydra’s keyboard input system: Letters: Q, W, E, R, T, Y, U, I, O, P, A, S, D, F, G, H, J, K, L, Z, X, C, V, B, N, M Special Keys:
  • Tab
  • Space
  • Enter
  • Backspace
  • Arrow keys (Up, Down, Left, Right)
Modifier Keys:
  • Left/Right Shift
  • Left/Right Control
  • Left/Right Alt
  • Left/Right Super (Command/Windows)
Number keys are planned but not yet implemented in the current version.

Game Controllers

Hydra supports game controllers through Apple’s GameController framework.

Supported Controllers

PlayStation Controllers

DualShock 4, DualSense (PS5)

Xbox Controllers

Xbox One, Xbox Series X|S

Nintendo Controllers

Pro Controller, Joy-Cons (via Bluetooth)

MFi Controllers

Made for iPhone certified controllers

Controller Mapping

Nintendo Switch Layout:
Controller InputSwitch Button
AA
BB
XX
YY
Left StickLeft Stick
Right StickRight Stick
L/LBL
R/RBR
LT/L2ZL
RT/R2ZR
Start/Options+ (Plus)
Select/View- (Minus)
D-PadD-Pad
Left Stick ClickL Stick
Right Stick ClickR Stick

Analog Stick Sensitivity

Analog stick values are processed with a threshold:
  • Threshold: 0.5 (50%)
  • Stick values above 0.5 register as “pressed” for button mappings
  • Full analog values preserved for games using stick input
This threshold prevents stick drift from registering as input while maintaining precise analog control.

Input Profiles

Hydra supports multiple input profiles for customizing controls:

Accessing Input Profiles

  1. Open Settings (⌘+,)
  2. Navigate to Input section
  3. Select or create a profile

Default Profile

Hydra includes a “Default” profile with the standard keyboard mappings listed above.

Creating Custom Profiles

1

Open Settings

Navigate to Settings > Input
2

Add Profile

Click the ”+” button to create a new profile
3

Configure Mappings

Assign keys to each Switch button
4

Save

Your profile is automatically saved to config.toml

Profile Storage

Input profiles are stored in the configuration file:
[Input]
profiles = [
  "Default",
  # Profile data stored as strings
]
You can have multiple profiles for different games or play styles.

SL/SR Buttons (Joy-Con)

For sideways Joy-Con mode, Hydra supports SL and SR buttons:
Switch ButtonDescription
Left SLLeft Joy-Con SL (sideways mode)
Left SRLeft Joy-Con SR (sideways mode)
Right SLRight Joy-Con SL (sideways mode)
Right SRRight Joy-Con SR (sideways mode)
These buttons are primarily used when Joy-Cons are held horizontally as individual controllers.

Keyboard Input Implementation

Hydra’s keyboard input system (implemented in src/core/input/keyboard.hpp and src/core/input/apple_gc/keyboard.mm):

Key Detection

  • Uses Apple’s GameController framework for consistent input handling
  • Keys are mapped to GCKeyCode values
  • Supports both key press detection and axis values (0.0 or 1.0 for keyboards)

Input Processing

// Keyboard keys act as digital buttons
IsPressed(Key) -> bool
GetAxisValue(Key) -> 1.0 (pressed) or 0.0 (not pressed)

Controller Input Implementation

Controller input (in src/core/input/controller.hpp):

Button vs. Analog

  • Buttons: Return pressed/not pressed state
  • Analog sticks: Return float values 0.0 to 1.0
  • Stick inputs > 0.5 treated as “pressed” for button checks

Supported Inputs

enum ControllerInput {
  A, B, X, Y,           // Face buttons
  L, R, ZL, ZR,         // Shoulders/triggers
  Plus, Minus,          // System buttons
  StickL, StickR,       // Stick clicks
  Left, Up, Right, Down, // D-Pad
  StickL/R + Direction,  // Analog directions
  LeftSL, LeftSR,       // Joy-Con SL/SR
  RightSL, RightSR
}

Troubleshooting Controls

Check:
  • Hydra window has focus
  • You’re in-game (not in menus)
  • Key is supported (see default controls above)
Try:
  • Click on the game window
  • Check if other keys work
  • Restart Hydra
Check:
  • Controller is connected (Bluetooth or USB)
  • Controller is paired with macOS
  • Controller works in System Settings
Try:
  • Reconnect controller
  • Restart Hydra after connecting
  • Check macOS Bluetooth settings
For controllers:
  • Different controller types may have different button labels
  • Check if your controller is MFi certified
  • Try creating a custom input profile
For keyboard:
  • Verify you’re using the correct profile
  • Check for keyboard layout differences (QWERTY vs AZERTY)
Check:
  • Controller deadzone settings in macOS
  • Physical controller condition
Try:
  • Clean controller sticks
  • Adjust sensitivity in controller settings
  • Use a different controller to test

Advanced: Custom Input Mapping

For advanced users who want to modify input beyond the UI:

Editing config.toml

Input profiles are stored as arrays in the configuration:
[Input]
profiles = [
  "Default",
  "",  # Additional profile slots
  "",
  "",
]
Manually editing input profiles requires understanding the profile string format. Incorrect values may cause input to stop working.

Profile Format

The exact profile string format is managed internally by Hydra. It’s recommended to use the Settings UI for creating and editing profiles.

Emulation Shortcuts

These shortcuts control the emulator itself (not game input):
ShortcutFunction
⌘+,Open Settings
⌘+LLoad from file
⌘+TTake screenshot
⌘+OToggle handheld/docked mode
⌘+PCapture GPU frame (debug)
ESCStop emulation
These shortcuts work globally in Hydra and won’t be sent to the emulated game.

Build docs developers (and LLMs) love