Capturing the slider events on the Nokia N95
Article Metadata
The Nokia N95's slider sends the following key events:
(1) Open keyboard slider
aType = 0x0003, iCode = 0x0000, iScanCode = 0x00ac (EStdKeyDevice8)
aType = 0x0002, iCode = 0x0000, iScanCode = 0x00ac
(2) Close keyboard slider
aType = 0x0003, iCode = 0x0000, iScanCode = 0x00ad (EStdKeyDevice9)
aType = 0x0002, iCode = 0x0000, iScanCode = 0x00ad
(3) Open music slider
aType = 0x0003, iCode = 0x0000, iScanCode = 0x00a8 (EStdKeyDevice4)
aType = 0x0002, iCode = 0x0000, iScanCode = 0x00a8
(4) Close music slider
aType = 0x0003, iCode = 0x0000, iScanCode = 0x00a9 (EStdKeyDevice5)
aType = 0x0002, iCode = 0x0000, iScanCode = 0x00a9
Take care! In the S60 SDK (eikon.hrh), there are some helpful ids defined:
#define EKeyGripOpen EKeyDevice4
#define EKeyGripClose EKeyDevice5
#define EKeyTwistOpen EKeyDevice8
#define EKeyTwistClose EKeyDevice9
But they do not help. There is never a iCode sent. The slider only sends iScanCode events. There is no EStdKeyGripOpen defined, so you have to put the generic defines from Symbian into your code.


Well done AlexOfBorg!
ltomuta 15:26, 27 November 2007 (EET)
18 Sep
2009
A very good reference for programmers require to track the sliding event for N95 device. It provides the key event code to look for in order to track the slider event.