In my opinion what you wanna do is not possible. There are always a cancel command in a softkey and the menu (if there are more than one command added) in the other softkey.
To get the correct keyCode
, to set another funtionallity to the softkey you should get the correct keyCode
. Make a System.out.println("keycode " + keyCode);
before the first line in the method keyReleased