I was wondering, besides locking screen by pressing Nexus S right side power hardware button, is there any way to lock screen, using software button press instead of hardware?
There are many widgets available on the Android Market that provide this functionality.
If you are running a custom ROM on your Nexus S (e.g. CyanogenMod) you might already have this feature within the Notification power widget. Go to
Menu -> Settings -> CyanogenMod Settings -> Interface -> Notification power widget -> Widget buttons and enable the
Go to sleep button (also enable the widget itself in the previous screen.) Now when you pull down the notification bar you can tap the "zzZ" button to lock the phone.