Dictionary called KeyMap
KeyMap.setKey([custom.key], [action.key] )
Function.Call( KeyMap.Get( keypressed ) )
so when setting say
Set.Up KeyMap( "W", "UP")
Set.Down KeyMap( "S", "DOWN")
However the real trick is run time control
On Any Key Pressed
-- Function.Call( "Pressed" & KeyMap.Get( KeyPressed ) )
On Any Key Released
-- Function.Call( "Released" & KeyMap.Get( KeyPressed ) )
You need to define how to set up the key map your self. but that's one theory of how to do custom key mapping.