MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Plugins (https://www.mobileread.com/forums/forumdisplay.php?f=268)
-   -   Help needed to create a plugin to add more shortcuts (https://www.mobileread.com/forums/showthread.php?t=299683)

celiapgt 06-16-2018 11:54 PM

Help needed to create a plugin to add more shortcuts
 
Hello to everyone.

:help:

I respectfully ask the help of some nice developer to provide me and the community with a new plugin that can let me bind new shortcuts to several actions in Sigil, such as specific Search&Replace entries, show ClipView in sidebar, show Search&Replace in sidebar, and so on.

I am a total wreck at programming a plugin, so I really need someone can be interested in this task and help me.

I'm in Ubuntu 18.04 with Sigil 0.9.9 if that matters.


Fame and glory are offered as reward, as well as eternal gratitude from me! ;)

KevinH 06-17-2018 12:03 AM

Sigil does not support ui plugins. That said, there are key bindings for Search and Replace, and Preview is a dockable pane as are clips.

celiapgt 06-17-2018 07:57 PM

Quote:

Originally Posted by KevinH (Post 3707403)
Sigil does not support ui plugins. That said, there are key bindings for Search and Replace, and Preview is a dockable pane as are clips.

No, there are no key bindings for Search&Replace individual entries (as for Clips there are), and you cannot use a keybinding to toggle show the ClipView in sidebar, among other things.

KevinH 06-17-2018 09:23 PM

I am confused, I thought you wanted dockable panes for clips and preview. They exist. You can undock them and move them out of the way or remove them completely. You can also do the same with Search and Replace. Also in Search or Replace items there are hard coded keys for easier keyboard accesss based on a previous request from BetterRed (and tab use as well to move between fields).

Either way, Sigil's plugin api is book based and can not control the user interface (ui).

KevinH 06-17-2018 09:56 PM

I may be remembering wrong ... perhaps BetterRed's request added keys actions to the SpellCheck Menu and not Search and Replace. I committed that change a long time ago and do not remember which.

BetterRed 06-18-2018 12:39 AM

Quote:

Originally Posted by KevinH (Post 3707683)
I may be remembering wrong ... perhaps BetterRed's request added keys actions to the SpellCheck Menu and not Search and Replace. I committed that change a long time ago and do not remember which.

Confirmed

BR

KevinH 06-18-2018 12:59 PM

Which spellcheck or search and replace?

I looked in Sigil ->Preferences->Keyboard Shortcuts and there are already keyboard shortcuts that can be assigned to Find, Find Next, Replace, Replace All, etc.

From what I can tell, the only keyboard shortcuts missing are to open the Clips pane itself via a keyboard shortcut, but there are keyboard shortcuts you can assign for individual clips.

BetterRed 06-18-2018 08:30 PM

Quote:

Originally Posted by KevinH (Post 3707923)
Which spellcheck or search and replace?

spellchecker - IIRC Ctrl+C to copy selected word in list to clipboard was the one I wanted most of all. Can't recall if you added F1 (Ignore), F2 (Add to dict) and F3 (Find), or if they already existed.

BR

DiapDealer 06-19-2018 09:41 AM

I'm pretty sure the OP is looking for a Keyboard shortcut to show/hide the Clips widget. If you look under the View menu, you can see that Clips is really the only one without a Keyboard show/hide toggle.

And I think the other wish is to be able to assign shortcuts to individual Saved Searches (similar to how clips 1-20 have customizable shortcuts).

Unfortunately, neither can be accomplished via Sigil's plugin framework (as Kevin mentioned).

And the Find/Replace widget is not relocatable ... period. It is where it is, and no plugin will change it.

celiapgt 06-23-2018 01:54 PM

Quote:

Originally Posted by DiapDealer (Post 3708236)
I'm pretty sure the OP is looking for a Keyboard shortcut to show/hide the Clips widget. If you look under the View menu, you can see that Clips is really the only one without a Keyboard show/hide toggle.

And I think the other wish is to be able to assign shortcuts to individual Saved Searches (similar to how clips 1-20 have customizable shortcuts).

Unfortunately, neither can be accomplished via Sigil's plugin framework (as Kevin mentioned).

And the Find/Replace widget is not relocatable ... period. It is where it is, and no plugin will change it.

Thank you for replying so thoroughly.

Exactly as you said, DiapDealer. No problem with the Find/Replace position, it is just a minor customization to me. The important part are the addition of extra shortcuts that I request.

Now I am pretty clear that the plugin framework is not capable for such a task, but I do respectfully ask KevinH or who else is the developer to add that functionality in the next release of the software.

By the way, I was unable to find the features request list in GitHub, so I add this petition here.

When you occasionally work with Sigil, mouse gestures/clicks are OK, but when I work very often with ebooks and Sigil, search/replace are a frequent task and shortcuts are more user-friendly than ever. Thus, please take my suggestion into account.

Just a question to DiapDealer: am I the OP? what is the meaning of this acronym?

copyrite 06-23-2018 02:51 PM

Quote:

Originally Posted by celiapgt (Post 3709990)
am I the OP? what is the meaning of this acronym?

Original Poster :)

celiapgt 06-28-2018 11:17 PM

Quote:

Originally Posted by copyrite (Post 3710008)
Original Poster :)

Thanks, ;D


All times are GMT -4. The time now is 08:56 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.