Wanted: Origin to 3D cursor script

In 2.58, In Object Mode, there is the function in the Object Menu, “Origin to 3D Cursor”. All I want is a script that would let me assign a keyboard key (or group of keys) to that operation since I use it a lot when mesh modelling ( . . .doesn’t anyone else use it as much as me?). Can anyone help me with that? It seems to me that it should be a simple Python script (although I know nothing about Python scripting). Thanks.

You don’t need a script, you can just add a custom shortcut in the User Preferences / Input panel
Under 3D View / 3D view Global add the following (in this case the shortcut set to Shift+Ctrl+Alt+O) but set to whatever you want the shortcut to be.
Demo: http://screencast.com/t/F107TXWqVTi


Thanks, it took a little digging to find where to add it but it’s all done now.