With many thanks to Graham over at the Nokia Discussion forums I came across an interesting Wiki article (Platform independent key events processing) which provides a class that tries to determine common non-standard keycodes for a variety of handsets. The second handset that I tested was an LG KS360, unfortunately this detection class was unable to detect the soft key buttons.
I have combined my welcome screen based soft-key detection into that class as a fail-safe, and this seems to be working well. Where possible the correct keycodes are detected by working out the device vendor, and then where all else fails, accept the first non-standard keycode that is returned from the welcome screen for the left soft-key.
I also added a
SOFTKEY_GUESSED field which indicates if the left soft-key value was
guessed. If it was, then you can decide whether or not to allow other non-standard keys to
represent the right soft-key. You might decide against guessing the right soft-key in more
critical scenarios where data could potentially be lost by pressing another unrelated
button on the keypad.
The combination of these two techniques seems to provide a much better solution.