I have created a virtual keyboard library in adobe flex.
I have already created an ANE for Windows to set the keyboad always on top and non focusable. Using:
int exstyle = GetWindowLong(hwnd3, GWL_EXSTYLE);
exstyle |= WS_EX_NOACTIVATE;
But now I have to create an ANE for the mac (OS 10.7)
- I have to access the keyboard (keywindow) from the running flex application
- Set it always on top and non focusable(even if I click on the keys or select keyboard language from combobox of the keyboard it will not get focused). So that the cursor will always stay in the editor.
I have tested a sample mac application (for testing purpose only) by using
setLevel:NSFloatingWindowLevel
However when I click on the blank area of the window it is not getting focused (cursor stays in my editor/textarea), but when I click on any button on it that button get focused.
How to access the flex virtual keyboard and set it to No-Activate mode in Mac
------------------------------ADDED--------------------------------------------------------
I have used this code to set my Flex application at top of all windows NSWindow
*myMainWindow = [[[NSApplication sharedApplication] windows] objectAtIndex:0];
//[myMainWindow setLevel:NSFloatingWindowLevel];
[myMainWindow setLevel:NSMainMenuWindowLevel+1];
But I want to deactivate that window so that it won't get focused. like KeyboardViewer in mac. The KeyEvent should be redirected to the current TextInput for every click of the key(Flex Keyboard).
Please help me with your suggestions.