MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Possible bug? (https://www.mobileread.com/forums/showthread.php?t=341626)

RbnJrg 09-17-2021 02:52 PM

Quote:

Originally Posted by KevinH (Post 4154884)
So unless there are issues...

It's not a bug, but so far, shortcuts are asigned by positions. Thus, if I move a clip, the asigned shortcut is applied to another clip, not to the original.
Will there be some way to assign the shortcuts by clip name and not by position?

DiapDealer 09-17-2021 03:17 PM

No plans to accommodate that that I know of (not that that couldn't change).

Shortcuts are assigned to the clip number, not the clip action/description. It has always worked the way it currently does. I can see how it might cause some confusion when reorganizing things in the clip editor, though. But this is the first time I remember anyone bringing the issue up. Perhaps people don't do a lot of clip reorganization. :D

KevinH 09-17-2021 03:29 PM

And as names/actions for clips are user assignable and easily changed, using that approach would end up with something broken just as easily.

You are assigning a shortcut to clip number 1's actions, not assigning a shortcut to an action or name.

BeckyEbook 09-17-2021 03:53 PM

@RbnJrg: You can easily assign shortcuts to 40 Clips (and even more), so keeping an eye on the order is probably not that scary.

My setup works perfectly for me, and my hands trigger these combinations themselves. Clips 31 to 40 serve as temporary for me and therefore I assigned shortcuts to them from the numeric keypad.

Spoiler:
Code:

Clip1 • Alt+1
Clip2 • Alt+2
Clip3 • Alt+3
Clip4 • Alt+4
Clip5 • Alt+5
Clip6 • Alt+6
Clip7 • Alt+7
Clip8 • Alt+8
Clip9 • Alt+9
Clip10 • Alt+0
Clip11 • Ctrl+Alt+1
Clip12 • Ctrl+Alt+2
Clip13 • Ctrl+Alt+3
Clip14 • Ctrl+Alt+4
Clip15 • Ctrl+Alt+5
Clip16 • Ctrl+Alt+6
Clip17 • Ctrl+Alt+7
Clip18 • Ctrl+Alt+8
Clip19 • Ctrl+Alt+9
Clip20 • Ctrl+Alt+0
Clip21 • Ctrl+Alt+Shift+1
Clip22 • Ctrl+Alt+Shift+2
Clip23 • Ctrl+Alt+Shift+3
Clip24 • Ctrl+Alt+Shift+4
Clip25 • Ctrl+Alt+Shift+5
Clip26 • Ctrl+Alt+Shift+6
Clip27 • Ctrl+Alt+Shift+7
Clip28 • Ctrl+Alt+Shift+8
Clip29 • Ctrl+Alt+Shift+9
Clip30 • Ctrl+Alt+Shift+0
Clip31 • Alt+Num+1
Clip32 • Alt+Num+2
Clip33 • Alt+Num+3
Clip34 • Alt+Num+4
Clip35 • Alt+Num+5
Clip36 • Alt+Num+6
Clip37 • Alt+Num+7
Clip38 • Alt+Num+8
Clip39 • Alt+Num+9
Clip40 • Alt+Num+0


RbnJrg 09-17-2021 03:54 PM

Quote:

Originally Posted by KevinH (Post 4154944)
And as names/actions for clips are user assignable and easily changed, using that approach would end up with something broken just as easily.

You are assigning a shortcut to clip number 1's actions, not assigning a shortcut to an action or name.

As Diap says, if we reorganize the clips, we lost all our shortcuts.

In the sigil_clips.ini there are the names and the numbers of the clips and in Sigil.ini, we have the associated shortcut to the clip numbers. So, maybe it could be possible to assign, in Sigil.ini (or in another .ini file), where we can read, for example,

120\id=MainWindow.Clip1
120\keySequence=Ctrl+Num+*

the "id" to the name of the Clips that are stored in sigil_clip.ini. Maybe an asociation between MainWindow.Clip1 and the respective name in the sigil_clip.ini could do the trick.

RbnJrg 09-17-2021 04:06 PM

Quote:

Originally Posted by BeckyEbook (Post 4154948)
@RbnJrg: You can easily assign shortcuts to 40 Clips (and even more), so keeping an eye on the order is probably not that scary.
...

Thanks for sharing your method, Becky. Yes, there are ways to minimize the fact that one can't move the clips, but we would have more freedom if Kevin and Diap could link all the info already available.

By the way, that woud be a nice new feature that would do Clips in combination with shortcuts even more practical and powerfull.

KevinH 09-17-2021 04:20 PM

It is not that easy. All other actions registered for keyshortcuts have fixed, translatable strings representing their functions known at compile time. There is a one to one mapping of action and function.

For clips, we do not know what name/function they will have only an action number (by clip number) at compile time. So using our current mechanism we assign shortcuts to actions/functions which are clip numbers.

Nothing else is available at compile time.

This is why and how we handle keyboard shortcuts for the first 10 plugins in the same way.

This is not something I am interested in changing. BeckyEbook's approach seems to make the most sense to me.

BetterRed 09-17-2021 07:51 PM

Quote:

Originally Posted by BeckyEbook (Post 4154911)
@DiapDealer, @BetterRed: I need to correct my last information about single-key alphanumeric keyboard shortcuts.
Single-key shortcuts work, but only when the focus is not in the Code View or some edit field. So they work when we have active other panels: Book Browser, Preview, Clips, or Table of Contents.

I did wonder about that, but I didn't pursue because I use the menu and arrow keys to access Set Semantic, Rename etc.

Is there a way to give the panels keyboard focus using the keyboard? And see at a glance which panel has keyboard focus?

BR


All times are GMT -4. The time now is 09:18 PM.

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