Use this file to discover all available pages before exploring further.
Typist is designed to work seamlessly with the Balatro modding ecosystem. This page explains the compatibility architecture and how to integrate with Typist.
Compatibility Module:compat/debugplus.luaProblem: DebugPlus uses / to toggle the debug console, which conflicts with Typist’s joker leader key.Solution: Move DebugPlus console toggle behind Ctrl key:
M.init = function() if not pcall(require, "debugplus.console") then return end local held_keys = G.CONTROLLER.held_keys local consoleHandleKey = require("debugplus.console").consoleHandleKey if not consoleHandleKey then log("DebugPlus v1.5.0+ is not yet supported.") return end log("old DebugPlus detected!! moving it behind the ctrl key") local consoleOpen = false require("debugplus.console").consoleHandleKey = function(key) -- Only handle keys when console is open or Ctrl is held if consoleOpen or held_keys[layout.debug_leader_left] or held_keys[layout.debug_leader_right] then local the_thing = consoleHandleKey(key) consoleOpen = (not the_thing or key == "/") and key ~= "escape" return the_thing end return true -- Let Typist handle the key endend
User Impact:
Console now opens with Ctrl+/ instead of /
Ctrl+Shift+/ toggles console preview
All other console commands (backspace, arrows) work normally
Joker selection with / works without conflicts
Version Support:
✅ DebugPlus v1.4.1 and earlier
⚠️ DebugPlus v1.5.0+ not yet supported (different API)
Compatibility Module:compat/fhotkey.luaProblem: FlushHotkeys provides best hand selection that conflicts with Typist’s implementation.Solution: Disable FlushHotkeys keyboard handling and delegate to its best hand algorithm:
M.init = function() if not fhotkey then return end log("FlushHotkeys detected, unhooking it from the keyboard :)") -- Restore original keyboard handler Controller.key_press_update = assert(fhotkey.FUNCS.keyupdate_ref)endM.best_hand_impl = function() if not fhotkey then return require("typist.mod.hand").best_hand end log("FlushHotkeys detected, will use its best_hand implementation") return function() fhotkey.FUNCS.select_best_hand( G.hand.cards, { accept_flush = true, accept_str = true, accept_oak = true } ) endend
User Impact:
FlushHotkeys keyboard shortcuts are disabled
Typist uses FlushHotkeys’ superior best hand algorithm
Best hand selection works through Typist’s cheat layer (p+b or q+b)
Why This Works:
FlushHotkeys has a more sophisticated hand evaluation algorithm that accounts for joker effects. Typist defers to its expertise while providing the keyboard interface.
Compatibility Module:compat/multiplayer.luaProblem: Multiplayer mod adds lobby and PvP ready button that need keyboard shortcuts.Solution: Provide keyboard shortcuts for multiplayer-specific UI:
local M = {}M.lobby_start_game = function() local mp_start = G.MAIN_MENU_UI:get_UIE_by_ID("lobby_menu_start") if mp_start then G.FUNCS.lobby_start_game(mp_start) endendM.pvp_toggle_ready = function(e) if e.config.button == "pvp_ready_button" then G.FUNCS.pvp_ready_button(e) end if e.config.button == "mp_toggle_ready" then G.FUNCS.mp_toggle_ready(e) return true endendreturn M
Integration Points:
-- In state_handlers[G.STATES.MENU]:if key == layout.proceed then local the_play_button = G.MAIN_MENU_UI:get_UIE_by_ID("main_menu_play") if the_play_button then G.FUNCS.setup_run(the_play_button) else -- Multiplayer lobby detected multiplayer_compat.lobby_start_game() endend-- In state_handlers[G.STATES.BLIND_SELECT]:if key == layout.proceed or key == layout.enter then local e = G.blind_select_opts[...]:get_UIE_by_ID("select_blind_button") -- Check for PvP ready button if not multiplayer_compat.pvp_toggle_ready(e) then G.FUNCS.select_blind(e) endend
Compatibility Module:compat/taikomochi.luaProblem: Taikomochi adds a “Restart Ante” button on game over screen.Solution: Provide keyboard shortcut for zen restart:
local M = {}M.zen_restart_ante = function() if G.OVERLAY_MENU:get_UIE_by_ID("zen_restart_ante") then G.FUNCS.zen_restart_ante() return true endendreturn M
Integration:
-- In state_handlers[G.STATES.MENU]:if key == layout.enter then -- Start endless mode if new_run_button.config.id == "from_game_won" then G.FUNCS:exit_overlay_menu() -- Or if lost and have Taikomochi, retry the ante else require("typist.compat.taikomochi").zen_restart_ante() endend
User Impact:
Enter on game over screen retries the ante (if Taikomochi is installed)
Gracefully falls back if Taikomochi is not installed
local success, module = pcall(require, "other_mod.module")if success and module then -- Mod is installed, adapt behavior log("Mod detected, enabling compatibility") -- ... compatibility codeelse -- Mod not installed, use default behavior log("Mod not detected, using default behavior") -- ... default codeend
Never use require() directly for optional mods. Always use pcall(require, ...) to avoid crashes.
-- compat/newmod.lualocal M = {}M.init = function() if not pcall(require, "newmod") then return end log("NewMod detected, enabling compatibility") -- Compatibility logic hereendreturn M
Status: Not yet supportedReason: v1.5.0 changed the console API in a way that’s incompatible with Typist’s hook.Workaround: Use DebugPlus v1.4.1 or earlier, or rebind Typist’s joker leader key:
local state_handlers = require("typist.mod.state-handlers")-- Add handler for custom game statestate_handlers[G.STATES.CUSTOM_STATE] = function(key, held_keys) -- Your keyboard handling logicend