View Single Post
08/14/14, 04:48 PM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Haven't tested this myself, but you could try something like this:

init:
Code:
local keybindButtonDescriptor = KEYBIND_STRIP.keybinds["UI_SHORTCUT_PRIMARY"]
local oldEnabled = keybindButtonDescriptor.enabled
disable:
Code:
keybindButtonDescriptor.enabled = false -- can also be a function that returns a boolean
KEYBIND_STRIP:UpdateKeybindButton(keybindButtonDescriptor)
enable:
Code:
keybindButtonDescriptor.enabled = oldEnabled
KEYBIND_STRIP:UpdateKeybindButton(keybindButtonDescriptor)
if this does not work, you could also replace keybindButtonDescriptor.callback with an empty function

Last edited by sirinsidiator : 08/14/14 at 04:51 PM.
  Reply With Quote