KeyDown and Floating Windows

I have come upon another change in functionality resulting from my switch from RB2008 to Xojo (or perhaps from Carbon to Cocoa). Previously, floating windows did not receive KeyDown events; instead, they went to the frontmost non-floating window. But now, key presses do seem to go to the floating window–sometimes, anyway. What I’m seeing is that when a floater is first created, key presses go to it. But then, if the user clicks on the frontmost non-floating window, then subsequent key presses will start going to that window again–after which there appears to be no way to make them go to the floater anymore.

Does anyone know if there is any way to make things behave better? In particular, it would be great if I could somehow handle certain keys in the floating window, but other keys in the non-floating window. But if I can’t do that, then it would at least be nice to give the user some consistent way of indicating which window a keystroke is intended for…

[quote=207904:@Dave Jacobi]I have come upon another change in functionality resulting from my switch from RB2008 to Xojo (or perhaps from Carbon to Cocoa). Previously, floating windows did not receive KeyDown events; instead, they went to the frontmost non-floating window. But now, key presses do seem to go to the floating window–sometimes, anyway. What I’m seeing is that when a floater is first created, key presses go to it. But then, if the user clicks on the frontmost non-floating window, then subsequent key presses will start going to that window again–after which there appears to be no way to make them go to the floater anymore.

Does anyone know if there is any way to make things behave better? In particular, it would be great if I could somehow handle certain keys in the floating window, but other keys in the non-floating window. But if I can’t do that, then it would at least be nice to give the user some consistent way of indicating which window a keystroke is intended for…[/quote]

When the floating window is activated, it does get the keydown event like any other window. But when another window is active, that window gets the keydown. It is consistent with the way windows in general work, floating or not.

The only way you can catch keys no matter the active window is with KeyBoard.AsyncKeydown, eventually from App.