[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Keypress handling



Phil Martin wrote:

Centralised key handling sounds like a potential rat's nest to me, since it will have to know information about individual controls, views, documents, windows, application state and focus location. URGH!

Can we not do this in what seems to me the obvious way? I.e. distributed and object-oriented - allow the object at the sharp-end, the one with the focus, to handle its own keypresses and if not, pass them up a command chain?

(Er, note that, that's what the Input Focus handling rules say should happen conceptually so why not /do/ it instead of /simulating/ it...)

Phil

I entirely agree with you, if we could make this work. For example the accelerators should really be handled in the main frame, but if the focus is in the render windows (as it will be most of the time) we never get the key down messages and the accelerators don't work. I'm just trying to find something that works with the idiosyncratities of the wx key handling code.

   Luke