08-06-2012 12:00 PM
Solved! Go to Solution.
08-16-2012 02:13 PM
I'm not 100% sure what you are doing since your code seems to have lost it's formatting (try pasting it in with the insert code button when you make a post), but are you registering an implementation of a KeyListener anywhere?
I believe you also need to make sure you are getting the key pressed via the Keypad.key() method.
08-16-2012 05:44 PM
What I wanted to do it's to generate two types of events with the trackpad, you can take a BlackBerry equipped with
a track wheel as example, so that it generate a horizontal movement but with the Alt key press in it generate a vertical
movement.
In fact, I have solve my problem since a long time, but still, thank for your reply.
My source code look like this:
_myScreen = new FullScreen(){
boolean isAlt=false;
protected boolean trackwheelClick(int status, int time){
_myScreen.userClick();
return true;
}
protected boolean keyDown(int keycode, int time){
//-The alt KeyCode is generate. The alt key is press in but it's have
// a different Keycode whether the alt function is disable or enable.
if(keycode== 16842752 || keycode== 16842753){
_myScreen.isAlt= true;
}
return super.keyDown(keycode, time);
}
protected boolean keyUp(int keycode, int time){
if(keycode== 16842752 || keycode== 16842753){
_myScreen.isAlt= false;
}
return super.keyUp(keycode, time);
}
protected boolean navigationMovement(int dx, int dy,int status, int time){
if(dx>0){
if(_glRenderer.isAlt){
//-generate a key Alt press in event with the trakpad
}else{
//-generate a NO key Alt press in event with the trakpad
}
}
if(dx<0){
if(_glRenderer.isAlt){
//-generate a key Alt press in event with the trakpad
}else{
//-generate a NO key Alt press in event with the trakpad
}
}
if(dy>0){
if(_glRenderer.isAlt){
//-generate a key Alt press in event with the trakpad
}else{
//-generate a NO key Alt press in event with the trakpad }
}
if(dy<0){
if(_glRenderer.isAlt){
//-generate a key Alt press in event with the trakpad
}else{
//-generate a NO key Alt press in event with the trakpad
}
}
return true;
}
};
Moenro Jeanniton.