• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: keystroke (ASCII character 28) using shift down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keystroke (ASCII character 28) using shift down


  • Subject: Re: keystroke (ASCII character 28) using shift down
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 12 Sep 2004 10:15:47 -0700

Title: Re: keystroke (ASCII character 28) using shift down
On 9/12/04 6:38 AM, "Mark Butcher" <email@hidden> wrote:

I'm having trouble getting System Events to invoke a keystroke, specifically the 'shift-left arrow' to select the previous character to the insertion point. Here is the problem line:

keystroke (ASCII character 28) using shift down -- left arrow key
 

I already discovered this in an AppleScript Studio app I made. None of the four arrow keys could be typed this way as they could in the old keypress emulator osaxen in OS 9 (Akua, Sandi's) Actually, those four keys: ASCII character 18. 19, 30, 31 are not truly the arrow keys. They're properly

    28 = FS (File Separator)
    29 = GS (Groups Separator)
    30 = RS (Group Separator)
    31 = US (Unit Separator)

They were conventionally "assigned" in the old Mac OS to the arrow keys : the documentation was buried very, very deep in "Inside Macintosh" - I recall it tool me days to find it.

Anyway, this "quasi-hack" has not persisted to OS X. I see you tried 'key code' - currently commented out. That's what I'm using too, and it works. Two senior Apple engineers told me that there was no need to fear that the key codes for the arrow keys (or other keys) worked only on the most recent keyboards. (The dictionary in AS Studio says that these codes are "machine-dependent".) They said they the key codes should work on any keyboard any user is likely to have. I think it's a safe assumption that any keyboard being used with a machine that can run OS X (which your script requires for "System Events"'s Process Suite - in fact you need OS 10.3) will be fine.

--
Paul Berkowitz
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >keystroke (ASCII character 28) using shift down (From: Mark Butcher <email@hidden>)

  • Prev by Date: Re: Uptime
  • Next by Date: Trial Run...
  • Previous by thread: keystroke (ASCII character 28) using shift down
  • Next by thread: Re: keystroke (ASCII character 28) using shift down
  • Index(es):
    • Date
    • Thread