Subject: focus (was Re: Bug 435 - accents only work after font change)
From: Paul Rohr (paul@abisource.com)
Date: Fri Mar 24 2000 - 01:07:38 CST
Aaron, 
A quick response for you.  
1.  The reason we do keyboard handling at the toplevel window is to allow 
the configurable keybinding mechanism to work.  Keystrokes may come in for 
command-key accelerators and/or for typing into the document.  The important 
thing is to have all of the keyboard events wind up in one central place for 
processing.  Doing so in XAP code is ideal, because the resulting XP 
mechanism will then be available for any application using our framework.  
If you wind up deciding to move focus to one of the child widgets, then 
you'll need to make sure that attempts to send focus elsewhere inside the 
top-level container are forwarded appropriately.  
2.  However, we definitely *do* need to do a better job of integrating what 
we do with platform-specific notions of focus, even if we just use the 
normal focus mechanisms as a filtering cue for simulating the desired 
behavior.  For example, 
  - we should know when to claim and give up the focus (and then do so)
  - we should ignore keyboard events when we *don't* have the focus
  - we shouldn't draw selections or blink the cursor then either
There are probably more details I'm forgetting, but I wanted to confirm that 
this *is* a real problem that could use a good solution.  If you'd like to 
team up with folks on the various platforms to spec what the desired focus 
*behavior* should be, that'll take care of the hardest part.  
By comparison, once you've got those details spec-ed out, getting that 
behavior implemented shouldn't be that bad.  
Paul
This archive was generated by hypermail 2b25 : Fri Mar 24 2000 - 01:02:09 CST