diff --git a/src/plugins/lua/bindings/action.cpp b/src/plugins/lua/bindings/action.cpp index 73dc7fb2ad7..b3ecd004043 100644 --- a/src/plugins/lua/bindings/action.cpp +++ b/src/plugins/lua/bindings/action.cpp @@ -42,6 +42,10 @@ void setupActionModule() sol::property( [](ScriptCommand *cmd) { return cmd->m_contextAction->isEnabled(); }, [](ScriptCommand *cmd, bool enabled) { cmd->m_contextAction->setEnabled(enabled); }), + "keySequences", + sol::property([](ScriptCommand* cmd) -> QList { + return cmd->m_cmd->keySequences(); + }), "toolTip", sol::property( [](ScriptCommand *cmd) { return cmd->m_contextAction->toolTip(); }, diff --git a/src/plugins/lua/meta/action.lua b/src/plugins/lua/meta/action.lua index e6454bd4320..a10a9f40748 100644 --- a/src/plugins/lua/meta/action.lua +++ b/src/plugins/lua/meta/action.lua @@ -42,6 +42,7 @@ function action.trigger(id) end ---@class Command ---@field enabled boolean Whether the command is enabled or not. +---@field keySequences QKeySequence[] Current key sequences for the command. ---@field text string The text of the command. Make sure to specify `commandAttributes = CommandAttribute.CA_UpdateText` in the options. ---@field toolTip string The toolTip of the command. Make sure to specify `commandAttributes = CommandAttribute.CA_UpdateText` in the options. Command = {}