Game Keybinds
TSUKI reads your Deadlock key settings and fills its own bind values from them. There is nothing to type in.
So when a script calls:
press_ability(slot.ability1) -- taps whatever key ability 1 is bound toit presses the key you actually use for ability 1 in game, whatever you rebound it to.
When it re-reads
- At startup, right after the config loads.
- Whenever you load, create, import or delete a config.
- On demand. If you rebind inside Deadlock while TSUKI is running, open Dev Studio (the bug icon above the menu), go to Advanced, find Game Keybinds and press Update Keybinds.
There is no per-bind editor.
When a key is unbound
An action with no bind in Deadlock is skipped and TSUKI keeps the value it had.
Only the primary binding is read. An action bound only on Deadlock's secondary slot reads as unbound.
If the settings cannot be read, nothing changes.
Gotchas
- Parry is Deadlock's Held Item binding, not melee. Deadlock has no binding called Parry.
slot.weapon_meleereturns the parry key, not the melee key. There is no way to reach the melee bind throughslot_to_key, and thekeybindstable has no melee accessor. Useinput.melee()to press it, orinput.bind("melee")to read it.slot_to_keyreturns 0, never nil, for every slot outsideability1toability4,item1toitem4,jump,slideandweapon_melee, andpress_abilitysilently does nothing on a 0.- Per hero binds are not applied. Rebind an action for one hero only and TSUKI keeps using your global bind for that action.
- Mouse wheel and sided modifiers. A wheel bind is not a key
input.press_keycan use, and Shift, Ctrl and Alt come back as the left side code. Parry is often on wheel down. Press by name instead.
Functions
Lua helper functions that press slot keys:
press_ability(slot). Press and release the configured key for that slot once (a quick tap). Use this for casting most abilities or activating instant items.hold_ability(slot, duration). Hold the key down fordurationmilliseconds, then release. Default is 500 ms. Use this for charged abilities like Abrams' charge where you want to commit then release.slot_to_key(slot). VK code bound to a slot:ability1toability4,item1toitem4,jump,slideandweapon_melee; 0 for anything else.press_abilityandhold_abilityuse it internally.item_slot_to_key(0-3). Returns the configured VK code for a 0-based item index (0-3). It is exactlyslot_to_key(config_slot + 4), so the result is a key code to hand toinput.press_key()- not a slot number to feed back intoplayer:get_ability()orplayer:is_item_ready().
Read-only accessors, twelve of them:
keybinds.ability1_key()throughkeybinds.item4_key(). Return the configured VK code for one specific slot. Equivalent toslot_to_key(slot.ability1)etc.keybinds.reload_key(),keybinds.parry_key(),keybinds.dash_key(),keybinds.jump_key(). Same idea for the action binds - returns the configured VK code for reload, parry, dash, and jump respectively.
All twelve return 0 until TSUKI has read the game once.
slot_to_key and item_slot_to_key have their full entries on Globals, and the slot table is on Types & Constants. Readiness checks like player:is_ability_ready read cooldowns rather than binds, so they live on Player.
Press by name instead
input.cast(1..4), input.use_item(1..4), input.melee(), input.parry(), input.tap(name), input.hold(name [, ms]), input.release(name) and input.bind(name) resolve the key by name.
input.cast(1) -- ability 1, by your real bind
input.parry() -- the Held Item bind, whatever it is
local vk = input.bind("melee") -- the key a melee press would use, or nilThis path re-reads your bindings on its own, at most every 2 seconds, so it follows a rebind without Update Keybinds, and it covers names the accessors do not: attack, attack2, jump, duck, forward, back, moveleft, moveright, use, reload, sprint (alias dash), ability1 to ability4, item1 to item4, melee, parry, alt_cast, cancel_ability and zipline.
The full set is on Input.