Jump to content


Photo

New keyboard resizing extension available


  • Please log in to reply
17 replies to this topic

#1 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 16 February 2009 - 02:46 PM

I’ve posted a new extension to my site that makes it easy to resize the selected elements using keyboard shortcuts: http://johndunning.c.../KeyboardResize

If you’re more of a mouse person, you won’t find these terribly useful, but if you like to use the keyboard, you’ll hopefully find them a valuable addition to your workflow. Select one or more elements, then press alt + an arrow key to expand the elements in the arrow’s direction by 1 pixel. Hold down shift to expand by 10. Use ctrl+alt to shrink the elements, and again include shift to shrink by 10. I find it much more convenient to tweak the sizes of elements in a UI mockup using the keyboard than the mouse.

These are basically keyboard equivalents of the “Resize Selected Objects” panel that I wrote a long time ago. I actually created these keyboard commands years ago, too, but haven’t gotten around to packaging them up until now.

The extension includes a command that will automatically set up the keyboard shortcuts for you, which is otherwise a pain. This only works on Windows, unfortunately, as I don’t have a Mac. But if someone would like to propose reasonable shortcuts that work well on the Mac, I can include them.

Thanks.

#2 Alan

Alan

    FireworksGuru

  • Root Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1,507 posts
  • Location:San Francisco, California USA
  • Interests:Longboarding, art and video games

Posted 16 February 2009 - 08:23 PM

John - It took me about ten minutes to put a mental map to the keyboard shortcuts, but I now see what you mean about quickly moving the objects around and keeping the distance set correctly between multiple objects. I'll have to do this a couple times this week and probably be hooked from then on. :)

Thanks!

#3 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 16 February 2009 - 10:01 PM

John - It took me about ten minutes to put a mental map to the keyboard shortcuts, but I now see what you mean about quickly moving the objects around and keeping the distance set correctly between multiple objects.

Yeah, it's a somewhat arbitrary mapping, but it's the same as in the Resize Selected Objects panel. Alt+arrow is equivalent to the arrow buttons on the outside of the box, and ctrl+alt+arrow is equivalent to the inside ones. But if some other mapping makes more sense, you can always use a different key setup.

#4 stowball

stowball

    Fireworks Ninja

  • FwGurus
  • PipPipPipPipPip
  • 190 posts
  • Location:Newcastle, Australia

Posted 17 February 2009 - 02:30 AM

These are excellent John.

It takes a while getting used to the Contract and Grow in all directions as my Keyboard Resize commands don't have them, but I think I can handle it.

Also, my commands handle rounded rectangle autoshapes and maintain corner radius, which is a nice to have, but I'll admit that I use the autoshape a lot less since I made my Set Primitive Rectangle Pixel Radius command (and also since CS4 supports pixel radius too).

The Create Shortcuts command didn't work for me though. It said "Web Standard copy" couldn't be found, even though that's what I use.

Thanks

#5 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 17 February 2009 - 11:11 AM

Also, my commands handle rounded rectangle autoshapes and maintain corner radius, which is a nice to have, but I'll admit that I use the autoshape a lot less since I made my Set Primitive Rectangle Pixel Radius command (and also since CS4 supports pixel radius too).

Good point. That shouldn't be hard to add.

The Create Shortcuts command didn't work for me though. It said "Web Standard copy" couldn't be found, even though that's what I use.

Can you tell me the full path to your keyboard shortcuts file? The command first looks in 'fw.appSettingsDir + "/../English/Keyboard Shortcuts/' for the file, then in 'fw.userJsCommandsDir + "/../English/Keyboard Shortcuts/"', and then gives up. I don't know of any official way of getting the user's shortcuts directory.

#6 stowball

stowball

    Fireworks Ninja

  • FwGurus
  • PipPipPipPipPip
  • 190 posts
  • Location:Newcastle, Australia

Posted 17 February 2009 - 04:17 PM

Can you tell me the full path to your keyboard shortcuts file? The command first looks in 'fw.appSettingsDir + "/../English/Keyboard Shortcuts/' for the file, then in 'fw.userJsCommandsDir + "/../English/Keyboard Shortcuts/"', and then gives up. I don't know of any official way of getting the user's shortcuts directory.


Aha! I installed it on CS4 which I installed as English (British) so my path is C:\Documents and Settings\Matt\Application Data\Adobe\Fireworks CS4\en_GB\Keyboard Shortcuts.

