Skip to content

codepuncher/HoldFast

Repository files navigation

HoldFast

Hold Start or Back on your gamepad for a configurable duration to open a menu directly. A short press opens the button's normal menu.

Gamepad only. Default behaviour is fully preserved.

Inspired by Red Dead Redemption 2's hold-Start-to-open-map mechanic.

NexusMods page


Requirements

Installation

Mod manager (recommended):

  1. Install the requirements above.
  2. Install HoldFast via your mod manager.
  3. Launch Skyrim via SKSE.

Manual:

  1. Install the requirements above.
  2. Copy HoldFast.dll and HoldFast.ini to Data\SKSE\Plugins\.
  3. Launch Skyrim via SKSE.

Configuration

Edit Data\SKSE\Plugins\HoldFast.ini:

[General]
; Duration in seconds a button must be held to trigger its long-press action (default: 0.5, max: 5.0)
fHoldDuration=0.5
; Long-press action for the Start (Menu) button. Short press performs the button's normal function.
; Valid values: Map, System, Quests, Stats, Inventory, Magic, Favorites, TweenMenu, Wait, Bestiary, CharacterSheet, None (case-insensitive)
sButtonStartAction=Map
; Long-press action for the Back (View) button. Short press performs the button's normal function.
; Valid values: Map, System, Quests, Stats, Inventory, Magic, Favorites, TweenMenu, Wait, Bestiary, CharacterSheet, None (case-insensitive)
sButtonBackAction=System

Valid actions:

Value What it does
Map Opens the map
System Opens the Journal on the System tab
Quests Opens the Journal on the Quests tab
Stats Opens the Journal on the Stats tab
Inventory Opens the inventory
Magic Opens the magic menu
Favorites Opens the favourites menu
TweenMenu Opens the tween menu (Items/Magic/Map/Skills)
Wait Opens the sleep/wait menu
Bestiary Opens The Dragonborn's Bestiary (requires mod)
CharacterSheet Opens Character Menu SE (requires mod)
None Button not intercepted

Logs are written to:

%USERPROFILE%\Documents\My Games\Skyrim Special Edition\SKSE\HoldFast.log

Development

Prerequisites

All platforms

  • Git
  • CMake 3.21+
  • vcpkg — set VCPKG_ROOT in your environment

Linux

  • LLVM/Clang (clang-cl, lld-link, llvm-lib, llvm-rc, llvm-mt)
  • xwin — downloads the Windows SDK and MSVC CRT headers/libs
  • Ninja
# Arch / CachyOS
sudo pacman -S clang lld llvm ninja

# Install xwin (requires Rust/cargo)
cargo install xwin

# Fetch Windows SDK + MSVC CRT headers to ~/.xwin (one-time, ~700 MB)
xwin splat --output ~/.xwin

Note: On first CMake configure, cmake/toolchains/clang-cl-cross.cmake creates TitleCase symlinks inside your xwin installation (e.g. Advapi32.lib → advapi32.lib). The originals are untouched. This is required because lld-link is case-sensitive but CommonLibSSE-NG references libs with mixed-case names.

Windows


Getting Started

Linux

1. Clone
git clone --recurse-submodules https://github.com/codepuncher/HoldFast.git
cd HoldFast
2. Configure deploy path

Edit .env and set SKYRIM_MODS_FOLDER to your mod manager's staging folder:

# Vortex (Linux, Steam):
SKYRIM_MODS_FOLDER="$HOME/.local/share/Steam/steamapps/common/Vortex Mods/skyrimse"

# MO2 (Linux):
# SKYRIM_MODS_FOLDER="$HOME/MO2/mods"
3. Build
./scripts/build.sh
# or directly:
cmake --preset release-linux
cmake --build --preset release-linux

The DLL lands in build/release-linux/HoldFast.dll.

Deploy to mod manager
./scripts/deploy.sh
# or directly (deploy.sh sources .env for you; cmake does not):
source .env && cmake --workflow --preset deploy

Copies HoldFast.dll, HoldFast.pdb, and HoldFast.ini into $SKYRIM_MODS_FOLDER/HoldFast/SKSE/Plugins/.

Windows (MSVC)

cmake --preset release-windows
cmake --build --preset release-windows

The DLL lands in build/msvc/Release/HoldFast.dll.

Running Tests (Windows)

Unit tests use Catch2 and run without SKSE or Skyrim installed.

cmake --preset test-windows
cmake --build --preset test-windows
ctest --preset test-windows

Git Hooks (Lefthook)

Prerequisites:

  • go install github.com/evilmartians/lefthook@latest
  • clang-format and clang-tidy (part of LLVM)
  • cmake-format (sudo pacman -S cmake-format on Arch/CachyOS; pip install cmakelang elsewhere)
  • shellcheck (sudo pacman -S shellcheck on Arch/CachyOS)
lefthook install

Editor Setup (clangd / Neovim)

CMake writes compile_commands.json to the build directory. Symlink it to the project root:

ln -sf build/release-linux/compile_commands.json compile_commands.json

The .clangd file sets --target=x86_64-pc-windows-msvc so clangd resolves Windows headers correctly on Linux.

Recommended plugins: nvim-lspconfig with clangd, clangd_extensions.nvim.


Updating CommonLibSSE-NG

git submodule update --remote lib/commonlibsse-ng
git add lib/commonlibsse-ng
git commit -m "chore: update CommonLibSSE-NG submodule"

CI

Workflow Trigger What it does
ci.yml PRs to main touching source/cmake/vcpkg clang-format (ubuntu) → clang-tidy + build (windows, parallel)
release.yml Push of a v* tag or manual workflow_dispatch Builds release DLL, publishes GitHub Release; opt-in Nexus Mods upload via dispatch input
lint.yml PRs touching scripts/ shellcheck on shell scripts
pr-title.yml PR opened/edited/synchronised Validates PR title follows Conventional Commits

Nexus Mods Upload

Triggered via workflow_dispatch with upload_to_nexus: true and the version input set (e.g. 1.0.0). One-time setup:

  1. Upload your first file manually via the Nexus Mods web UI to create the file group.
  2. Add to your repository:
    • Secret NEXUSMODS_API_KEY — your Nexus Mods API key
    • Variable NEXUSMODS_FILE_GROUP_ID — the file group ID

Credits


License

MIT — see LICENSE.

About

Hold Start or Back on your gamepad for a configurable duration to open a menu directly. A short press opens the button's normal menu.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors