• 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: Keystrokes for non-ascii letters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keystrokes for non-ascii letters


  • Subject: Re: Keystrokes for non-ascii letters
  • From: Dave DeLong <email@hidden>
  • Date: Sat, 29 Nov 2008 11:48:05 -0700

The client application is running on an iPhone/iPod touch and is sending events to the server, which runs (as I mentioned) as an agent application on the desktop. I'm writing both.

The purpose of the server application is to dispatch events to the system. These can be many different kinds of events, and right now I'm working on getting the key events to dispatch properly. If I have a keycode, I can successfully use CGEventCreateKeyboardEvent to create and dispatch hard coded keystrokes.

My goal now is to accept arbitrary strings and post the keyboard events for them. For ASCII characters, I can easily dispatch a CGEventRef. However, I want to be able to send non-ascii characters as well. Basically, any character that's valid on the iPhone I want to be able to mimic on the desktop. So this includes things like £, but also Asian characters that are inputted via the drawing keyboard.

Any ideas how I could go about this?

Thanks,

Dave

On 29 Nov, 2008, at 11:34 AM, Bill Bumgarner wrote:

On Nov 29, 2008, at 10:00 AM, Dave DeLong wrote:
Can this be used for posting events that would get picked up by other applications?

Nope.

To be honest, I don't know how you post such events to another application -- specifically targeted to another application. In general, Mac OS X maintains a notion of a active application. The [there can only be one] active application is the one to which all keyboard events are directed, save for system hot-key type key events. While, certainly, mouse events can be directed to other applications, any kind of a click event is generally also going to cause the active application to change.

You have mentioned "server" application. Do you have a specific client application you are targeting? Or are you trying to generically send key events to various apps on the system?

b.bum
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Keystrokes for non-ascii letters
      • From: "James W. Walker" <email@hidden>
References: 
 >Keystrokes for non-ascii letters (From: Dave DeLong <email@hidden>)
 >Re: Keystrokes for non-ascii letters (From: Ricky Sharp <email@hidden>)
 >Re: Keystrokes for non-ascii letters (From: Dave DeLong <email@hidden>)
 >Re: Keystrokes for non-ascii letters (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Checking One Array Against Another
  • Next by Date: Re: Checking One Array Against Another
  • Previous by thread: Re: Keystrokes for non-ascii letters
  • Next by thread: Re: Keystrokes for non-ascii letters
  • Index(es):
    • Date
    • Thread