Another difference I noticed between your commands and mine is when resizing marquee selections. Mine actually resizes the selection, like it would for a vector or bitmap, whereas yours seems to move the selection - it's a bit weird.

I use mine to resize rectangular marquees quite often btw.

#7 Guest_jenq_*

Guest_jenq_*
  • Guests

Posted 18 February 2009 - 08:31 AM

Hi John. — I tried installing your plug-in yesterday on a Mac 10.5.6 and it was a little sticky. (First, I have an extensive custom shortcut list of my own; don't know if this had anything to do with it.)

The extension manager serves a stack of of "older file / do you want to replace" messages. (I never click yes to all.) Of course, I've never installed the extension before so it was not due to duplicate installation. — This could scare away a few people.

I also noticed there is no way to contact you on your extension page. — This would scare me away if I didn't know you, even more so after experiencing the above issue.

Of course, you should know that on a Mac the keyboard shortcuts have to be entered manually after they appear in the available shortcut list.

I haven't tried them out yet, though Alan mentioned I should let you know about the Mac experience.

#8 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 18 February 2009 - 11:38 AM

Aha! I installed it on CS4 which I installed as English (British) so my path is C:\Documents and Settings\Matt\Application Data\Adobe\Fireworks CS4\en_GB\Keyboard Shortcuts.

Yeah, I figured it wouldn't work with non-US English (the President's English? (fortunately we have one now that doesn't completely mangle the language)). I could probably make the script smart enough to look inside the various directories for the Keyboard Shortcuts folder. Do you also have an "English" folder in the Fireworks CS4 folder? If so, iterating the subdirectories might not work.

Another difference I noticed between your commands and mine is when resizing marquee selections. Mine actually resizes the selection, like it would for a vector or bitmap, whereas yours seems to move the selection - it's a bit weird.

I use mine to resize rectangular marquees quite often btw.

Yeah, I think I did that because it was overriding the default keyboard shortcut for moving the selection, so in paint mode, it just implements the standard behavior for that shortcut.

Do you mean you use your commands to resize the marquee itself (leaving the pixels inside alone) or to resize the actual pixels? I almost never use bitmap mode, so if I need to resize a bitmap, I just do it as an object.

#9 stowball

stowball

    Fireworks Ninja

  • FwGurus
  • PipPipPipPipPip
  • 190 posts
  • Location:Newcastle, Australia

Posted 18 February 2009 - 01:25 PM

Do you also have an "English" folder in the Fireworks CS4 folder?


Nope, there's no English folder.

Do you mean you use your commands to resize the marquee itself (leaving the pixels inside alone) or to resize the actual pixels?


I resize the marquee and the pixels.

Here's an example.

1. I need to produce a new button graphic which reads "Submit", but I only have a flattened one that reads "Go". The button is rounded and has a gradient and an inner glow.
2. I'd draw a 1px wide rectangular marquee one pixel to the left of "Go".
3. I'd use my resize commands to stretch that pixel by, say 50px to the right to end up with a "blank" button.
4. Ctrl+D to select and then type my new text.

I figure it saves me time than copying the 1px as a new bitmap and then resizing.

#10 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 18 February 2009 - 10:48 PM

The extension manager serves a stack of of "older file / do you want to replace" messages. (I never click yes to all.) Of course, I've never installed the extension before so it was not due to duplicate installation. — This could scare away a few people.

Hmm, you must have some of my other extensions installed. I didn't realize the Extension Manager would complain about existing files if the same ones were being installed by another command. That makes sharing code across extensions a real pain. Looks like uninstalling an extension also removes the shared files that are used by another extension. Which would break a number of the extensions I've distributed. :(

Of course, you should know that on a Mac the keyboard shortcuts have to be entered manually after they appear in the available shortcut list.

Do you have suggestions for good keyboard shortcuts on the Mac?

Thanks for the feedback.

#11 Guest_jenq_*

Guest_jenq_*
  • Guests

Posted 20 February 2009 - 01:34 PM

Do you have suggestions for good keyboard shortcuts on the Mac?

Thanks for the feedback.
[/quote]


In fact :beer: , I put my shortcuts up for download and intend to add yours to the list once I figured out what was going on with the Mac install. — I've noted from speaking to a few Fireworkers here in SF, that most people do not know how to transfer a custom shortcut set from one person to another. I also found a couple of incorrect directions for doing this posted elsewhere that would make a Mac user suffer.

Here's the link to the current list:
[url="http://jenqdesign.com/2009/steal_this.html"]http://jenqdesign.co...steal_this.html[/url]

I will see how your shortcuts come into play over the weekend and hopefully update the file in the early of next week. — Personally, I love shortcuts and am a major keyboard nudger. Thanks so much for the extension!

Are you going to post something to your extension page that will address the Mac install / other extension concerns? — I think I have all of your extensions on my box, and definitely would not want to do anything to null the set.

Happy Friday!!!!!

#12 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 20 February 2009 - 03:38 PM

Thanks for the shortcut set. Do you think option-arrow to expand and command-option-arrow to contract would work on the Mac? I seem to recall that those may already be default shortcuts.

Are you going to post something to your extension page that will address the Mac install / other extension concerns? — I think I have all of your extensions on my box, and definitely would not want to do anything to null the set.

Yeah, though a number of extensions need to get reworked. I didn't realize that uninstalling shared files would remove them.

#13 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 22 February 2009 - 09:07 PM

I've updated the Keyboard Resize extension to avoid the problems with other extensions of mine. The latest version can be downloaded here: http://johndunning.c.../KeyboardResize

The new version will enable the keyboard shortcuts on the Mac and also better handles smart shapes, complex paths rounded rectangles, and bitmap mode.

#14 stowball

stowball

    Fireworks Ninja

  • FwGurus
  • PipPipPipPipPip
  • 190 posts
  • Location:Newcastle, Australia

Posted 22 February 2009 - 09:22 PM

The new version will enable the keyboard shortcuts on the Mac and also better handles smart shapes, complex paths rounded rectangles, and bitmap mode.


Hi John

I've just tried the new versions out. Auto shapes now resize nicely, except that the Rounded/Chamfer Rectangle changes to Beveled on the first resize.

Everything else seems to work as expected.

Can't wait for the next release :)

I can still throw my commands out now though :)

#15 stowball

stowball

    Fireworks Ninja

  • FwGurus
  • PipPipPipPipPip
  • 190 posts
  • Location:Newcastle, Australia

Posted 23 February 2009 - 07:09 PM

Hi John

I've just found a bug with commands when resizing Slices.

If a slice touches the boundaries of the canvas and you use either Expand Left 1 or Expand Top 1, then the right and bottom will also expand respectively.

It doesn't happen with any of the other commands.

Hotspots on the other hand move about with each command, but I very rarely use hotspots so it doesn't bother me as much.

I've attached a test png with a slice in it.

slice_resize_bug.fw.png

Cheers

Matt

#16 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 23 February 2009 - 08:29 PM

I've just found a bug with commands when resizing Slices.

Damn you and your thorough testing! ;) I'll take a look at the slices issues.

I actually just uploaded a new version that fixes the rounded rect auto shape problem and also resizes the elements inside groups individually. For instance, if you select a group that contains two text blocks and press alt+shift+left arrow, each text block will get 10px wider, rather than being distorted by getting scaled. Sub-groups, sub-sub-groups, etc. are also handled.

http://johndunning.c.../KeyboardResize

#17 stowball

stowball

    Fireworks Ninja

  • FwGurus
  • PipPipPipPipPip
  • 190 posts
  • Location:Newcastle, Australia

Posted 23 February 2009 - 08:51 PM

Damn you and your thorough testing! ;) I'll take a look at the slices issues.

I actually just uploaded a new version that fixes the rounded rect auto shape problem and also resizes the elements inside groups individually.


Cool bananas. Works a charm

I noticed though that installing each new version requires FW to be restarted before the changes take effect. I thought commands were instantaneous...

And it's not really thorough testing, it's just using your commands in replace of mine for day-to-day activities :)

Looking forward to 1.3 :)

#18 jdunning

jdunning

    Fireworks Ninja

  • Members
  • PipPipPipPipPip
  • 173 posts

Posted 23 February 2009 - 11:29 PM

I noticed though that installing each new version requires FW to be restarted before the changes take effect. I thought commands were instantaneous...

They are, unless you're being too clever for your own good. If you look at the commands, they're all the same. They just check to make sure a particular global method is available, and if it's not, they load another .js file. Then they call the method, which does the actual work. If you don't restart FW after installing the new version, the old version of the global method is still defined, so the commands don't bother reloading the .js and keep using the old version.