Skip to main content
Inspect every keybind the user has set up, the same data the BindEditor right-click menu shows. Useful for building your own on-screen list of active keybinds. Signal connections clean up automatically when your script unloads.

list

api.bind.list(): { BindInfo }
Every keybind the user has.

getActive

api.bind.getActive(): { BindInfo }
Just the keybinds currently being held or toggled on.

get

api.bind.get(id: number): BindInfo?
A specific keybind by id, or nil if it doesn’t exist.

getInputLabel

api.bind.getInputLabel(input: Enum.KeyCode | Enum.UserInputType | string): string
A friendly name for an input, like "LShift", "E", or "LMB". Accepts a KeyCode, UserInputType, or a string like "KeyCode.E".

isAnyBindActive

api.bind.isAnyBindActive(): boolean
True if any keybind anywhere is currently active.

Signals

Call :Connect(callback). Every callback receives a BindInfo for the affected keybind.
SignalWhen your callback runs
onCreatedUser added a new keybind (via right-click on a control)
onRemovedA keybind was deleted
onActivatedA keybind just turned on (pressed or toggled)
onDeactivatedA keybind just turned off
onChangedThe user changed which keys are bound, or the mode

BindInfo

{
    id = 12,                    -- unique id
    name = "elb_12",            -- internal name
    label = "Aim Assist",       -- what the user sees in the menu
    inputs = { "KeyCode.E" },   -- the bound keys
    inputLabels = { "E" },      -- friendly names
    mode = "onHold",            -- "toggle", "onHold", or "offHold"
    active = true,
    targetValue = nil,          -- nil = invert boolean
}

Example: live keybind list

local tab = api.ui.tab("Binds", "keybinds")
local section = tab:AddSection("Active", 1)

local entries = {} -- id -> button handle

local function add(info)
    if entries[info.id] then return end
    entries[info.id] = section:AddButton(
        string.format("%s [%s]", info.label, table.concat(info.inputLabels, "+"))
    )
end

local function remove(info)
    local h = entries[info.id]
    if h then h:Destroy() entries[info.id] = nil end
end

for _, info in ipairs(api.bind.list()) do add(info) end

api.bind.onCreated:Connect(add)
api.bind.onRemoved:Connect(remove)
api.bind.onChanged:Connect(function(info)
    local h = entries[info.id]
    if h then
        h:SetText(string.format("%s [%s]", info.label, table.concat(info.inputLabels, "+")))
    end
end)