jiayouxjh / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Keyboard shortcuts for Lua scripts #344

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is there any way that assigning scripts to keys can be implemented? I know
most keys are taken...but I have many nifty scripts that I frequently use
and it's a bit messy to reach them now.
(Suggester by DawnBringer)

I also suggest making one shortcut for 're-run last script'. (yr)

About implementation: The per-scripts shortcuts could be set when using
right-click on a script, to open a contextual menu.
Internally, we can save the list of scripts that have an associated key in
.ini (similar to how I saved bookmarks, but using numbered keys, so they
are unique in .INI). Then the shortcuts can technically be associated to
script1, script2, etc. It imposes a hard limit, we can't implement infinite
number of shortcuts. I think 10 can be a good number, and if it proves to
be not enough, we can reserve another range of shortcuts later.

Original issue reported on code.google.com by yrizoud on 7 May 2010 at 9:15

GoogleCodeExporter commented 9 years ago
"Repeat script" is in r1527. If I can free up a couple of hours, I'll also 
include the other shortcuts in 2.3.

Original comment by yrizoud on 7 Jul 2010 at 1:52

GoogleCodeExporter commented 9 years ago
Nice. I don't have any preference (yet)...the option to select your own 
shortcut(s) should suffice. And I don't see any need for more than 10 direct 
script-keys...personally I'll probably just use/need 3-5 (would be hard to keep 
more in mind anyways).

(Btw. On the topic of shortcuts...how about that double/half brush size 
function?)

Original comment by annas...@hotmail.com on 8 Jul 2010 at 5:57

GoogleCodeExporter commented 9 years ago
Done in 1532. I couldn't make contextual menu on file-selector, so shortcut is 
displayed near description.
Description was re-made with the "help" font, so there's room for more 
characters.
Display is much like the Help, you click the link to modify shortcut.

The extra data is stored in gfx2.cfg instead of gfx2.ini, to be consistent with 
keyboard shortcuts that are stored there.

We are at 196 keyboard shortcuts now :*)

Original comment by yrizoud on 24 Jul 2010 at 4:56