On 2/21/10, Brian Wang <[email protected]> wrote: > On Sun, Feb 14, 2010 at 9:20 AM, Carsten Haitzler <[email protected]> > wrote: >> On Fri, 12 Feb 2010 16:18:21 +0800 Brian Wang <[email protected]> >> said: >> >>> Hello all, >>> >>> Here comes another newbie's question: >>> How can I grab a key event if the key binding is already set in >>> enlightenment? >>> >>> Thanks in advance. >> >> once a wm grabs a key - it is gone for application input. event gets >> delivered >> to the wm, not the app with the focus. same with any x client grabbing a >> key. >> it'd generally be bad to pass it on as now you end up with the same event >> being >> reacted to twice. this would need care. but as such - e uses the key to >> flip >> desktops or close a window etc. etc. so it makes no sense to pass them on >> in >> general as the event is acted on already. > > The use case I'm thinking of is that the application may want to > handle this key event differently. For example, the application may > want to display the volume differently (visually) to suit its > interface. If wm takes away the event, the application would have to > poll and display the volume. The UI may become less responsive this > way. > > Since it's the way right now, I'll have to come up with an alternative. > However, it's still quite surprising to me that the application cannot > register a callback handler of the key events to the wm. > > Thanks for the insight. :-)
do u have a better real use case than volume case? it is a very unfortunate example for a number of reasons, the biggest being lack of consistency... and you have easy cases to be informed without any polling (timed polling) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
