Skip to main content
JLphotography
Participant
October 18, 2019
Question

Need Javascript help to program a keystroke

  • October 18, 2019
  • 1 reply
  • 401 views

I need a Javascript file that, when executed, does the same thing as pressing the Home key.  When I am ready to despeckle a photo in Photoshop, I zoom to 60% and hit the home key which takes me to the top left corner of the image.  I have code to zoom to 60%, but I want to add the Home key in the action.  Can someone show me some code which does a keypress on the Home key?

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
October 18, 2019

Photoshop can create keyboard handlers to filter keystroke. However, it can not press a key or move the cursor or scroll a image within a window.  The is no view menu item that duplicate  view shortcuts like Home and End. So I do not think you can automate what you want to automate with an Action or Script.  You can not even zoom to 60% with a Action or script, Zoom in, out. fit on screen, 100% , 200% yes, but 60% no.

JJMack
Stephen Marsh
Community Expert
Community Expert
October 18, 2019