JoyShockMapper Documentation

repository·master·Indexed 19 days ago

https://github.com/electronicks/joyshockmapper

A tool for high-performance use of modern game controllers (DualSense, DualShock 4, JoyCons, Pro Controllers) on PC, specializing in 3-axis gyroscope mapping for gyro-aiming. Features include a real-time configuration console, support for digital and analog input mapping to keyboard/mouse, tap and hold bindings, action modifiers, and configuration file loading for Windows and Linux.

Tokens
20.8K
Snippets
69
Records
101
Agent score
67%

What's inside JoyShockMapper

  1. Configure Digital and Scroll modes

    master

    NO_MOUSE

    Uses the stick's UP, DOWN, LEFT, and RIGHT bindings in a cross gate layout. Includes a small square deadzone to ignore minor movements.

    SCROLL_WHEEL

    Turns the stick into a rotating scroll wheel.

    • Behavior: Rotating counter-clockwise pulses Left bindings; rotating clockwise pulses Right bindings.
    • Setting: SCROLL_SENS controls the amount of degrees required to trigger a pulse. Note: A higher value makes it less sensitive.
  2. Use Action Modifiers for complex bindings

    master

    Action modifiers are symbols added before the key name to change how the key down and key up actions are handled.

    ModifierSymbolBehavior
    Toggle^Alternates between applying and releasing the key at each press.
    Instant!Sends the key up action immediately after the key down, making it appear instant.
    Release-Simply sends the key up action (useful for clearing toggles or premature release).

    Note: Each binding can only have one action modifier.

  3. Configure the Autoconnect feature (SDL version)

    master

    In the SDL version of JoyShockMapper, the Autoconnect feature monitors connected controllers and automatically runs RECONNECT_CONTROLLERS when a new device is detected.

    Commands:

    • AUTOCONNECT=OFF: Disables the automatic reconnection feature.
    AUTOCONNECT=OFF
  4. Configure HYBRID_AIM mode

    master

    The HYBRID_AIM mode combines traditional stick behavior (position sets cursor speed) with positional behavior (stick travel sets cursor travel). It provides a high dynamic range, allowing for both precise small movements and fast turns.

    Key Settings

    • STICK_SENS (default 360.0): Speed of camera movement based on stick position.
    • MOUSELIKE_FACTOR (default 90.0): Speed of camera movement based on stick travel.
    • RETURN_DEADZONE_IS_ACTIVE (default ON): If ON, feels more like a traditional stick. If OFF, more responsive but harder to hold still.
    • RETURN_DEADZONE_ANGLE (default 45.0 degrees): Angle from center where output is set to zero.
    • RETURN_DEADZONE_CUTOFF_ANGLE (default 90.0 degrees): Angle where the return deadzone effect ends.
    • EDGE_PUSH_IS_ACTIVE (default ON): If ON, mouse-like movement continues when hitting the outer deadzone (edge push).
  5. Use Modeshifts to reconfigure the controller

    master

    Modeshifts allow you to reconfigure controller settings (assignments using =) when specific buttons are pressed. This works like a chorded press binding. If multiple chords are active, the latest one takes priority. The chord remains active as long as the button is held.

    Exceptions (cannot be modeshifted): AUTOLOAD, JSM_DIRECTORY, SIM_PRESS_WINDOW, TICK_TIME, GRID_SIZE, HIDE_MINIMIZED, VIRTUAL_CONTROLLER.

    Removing a Modeshift: To clear a modeshift, assign NONE. If NONE is a valid assignment for the target setting (like the gyro button), use a backslash \ to indicate you are clearing the modeshift rather than assigning the value NONE to the setting.

    Stick Mode Safety: When changing stick modes via a modeshift, JSM ignores stick input until the stick returns to the center upon releasing the chord button to prevent accidental flicks.

    # Example: Using a weapon wheel in DOOM
    RIGHT_STICK_MODE = FLICK
    GYRO_OFF = R3
    R = Q
    
    # Disable gyro when R is held
    R,GYRO_ON = NONE\
    # Use stick to select wheel items when R is held
    R,RIGHT_STICK_MODE = MOUSE_AREA
  6. Configure Double Press bindings

    master

    Double Press allows you to assign a different binding when a button is pressed twice in rapid succession.

    • Timing: The second press must occur within 150ms of the first. This window can be adjusted using DBL_PRESS_WINDOW.
    • Behavior: The regular (first) binding applies on the first press. If a second press is omitted, the tap binding is applied after a delay. If a second press occurs, the double press binding is applied.
    N = SCROLLDOWN # Cycle weapon
    N,N = X        # Cycle weapon fire mode
    
    E = C'         # Crouch
    E,E = Z        # Don't crouch but go prone
  7. Configure trigger full-pull modes and bindings

    master

    JoyShockMapper allows you to assign different bindings to the full pull of a trigger. This is controlled by ZR_MODE (Right Trigger) and ZL_MODE (Left Trigger).

    Bindings:

    • ZL / ZR: The "soft pull" bindings (activate at the threshold).
    • ZLF / ZRF: The "full pull" bindings (activate at 100% pull).

    Available Modes:

    • NO_FULL (default): Ignore full pull bindings.
    • NO_SKIP: Never skip the soft pull binding. Full pull activates alongside it.
    • NO_SKIP_EXCLUSIVE: Never skip the soft pull binding. When full pull is active, soft pull is disabled.
    • MUST_SKIP: Only send full pull binding on a quick full press, ignoring the soft pull binding.
    • MAY_SKIP: Combines NO_SKIP and MUST_SKIP. Soft binding may be skipped on a quick full press, and full pull can be activated on top of soft pull.
    • MUST_SKIP_R / MAY_SKIP_R: "Responsive" variants. These activate the soft binding immediately for responsiveness but remove it if a full press is reached quickly (useful for snappier ADS/hip-fire transitions).
    # Example: ADS on soft pull, Hold Breath on full pull
    ZL_MODE = NO_SKIP
    ZL = RMOUSE
    ZLF = LSHIFT
    
    # Example: Primary fire on soft pull, Melee on quick full tap
    TRIGGER_THRESHOLD = -1
    ZR_MODE = MUST_SKIP
    ZR = LMOUSE
    ZRF = V G
  8. Configure Diagonal Press bindings

    master

    Diagonal Press is designed for directional inputs (D-pad, sticks, face buttons). Unlike Simultaneous Press, the buttons do not need to be pressed at the exact same time.

    Behavior:

    1. The active binding of the first button pressed is released when the second button of the diagonal is pressed.
    2. Releasing either button will release the diagonal binding and activate the binding of the other button.

    Limitation: Activating multiple diagonal presses at the same time can lead to undetermined behavior.

    UP = 1
    UP*RIGHT = 2     # Diagonal
    RIGHT = 3
    RIGHT*DOWN = 4   # Diagonal
  9. Understand polling rate and input lag limitations

    master

    JoyShockMapper only sends new mouse and keyboard actions when it receives new instructions from the controller. This can lead to visual stuttering if your game/monitor refresh rate exceeds the controller's polling rate:

    • DualShock 4: Sends ~250 messages per second (sufficient for most high-refresh displays).
    • JoyCons / Pro Controller: Sends ~66.67 messages per second. If playing at frame rates higher than 66.67 FPS, you may experience stuttering.
    • Bluetooth Latency: JoyCons and Pro Controllers communicate via Bluetooth even when connected via USB. Some Bluetooth adapters may cause input lag, especially when connecting multiple devices (like a pair of JoyCons).
  10. Use Event Modifiers for button actions

    master

    Event Modifiers determine when a key up or key down action is triggered. They allow you to transform a single physical button press into different logical behaviors like taps, holds, or rapid pulses.

    Available Modifiers:

    • \ Start press (default): Applies the key down action immediately upon press and key up upon release. Useful for holding a key while activating others.
    • / Release press: Applies the binding only when the button is released. Requires an action modifier to be valid.
    • ' Tap press: Applies the key press when the button is released, provided the total press time is less than HOLD_PRESS_TIME.
    • _ Hold press: Applies the key only after the button has been held for HOLD_PRESS_TIME.
    • + Turbo: Applies a key press repeatedly (pulsing) after the button has been held for HOLD_PRESS_TIME.
    ZL = ^RMOUSE\ RMOUSE_ # ADS toggle on tap and release the toggle on hold
    E  = !C\ !C/          # Convert in game toggle crouch to regular press
    -,S = SPACE+          # Turbo press for button mash QTEs
  11. Configure the Autoload feature for games

    master

    The Autoload feature automatically loads a specific configuration file whenever a game window gains focus.

    How it works:

    1. Place configuration files in the AutoLoad folder within your JSM_DIRECTORY.
    2. Name the file after the executable of the game (case-insensitive). For example, if the game is Game.exe, name the file game.txt.
    3. When the game enters focus, JoyShockMapper will attempt to load the matching file. It will notify you in the console of the filename it is looking for.

    Note: To prevent losing manual changes, JoyShockMapper does not reload the configuration if you switch focus between JoyShockMapper itself and the game; it only triggers when the game window gains focus.

    Commands:

    • AUTOLOAD = OFF: Disables the feature.
    • AUTOLOAD = ON: Enables the feature (enabled by default).
    AUTOLOAD = OFF
    AUTOLOAD = ON
  12. Configure Simultaneous Press bindings

    master

    Simultaneous Press allows you to map two buttons pressed within a very short window to a unique action. When both buttons are pressed near-simultaneously, the individual button bindings are ignored in favor of the simultaneous binding until both are released.

    • Timing: The window is controlled by the SIM_PRESS_WINDOW setting (in milliseconds).
    • Capabilities: Supports tap & hold bindings and modifiers.
    L = LSHIFT # Ability 1
    R = E      # Ability 2
    L+R = Q    # Ultimate Ability