(keitai-l) Re: i-mode - DOJA - KEY_PRESSED_EVENT

From: Horaci Cuevas <hcuevas_at_funtropy.com>
Date: 02/19/04
Message-ID: <004601c3f6ae$23f2e850$030aa8c0@tesys>
César,

    Use the KEY_RELEASED_EVENT to control when a key has been released.
You'll need to store the key event in a variable (ex: key_5 = 1;) and set it
on the release event (ex: key_5 = 0). If you need to know how long the user
has pressed the key, store a timestamp in the variable and make the
difference on release.

Sorry for my bad english :)

Cheers,
Horaci Cuevas

----- Original Message ----- 
From: "César Fernández" <cfernandez@insidelabs.com>
To: <KEITAI-L@appelsiini.net>
Sent: Thursday, February 19, 2004 1:56 AM
Subject: (keitai-l) i-mode - DOJA - KEY_PRESSED_EVENT


> When using the processEvent() method for handling low level events such
> as a key press, I want to know how long a key is pressed. When a key is
> pressed one KEY_PRESSED_EVENT event is generated, and I think that no
> more events are generated while that key is pressed until the key is
> released. Suppose that I want, for example, print a '5' when the key  #5
> is pressed, but if the key is still being pressed I want to keep on
> printing 5s while the key is pressed. Is there any way to get events
> generated while the key is pressed in order to do that?
Received on Thu Feb 19 08:10:40 2004