ElementsControls
AddKeyPicker
Adds a key picker with optional hold behavior and keybind-menu visibility.
AddKeyPicker
What it does
Adds the current key-picker form of AddBind. It supports saved flags, hold behavior, UI toggle binding, and visibility in XLQP's keybind menu.
ElementFunction:AddKeyPicker(KeyPickerConfig)
local Picker = Controls:AddKeyPicker({
Name = "Open menu",
Default = Enum.KeyCode.K,
Callback = function(key)
print("Selected key:", key)
end,
})Controller methods
Set(key)changes the selected binding.SetMenuVisibility(visible)updates keybind-menu visibility and refreshes related panels.GetMenuVisibility()returns the current menu visibility.
KeyPicker is a compatibility alias for the same constructor behavior.