So, does it mean that the hardkey would be registered under the registry and the softkey would be just the GUI?
But, both should generate the same key event right?? How come I could not get any key event out of hardkey??
Yes, I expect that the default (viz. not intercepted) behaviour of the hard keys would be in the registry somewhere. Actually I would like to know where but have not asked that question yet. Partly because the answer may depend on what type the device is and/or which OS, which would make it a bit complicated. My device has a Settings screen to choose the default or Today Screen action of each hard key for quick and slow presses.
On your second question, no, the process of establishing an event Sub for hard and soft keys is different. For soft keys the event Sub is named depending on the name you have chosen for the key/button. For hard keys they all come via one event Sub which is named after the name of the HardKey object that you have to set up within the Hardware library, as in my HardKey_HardKeyPressed below. Then you have to test for which KeyN (1 <= N <= 5) has been pressed.
(In my Music Player program I wanted to have the hard key #5, which on my device is on the side and can be pressed even when it is in its protective case, to be a "pause"/"play" key, so I use event HardKey_HardKeyPressed and check for HardKey.Key5. But really I would like other keys to have their default purpose which requires reading it from the registry or somewhere.)
HTH, Mike.