I seem to have a bug which shows a potential problem when processing multiple key press events in the emulator and the phone.
I am using the latest Symbian series 60 development kit and PC emulator. My phone is a Nokia 7650 and the same bug happens on this as on the emulator.
The zip file for the project is at: http://www.wellytop.com/ShowBug2.zip
Compile the app and when it is running you should see a blank screen except for the little blue bar near the top. This is normal. The output for this application appears in your debug output window. The RDebug::Print() command is used to show which numbered events are being received from the window manager session.
To show the bug follow these steps:
1) Press and hold down the '1' key on the keypad.
2) While holding down '1' press and hold '2'. You will notice that no extra events are shown relating to the '2' key. A key down event should be issued but is not. Release '2'. You will notice a key up event is issued.
3) Release both keys.
4) While holding down '1' press and release the 'C' key. This button seems to generate a key event because a key down and key up event is issued for the 'C' key. Interesting that this key should produce an event when the '2' key does not.
5) While still holding down the '1' key now press the '2' key. You will see key down and key up events for the '2' key. This shows the '3' key is now generating key events properly.
6) Releasing all keys will produce key up events as usual.
What this bug seems to show is that the events for multiple key presses are not being passed to the application until one of the priority keys (of which the 'C' key is one) is pressed.
I would appreciate knowing if this bug is really an OS bug and if anyone else is experiencing this problem?
I was browsing through this thread and didn't find anyone answering to the question above.
In short: it is not a bug - it's a feature Ok, it actually is a feature, it has been decided that by default multiple keypresses are ignored. Check out e.g. CAknAppUi::SetKeyBlockMode function to enable those.
Just a warning that even after unblocking the keys there are still limitations on how many keys can simultaneously be pressed.
I faced the same problem in my EXEDLL project.
I guess this is because it's not correct to run EXEDLL as APP
You should (I'm sure 99% there is no other way) create an APP
which calls your EXEDLL program
In this case everything works fine
if SetKeyBlockMode(ENoKeyBlock) is called in APP before running EXEDLL.
P.S. I wonder what undocumented (but i hope public) API
is called in SetKeyBlockMode().
> In this case everything works fine
> if SetKeyBlockMode(ENoKeyBlock) is called in APP before running EXEDLL.
Can anyone post example code of this? My attempt to achieve it didn't work. I took HelloWorld from Series60Ex, and in CHelloWorldAppUi::ConstructL() added SetKeyBlockMode( ENoKeyBlock ) after BaseConstructL(), and then started the EXE. Am I doing something wrong?
Someone mentioned in another topic that the Series60 SDK needs an example of creating a game environment using an EXE (not an App). I understand that an App is the "correct" way in Symbian OS, but for those who are porting existing code or are trying to build a common library which works on several platforms including Symbian, EXE is the only way to go. Given all the problems the beginning Symbian game programmer has to overcome (mostly without much help or info), I'd say such an example is *desperately* needed.