Keybind Rename Lua Script

Something to try using the OP code

local function updatehotkey(self, actionButtonType)
    local hotkey = _G[self:GetName() .. 'HotKey']
    local text = hotkey:GetText()

    text = string.gsub(text, '(s%-)', 'S')
    text = string.gsub(text, '(a%-)', 'A')
    text = string.gsub(text, '(c%-)', 'C')
    text = string.gsub(text, '(Mouse Button )', 'M')
    text = string.gsub(text, '(Middle Mouse)', 'M3')
    text = string.gsub(text, '(Num Pad )', 'N')
    text = string.gsub(text, '(Page Up)', 'PU')
    text = string.gsub(text, '(Page Down)', 'PD')
    text = string.gsub(text, '(Spacebar)', 'SpB')
    text = string.gsub(text, '(Insert)', 'Ins')
    text = string.gsub(text, '(Home)', 'Hm')
	text = string.gsub(text, '(Y)', '1')
	text = string.gsub(text, '(U)', '2')
	text = string.gsub(text, '(I)', '3')
	text = string.gsub(text, '(O)', '4')
	text = string.gsub(text, '(P)', '5')
	text = string.gsub(text, '(H)', '6')
	text = string.gsub(text, '(J)', '7')
	text = string.gsub(text, '(K)', '8')
	text = string.gsub(text, '(L)', '9')
	text = string.gsub(text, '(B)', '10')
	text = string.gsub(text, '(N)', '11')
	text = string.gsub(text, '(M)', '12')

    hotkey:SetText(text)
end
hooksecurefunc(ActionBarActionButtonMixin, "UpdateHotkeys", updatehotkey)

ActionBarButtonEventsFrame:GetScript("OnEvent")(ActionBarButtonEventsFrame, "UPDATE_BINDINGS")