I stumbled across a problem on my LAN last night that kept me busy for a few hours.
I have a laptop with a broken screen, and my main PC which is pretty crap - so I decided to install TightVNC server onto the laptop and remotely operate 3DS Max that way.
The problem occurs when you try to write a script in Max .. the Enter key sends the same control codes as the NumPad enter key (E0_1C instead of 00_1C, I think), which means that you cannot insert a carriage return in a maxscript, it actually tries to evaluate the line of code.
So, I then embarked on a series of tests ...
Use a different VNC server
Test: RealVNC Server
Result: same problem
Test: TigerVNC Server
Result: same problem
Use a COM interface to send code to max remotely
Test: Use Sublime Text Editor 2 + SendToMax
Result: Number keys do not work in STE
Remap the keyboard
Test: Sharpkeys
Result: same problem (cannot enter substitution code for Enter Key)
Test: MapKeyboard
Result: same problem
Test: AutoHotKey
Result: SUCCESS !!!!
Not only that but, unlike SharpKeys and MapKeyboard, changing/disabling the mapping does not require logging off
Although AutoHotkey can be used to launch macros, applications, send mouseclicks etc, all that was needed was a simple 2-line script:
NumpadEnter:: Enter
Return
Note: Because the scripts can be paused (i.e. turned on/off) or alternate scripts loaded at any time (even by using hotkeys), you could use it to remap just about anything.
I have a laptop with a broken screen, and my main PC which is pretty crap - so I decided to install TightVNC server onto the laptop and remotely operate 3DS Max that way.
The problem occurs when you try to write a script in Max .. the Enter key sends the same control codes as the NumPad enter key (E0_1C instead of 00_1C, I think), which means that you cannot insert a carriage return in a maxscript, it actually tries to evaluate the line of code.
So, I then embarked on a series of tests ...
Use a different VNC server
Test: RealVNC Server
Result: same problem
Test: TigerVNC Server
Result: same problem
Use a COM interface to send code to max remotely
Test: Use Sublime Text Editor 2 + SendToMax
Result: Number keys do not work in STE
Remap the keyboard
Test: Sharpkeys
Result: same problem (cannot enter substitution code for Enter Key)
Test: MapKeyboard
Result: same problem
Test: AutoHotKey
Result: SUCCESS !!!!
Not only that but, unlike SharpKeys and MapKeyboard, changing/disabling the mapping does not require logging off
Although AutoHotkey can be used to launch macros, applications, send mouseclicks etc, all that was needed was a simple 2-line script:
NumpadEnter:: Enter
Return
Note: Because the scripts can be paused (i.e. turned on/off) or alternate scripts loaded at any time (even by using hotkeys), you could use it to remap just about anything.