Actually, you can capture keystrokes destined for any application in Symbian OS.
RWindowGroup::CaptureKey()
and RWindowGroup::CaptureLongKey()
allow your executable to capture keys from any applicaton, whether yours is in the foreground or not.
However, in this case this may prove to be tedious - these two functions work by capturing specific key codes and modifier combinations, so you would have to set up a lot of captures to deal with all the key combinations in the SMS composer.
You would also have to pass the event on to the SMS composer once your exectuable had captured it. Whilst nominally possible using RWsSession::SendEventToWindowGroup()
or TApaTask::SendKey()
, there are complexities involved the events arrive in right order (i.e. key down, key event, key up) and behaviour of different FEPs (Front End Processors) for user input.
So whilst it is nominally feasible to do what you require as above, it would prove to be tedious to implement and test, bordering on the risky. If all you want to do is analyse writing style to collect data (rather than in a product app), you might be better off writing your own SMS composer - there are plenty of examples on the Forum Nokia web site of editors and SMS sending.