I have managed to get this to work with AutoHotKey v2.0. Below is the script. I currently have the functions mapped to Ctrl-Arrow. I have two sets of arrow keys in my keyboard setup, so I will map the second set to the modified Ctrl-Arrow keys.
You need to change the command window font to Lucida Console (because it is a fixed width font).
#Requires AutoHotkey v2.0
^Left::
{
if(WinActive(“ahk_exe rhino.exe”))
{
MouseGetPos &MouseX, &MouseY, &MouseWin, &MouseControl
if(CaretGetPos(&OutputVarX, &OutputVarY))
{
if(OutputVarY=141)
{
if(OutputVarX>81)
{
Click OutputVarX-7, OutputVarY
MouseMove MouseX, MouseY
}
}
else
{
Send “{Left}”
}
}
else
{
Click 1341, 141
MouseMove MouseX, MouseY
}
}
else
{
Send “{Left}”
}
}
^Right::
{
if(WinActive(“ahk_exe rhino.exe”))
{
MouseGetPos &MouseX, &MouseY, &MouseWin, &MouseControl
if(CaretGetPos(&OutputVarX, &OutputVarY))
{
if(OutputVarY=141)
{
Click OutputVarX+7, OutputVarY
MouseMove MouseX, MouseY
}
else
{
Send “{Right}”
}
}
else
{
Click 1341, 141
MouseMove MouseX, MouseY
}
}
else
{
Send “{Right}”
}
}
^Up::
{
if(WinActive(“ahk_exe rhino.exe”))
{
MouseGetPos &MouseX, &MouseY, &MouseWin, &MouseControl
if(CaretGetPos(&OutputVarX, &OutputVarY))
{
if(OutputVarY>0 && OutputVarY<=141)
{
Click OutputVarX, OutputVarY-12
MouseMove MouseX, MouseY
}
else
{
Send “{Up}”
}
}
else
{
Click 1341, 141
MouseMove MouseX, MouseY
}
}
else
{
Send “{Up}”
}
}
^Down::
{
if(WinActive(“ahk_exe rhino.exe”))
{
MouseGetPos &MouseX, &MouseY, &MouseWin, &MouseControl
if(CaretGetPos(&OutputVarX, &OutputVarY))
{
if(OutputVarY>=0 && OutputVarY<141)
{
Click OutputVarX, OutputVarY+12
Sleep 100
CaretGetPos(&OutputVarX2, &OutputVarY2)
if(OutputVarY2=OutputVarY)
{
if(OutputVarX<81)
{
Click 81,141
}
else
{
Click OutputVarX,141
}
}
MouseMove MouseX, MouseY
}
else if(OutputVarY=141)
{
}
else
{
Send “{Down}”
}
}
else
{
Click 1341, 141
MouseMove MouseX, MouseY
}
}
else
{
Send “{Down}”
}
}