Its quite simple, at first check if you have a .cdsinit file in the library (the folder in which you run virtuoso), if not create one/add the following lines:
So, the script will be automatically loaded, now in the script, use the bindkey command so that the particular function is loaded whenever you press a certain key.
eg.: bk("Layout" "<Key>up" "geScroll(nil \"n\" nil)")
[This will bind the graphics editor (ge) function to scroll with the 'up' key.]
Let me know if you need any further help.