diff --git a/spyder/plugins/profiler/plugin.py b/spyder/plugins/profiler/plugin.py index a293f28d7bd..b734d37b801 100644 --- a/spyder/plugins/profiler/plugin.py +++ b/spyder/plugins/profiler/plugin.py @@ -20,6 +20,7 @@ from spyder.plugins.profiler.widgets.main_widget import ProfilerWidget from spyder.api.shellconnect.mixins import ShellConnectMixin from spyder.utils.qthelpers import MENU_SEPARATOR +from spyder.config.manager import CONF # Localization _ = get_translation('spyder') @@ -28,8 +29,8 @@ # --- Constants # ---------------------------------------------------------------------------- class ProfilerActions: - ProfileCurrentFile = 'profile_current_filename_action' - ProfileCurrentCell = 'profile_current_cell_action' + ProfileCurrentFile = 'profile file' + ProfileCurrentCell = 'profile cell' # --- Plugin @@ -94,6 +95,16 @@ def on_editor_available(self): widget.sig_edit_goto_requested.connect(editor.load) self.sig_profile_file.connect(editor.profile_file) self.sig_profile_cell.connect(editor.profile_cell) + CONF.config_shortcut( + editor.profile_file, + context=self.CONF_SECTION, + name=ProfilerActions.ProfileCurrentFile, + parent=editor) + CONF.config_shortcut( + editor.profile_cell, + context=self.CONF_SECTION, + name=ProfilerActions.ProfileCurrentCell, + parent=editor) @on_plugin_available(plugin=Plugins.Preferences) def on_preferences_available(self):