[Geany-Devel] 'shiftcolumn' plugin - keyboard shortcut conflict
steve8track at xxxxx
Tue Mar 25 23:26:47 UTC 2014
The shortcut code would look something like this:
key_group = plugin_set_key_group(geany_plugin,
"plugin_name_keyboard_shortcut", KB_GROUP, NULL);
keybindings_set_item(key_group, KB_PLUGIN, shortcut_callback, 0, 0,
"plugin_name", _("Shortcut Name"), NULL);
Here is a simple plugin that uses that structure:
Here is another plugin that allows dynamically adding shortcuts (as
opposed to a fixed number):
I hope this helps,
On 03/25/2014 05:12 PM, Lex Trotman wrote:
> On 26 March 2014 09:33, Shankhoneer Chakrovarty <shankhoneer at gmail.com> wrote:
>> 'shiftcolumn' is one of the orphaned plugin which I have decided to work on.
>> shiftcolumn's default shortcut key to move the selected text to right is
>> <Primary>0 which conflicts with "Zoom reset", making the plugin useless to
>> move the text right unless for every move the user clicks Tools->Shift
>> Right. Shift left is done by <Primary>9 key which is working fine.
>> Also, this plugin doesnt have its plugin preferences dialog box.
>> I was planning to change the default shortcut key for the aforementioned
>> behavior of the plugin to <Primary>8 which AFAIK doesnt conflict with
>> Do you guys think its a good idea? What should I do to prevent such problems
>> to arise in future?
> It is actually preferable that plugins do not have default keybindings.
> It is not known what combination plugins will be loaded and so it is
> not known what combination of keybindings might clash, and it is not
> known what keybindings a user might define themselves that can clash.
> So I would recommend that default keybindings be removed from plugins.
>> Shankhoneer Chakrovarty
>> Devel mailing list
>> Devel at lists.geany.org
> Devel mailing list
> Devel at lists.geany.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel