Skip to content

codepuncher/HoldFast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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, NewSave, QuickSave, 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, NewSave, QuickSave, Bestiary, CharacterSheet, None (case-insensitive)
sButtonBackAction=System

In-game settings (optional):

If SKSE Menu Framework v3 is installed, HoldFast adds a HoldFast/Settings page in its mod control panel. Use Save to config to persist and apply changes, Reload from config to discard staged edits and reload INI values, and Reset to defaults to stage defaults (0.5, Start=Map, Back=System) until saved.

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
NewSave Performs a new save
QuickSave Performs a quicksave
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)
  • dprint
  • Vale CLI
lefthook install

Markdown checks in hooks:

  • dprint formats staged README.md and docs/**/*.md
  • vale lints staged README.md and docs/**/*.md (warnings and errors fail the hook)

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.


Markdown Linting and Formatting

This repository uses Markdown tooling:

  • dprint for formatting
  • vale for prose/style linting

Run locally:

dprint fmt "README.md" "docs/**/*.md"
dprint check "README.md" "docs/**/*.md"
vale --glob='*.md' README.md docs

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 Builds release DLL and publishes GitHub Release
nexus-upload.yml Release publish or manual workflow_dispatch Uploads the packaged ZIP to Nexus Mods
lint.yml PRs touching scripts, markdown docs, or markdown lint config/workflow files shellcheck (scripts) + markdown checks (dprint and vale)
pr-title.yml PR opened/edited/synchronised Validates PR title follows Conventional Commits

Nexus Mods Upload

Triggered on release publish, or manually via workflow_dispatch with 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

Upload behavior is configured as:

  • archive_existing_file: true
  • primary_mod_manager_download: true
  • allow_mod_manager_download: true
  • show_requirements_pop_up: true

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