tags:

views:

24

answers:

1

I am working on an application which allows the user to perform input via international keyboard on a Mac. However, the Composition window displayed by the Mac OS for the user to type in the characters is located outside my application's view. I need to move the location of the composition window so that it overlaps the edit window inside my application. Please let me know if there is a way this can be done programmatically?

A: 

The only (non-hacky) way to move windows that don't belong to you is to use the Accessibility Framework. You'll want to convert your view frame's coordinates to screen coordinates, then use the Accessibility API to move the window to that screen-coordinate-based frame.

Joshua Nozzi
Please let me know if there is an API which I can use to get a handle to the Input method's Composition window, so that I can move it to its new location ?
Anisha Saigal
That's exactly what I just did.
Joshua Nozzi
Please let me know the name of this API
Anisha Saigal
*Read the answer I posted and follow the link.* How can you expect help if you're unwilling to read?
Joshua Nozzi
I apologize as I missed seeing the link. I will check it out .Thanks
Anisha Saigal
hi Joshua: I implemented the NSTextInputClient protocol in my View and now I am able to capture the keystrokes from the international keyboard. However,as a result of implementation of this protocol, the system has disabled the display of the international input's composition window. As a result of this the user cannot see the characters as they are being typed (before the Enter key is pressed). Please let me know if there is a way to enable the display of this composition window. Thanks in advance for your help.
Anisha Saigal