BeardLib
  • Home
  • Things to Know
    • Adding Files
    • ScriptData
  • Modules
    • Achievements
    • Add Files
    • Adding your own modules
    • AssetUpdates (Mod Updates)
    • Classes
    • Contact (contractors)
    • Crime Spree Mission
    • DLC
    • Dependencies
    • Elements
    • Global Value (Tagging weapons/etc)
    • Heist Music
      • Stealth Music
    • Hooks
    • Interactions
    • Keybind
    • Level
    • Localization
    • Mask Material
    • Mask Pattern
    • Mask
    • Melee
    • Menu Music
    • Menu
    • ModuleBase
    • Narrative
    • Options
    • Package
    • Script Mods (Replace script data)
    • Sounds
    • Tweak Modify
    • Weapon Mod
    • Weapon Skin
    • Weapon
    • XML
  • API
    • BeardLib Class
    • Constants
    • File Manager
    • Frameworks
    • Hooks
    • ModCore
    • Package Manager
    • Special Hook IDs
  • Utilities
    • FileIO
    • Input
    • Main
    • Math
    • Menu Helper Plus
    • Path
    • String
    • Sync
    • Table
    • Tweak Data Helper
    • XML
    • YAML
  • MenuUI
    • ComboBox
    • ImageButton
    • Item
    • Items
    • Keybind
    • Menus
    • Slider
    • TextBox
    • Toggle
Powered by GitBook
On this page
  • Module Definition
  • Module name
  • XML Structure
  • Example

Was this helpful?

Edit on GitHub
  1. Modules

Keybind

PreviousInteractionsNextLevel

Last updated 3 years ago

Was this helpful?

Updated for version 3.38.

Module Definition

The module is inherited from . So base parameters can be found there.

The module uses almost the same parameters of the BLT json keybinds

Module name

The name of the module you use as the meta of the module definition is 'Keybind' or 'KeybindModule' if _force_search is set to true in the module definition.

XML Structure

<Keybind id name description localized run_in_game run_in_menu script_path/>
Parameter
Type
Description

id/keybind_id

String

a string id for the keybind[make sure its unique as possible]

name

String

string of the title/id that will show up as the title in the keybinds menu

description

String

string of the description/id that will show up as the description in the keybinds menu

localized

Boolean

Determines if the menu should use the name and description as localization keys[DEFAULT: true]

run_in_game

Boolean

Determines if the keybind can be used in game [DEFAULT: true]

run_in_menu

Boolean

Determines if the keybind can be used in menu [DEFAULT: true]

script_path

String

path to the script that the keybind will be running [ModPath + script_path]

Example

<Keybind keybind_id="mykeybind" name="My keybind" description="Runs a script!" localized="false" script_path="Script.lua"/>

This will add a keybind to mod keybinds menu similar to BLT's Json ones. when the key that the keybind is set to is pressed, this will run the script in 'script_path'.

This example is what you would put inside your main node within your

ModuleBase
https://payday-2-blt-docs.readthedocs.io/en/latest/mods/definition/#json-keybinds
mod config