Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » timer task for no key typing or mouse movement
timer task for no key typing or mouse movement [message #436244] Sun, 04 September 2005 12:28 Go to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Hello,
How I can build next functionality :

- user log in application and I start timer
- if user don't press key on keyboard or mouse move for xxx sec then I
want start task for logout

Thanks
Re: timer task for no key typing or mouse movement [message #436245 is a reply to message #436244] Sun, 04 September 2005 13:03 Go to previous messageGo to next message
Uwe Peuker is currently offline Uwe PeukerFriend
Messages: 22
Registered: July 2009
Junior Member
Try to overload the "eventLoopIdle" function of "WorkbenchAdvisor".

Uwe


"snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
news:dfei8b$irf$1@news.eclipse.org...
> Hello,
> How I can build next functionality :
>
> - user log in application and I start timer
> - if user don't press key on keyboard or mouse move for xxx sec then I
> want start task for logout
>
> Thanks
Re: timer task for no key typing or mouse movement [message #436266 is a reply to message #436245] Sun, 04 September 2005 22:05 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Thanks Uwe, but how I can catch any key typing or mouse moving ?
I try display.addListener(...) and shell.addListener(...), but
system doesn't notify this listeners
Uwe Peuker wrote:

> Try to overload the "eventLoopIdle" function of "WorkbenchAdvisor".
>
> Uwe
>
>
> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> news:dfei8b$irf$1@news.eclipse.org...
>> Hello,
>> How I can build next functionality :
>>
>> - user log in application and I start timer
>> - if user don't press key on keyboard or mouse move for xxx sec then I
>> want start task for logout
>>
>> Thanks
Re: timer task for no key typing or mouse movement [message #436267 is a reply to message #436266] Sun, 04 September 2005 20:47 Go to previous messageGo to next message
Uwe Peuker is currently offline Uwe PeukerFriend
Messages: 22
Registered: July 2009
Junior Member
The "eventLoopIdle" function will be called after clearing all events from
the event queue like keyboard and mouse events. So you can implicitly
remember the last user action.
A second timer based thread has to check this remembered time against your
interval.

Uwe


"snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
news:dffk1p$kco$1@news.eclipse.org...
> Thanks Uwe, but how I can catch any key typing or mouse moving ?
> I try display.addListener(...) and shell.addListener(...), but
> system doesn't notify this listeners
> Uwe Peuker wrote:
>
>> Try to overload the "eventLoopIdle" function of "WorkbenchAdvisor".
>>
>> Uwe
>>
>>
>> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>> news:dfei8b$irf$1@news.eclipse.org...
>>> Hello,
>>> How I can build next functionality :
>>>
>>> - user log in application and I start timer
>>> - if user don't press key on keyboard or mouse move for xxx sec then I
>>> want start task for logout
>>>
>>> Thanks
>
Re: timer task for no key typing or mouse movement [message #436268 is a reply to message #436267] Sun, 04 September 2005 22:56 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
I don't understand.Is there example ?
Thanks
Uwe Peuker wrote:

> The "eventLoopIdle" function will be called after clearing all events from
> the event queue like keyboard and mouse events. So you can implicitly
> remember the last user action.
> A second timer based thread has to check this remembered time against your
> interval.
>
> Uwe
>
>
> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
> news:dffk1p$kco$1@news.eclipse.org...
>> Thanks Uwe, but how I can catch any key typing or mouse moving ?
>> I try display.addListener(...) and shell.addListener(...), but
>> system doesn't notify this listeners
>> Uwe Peuker wrote:
>>
>>> Try to overload the "eventLoopIdle" function of "WorkbenchAdvisor".
>>>
>>> Uwe
>>>
>>>
>>> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>>> news:dfei8b$irf$1@news.eclipse.org...
>>>> Hello,
>>>> How I can build next functionality :
>>>>
>>>> - user log in application and I start timer
>>>> - if user don't press key on keyboard or mouse move for xxx sec then I
>>>> want start task for logout
>>>>
>>>> Thanks
>>
Re: timer task for no key typing or mouse movement [message #436342 is a reply to message #436244] Tue, 06 September 2005 15:13 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
- you can listen for a keystroke/mouse move globally with
Display.addFilter(...)
- you can define a runnable that is to be run after xxx seconds have passed
with Display.timerExec(...)

Grant

"snpe" <snpe@snpe.co.yu> wrote in message
news:dfei8b$irf$1@news.eclipse.org...
> Hello,
> How I can build next functionality :
>
> - user log in application and I start timer
> - if user don't press key on keyboard or mouse move for xxx sec then I
> want start task for logout
>
> Thanks
Re: timer task for no key typing or mouse movement [message #436348 is a reply to message #436268] Tue, 06 September 2005 19:06 Go to previous message
Uwe Peuker is currently offline Uwe PeukerFriend
Messages: 22
Registered: July 2009
Junior Member
Forget my solution.
We have tried to evaluate the interval between the "eventLoopIdle" function
to determine user inactivity.
But this is very empirical.
Try Grants solution in the side thread.
I think it's what I am was looking for too.

Thanks
Grant

"snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
news:dffn1c$nfk$1@news.eclipse.org...
>I don't understand.Is there example ?
> Thanks
> Uwe Peuker wrote:
>
>> The "eventLoopIdle" function will be called after clearing all events
>> from
>> the event queue like keyboard and mouse events. So you can implicitly
>> remember the last user action.
>> A second timer based thread has to check this remembered time against
>> your
>> interval.
>>
>> Uwe
>>
>>
>> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>> news:dffk1p$kco$1@news.eclipse.org...
>>> Thanks Uwe, but how I can catch any key typing or mouse moving ?
>>> I try display.addListener(...) and shell.addListener(...), but
>>> system doesn't notify this listeners
>>> Uwe Peuker wrote:
>>>
>>>> Try to overload the "eventLoopIdle" function of "WorkbenchAdvisor".
>>>>
>>>> Uwe
>>>>
>>>>
>>>> "snpe" <snpe@snpe.co.yu> schrieb im Newsbeitrag
>>>> news:dfei8b$irf$1@news.eclipse.org...
>>>>> Hello,
>>>>> How I can build next functionality :
>>>>>
>>>>> - user log in application and I start timer
>>>>> - if user don't press key on keyboard or mouse move for xxx sec then
>>>>> I
>>>>> want start task for logout
>>>>>
>>>>> Thanks
>>>
>
Previous Topic:org.eclipse.ui.themes
Next Topic:Printing abstraction layer for SWT
Goto Forum:
  


Current Time: Thu Dec 26 15:07:24 GMT 2024

Powered by FUDForum. Page generated in 0.04518 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top