Opened 6 years ago

Closed 5 years ago

#254 closed enhancement (fixed)

Allow plugins to define keyboard shortcuts for menu

Reported by: claudio Owned by: claudio
Priority: major Milestone:
Component: plugins Version: trunk
Keywords: Cc:

Description

Some functionalities are handled by plugins. The Padre plugin api should define a way to add keyboard shortcuts to plugin menus.

E.g., the Perltidy plugin has a core functionality for me: format document (tidy document) and it would be great to use the keyboard instead of browsing through menus...

Change History (3)

comment:1 Changed 5 years ago by claudio

  • Owner set to claudio
  • Status changed from new to accepted

This has been implemented. An example of how it works can be found in the Padre::Plugin::Autoformat.pm:

sub menu_plugins_simple {

my ($self) = @_;
'Autoformat' => [

"Autoformat\tCtrl+Shift+J" => 'autoformat',

];

}

comment:2 Changed 5 years ago by claudio

Documented on r3348.

comment:3 Changed 5 years ago by claudio

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.