Keyhelper will work with the SL5500 Sharp 3.x ROMs but that is not needed for something as simple as this. Like DrWowe said, create the script as a text file as above an put it in /home/QtPalmtop/bin ensuring it is in Unix text format. Make it executable and then create a desktop icon with the Tab Setting app and set the Exec field to the script file name (not the full path). You can then use this on the Menu button using the Application Keys app.
As for the QCOP messages, the standard Trolltech ones are listed here:
http://doc.trolltech.com/qtopia1.6/html/qcop.htmlHowever Sharp\'s Qtopia has a few extra undocumented ones, like setBlankLCD. Also you have to look at the Qtopia source code to figure out what you\'re supposed pass to things like setScreenSaverInterval which somewhat unintuitively controls the screen dimming and autosuspend. I\'m not sure if the Trolltech setDefaultRotation is the same as the one in Sharp\'s Qtopia since Sharp implemented rotation before Trolltech I think, or at least independently. Without the source code, the best you can do is grep libqpe for qcop strings.