Shortcuts for Styles and Shortcut-Mode

Previous topic - Next topic

iltis30

Hi,
my english is very basic, so sorry for my clumsy diction. ((-;

- For working typographically fast und efficiently, it would be very very useful
if i can define a shortcut for every Style (Paragraph and character). I think its easy to develop.

- Shortcut-Mode my suggestion doing shortcut-assings in a very modern way.
I found this method in several music-Applications like Ableton Live. Or a bit like the Scripting-Mode in Photoshop.

A Button or a Menu-Entry thats calles "Shortcut Define Mode", that brings the whole Interface in a special Mode.
You Click on any Button, field or Menu and then you can define a shortcut for this funktion in a small dialog. Or - if its a Field like Font-Size, you can define a "+" or "-" Shortcut. If you are finished, you end the special-Mode and go back to work.

Easy to handle for the user. Dificult to develop?

Cheers from Hamburg
Jan

mottechy

Yes, I too wish to have the option to assign my own shortcuts..

E.g:
For "Bold" Ctrl+B...
For Character Styles...


It will be very helpful.

Thank you!

Nermander

A shortcut for Bold would probably not be useful because Scribus does not have a Bold function. To get bold text in Scribus you need to use a bold font (potentially through a character style).

PatJr

you can do some of that with
File>Preferences>Keyboard Shortcuts

bold and italic are actual font switches

a.l.e

a few years ago i did use this plugin i have written:

https://github.com/aoloe/scribus-plugin-applyStyle

it was very very useful when creating things like:

https://github.com/CoderDojoZH/resources/blob/master/cards-python/mu-pgzero/check-collision/check-collision-enUS-a6.pdf

i guess it's time to rewrite it

- without the dependency on the high level API
- to have a similar look as the "action search".

on the other side, i wonder if it would make sense to add a shortcut for italic and bold.
i think that, nowadays, scribus provides some basic feature that could help implementing it.
for serious typography, one would probably want to create a character style for it (which could then be applied with applyStyle), but i admit that sometimes it's tempting to just hit ctrl-b or ctrl-i (even if, currently, ctrl-i is used for loading text into a text frame).

mottechy

#5
Thanks for the reply.
To Style the Character is known.
My Question was, if there is a way to assign Keyboard Shortcut to it?

Quote from: Nermander on February 12, 2024, 08:41:03 PMA shortcut for Bold would probably not be useful because Scribus does not have a Bold function. To get bold text in Scribus you need to use a bold font (potentially through a character style).

bold and italic are actual font switches

a.l.e


a.l.e

this afternoon, i decided it was time to go back to my code for applying styles with the keyboard.

i've now duplicated the code for the action search, and i got it so far that i can get the list of styles to be applied (and to filter, of course!)

search-style-first-list.png

with a bit of luck, during the weekend i should be able to create a patch, and finally have some chances to get this (to me very useful feature!) finally into scribus.

now, i have one more hour to get it to apply the style to the current : - )

a.l.e


AdmFubar

now can you add this as a right click option for a color in the color palette?
Using Scribus 1.6.1, openSUSE 15.6
Advanced hobbyist

a.l.e

well, no, this is not about applying colors...
i'm simply using the styles called red and cyan because it's easy to see the effect.
(should i have used h1 and list?)

and, in my not so humble opinion, having to go and right click on the color list of the palette defeats the purpose of this tool:
it's about having a keyboard shortcut for applying a formatting!

but integrating the colors in the search style?
yes, that could be a good idea.
it should be possible to add some other formatting options too...

but one thing after the other.

right now, i'm really happy that i got the applying of text styles to work!

apply-style-does-work.gif

i will clean up everything (well, i think that the code is already pretty tidied up) and post a patch to the issue tracker:

https://bugs.scribus.net/view.php?id=17162

a.l.e

here a slightly better demo (2):

styles.gif

Nermander

#12
That's even easier than using the Ribbon in Word! :)


Oh, but wait... If I know I have made a style for something but can't remember the name of the style? It seems the list is empty from the start?

a.l.e

if you don't know the name of the style, you look it up in the style editor or in the content palette : - )
for this time, you can apply it from there.
and next time you will be ready to go for the "apply style"!

i was also wondering, if it's a good idea to start with an empty list.

to be honest, i simply copied the behavior from the "action search".
but it would be easy to change it.

the main reason why i did not do it and i've finally left it as is, is that i don't want to animate the user to using the mouse.
if i show a long list, many new users will be tempted to scroll and click on the item, instead of "learning" to type in the filter and then confirm with the enter key.
since scribus already has a good way of applying the styles with the mouse (see above...) i thought that, for now, i prefer to leave like that.

but there is one thing, that i thought could be useful: showing the latest used style (or the latest few) when opening the dialog, in order to make it very fast to reapply the same style again and again.
(but i'm not sure that scribus has a way to "cache" this type of values...)

personally, i'd be happy to see this merged as it is now.
then let other users try it out and improve it further according to the feedback.