-
Notifications
You must be signed in to change notification settings - Fork 80
SMODS.Keybind
Casimir Eisenach edited this page Dec 28, 2024
·
2 revisions
-
Required parameters:
-
key_pressed
: The key that needs to be pressed for this keybind to activate. Keycodes are documented here. -
action(self)
: Function to be called when the keybind is triggered.
-
-
Optional parameters (defaults):
-
event = 'pressed'
: Defines when the keybind should trigger.-
'pressed'
: When the key is pressed. -
'released'
: When the key is released. -
'held'
: When the key has been held for a specified amount of time.
-
-
held_duration = 1
: How long (in seconds) the key must be held before triggering whenevent == 'held'
. -
held_keys = {}
: Set of keycodes that must also be pressed for the keybind to activate. -
key
: Because there is no need to explicitly refer to a keybind elsewhere, it is not required to specify an object key here. The default value is the amount of previously registered keybinds as a string.
-
Game Objects
- API Documentation
- SMODS.Achievement
- SMODS.Atlas
- SMODS.Blind
- SMODS.Center
- SMODS.Challenge
- SMODS.DeckSkin
- SMODS.Keybind
- SMODS.Language
- SMODS.ObjectType
- SMODS.PokerHand
- SMODS.Rarity
- SMODS.Seal
- SMODS.Sound
- SMODS.Stake
- SMODS.Sticker
- SMODS.Suit and SMODS.Rank
- SMODS.Tag
Guides
- Your First Mod
- Mod Metadata
- Joker Calculation
- Calculate Functions
- Logging
- Event Manager
- Localization
- Mod functions
- UI Structure
- Utility Functions
Found an issue, or want to add something? Submit a PR to the Wiki repo.