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

Re: [XaraXtreme-dev] Keypress handling



Phil,

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...)

I am only advocating grabbing the keypresses used for the page locally.
Anything else would be passed on via the normal hierarchy (i.e. you
don't filter the event in the case you should be passing it on).

But centralising stuff that is designed for the page is exactly what you
want to do isn't it? Otherwise, potentially every control and every window
needs to know to pass document keystrokes back to the document, and
sometimes NO window seems to receive keys, which is I think what Luke's
problem was (unless I've misunderstood it).

Alex