It's as simple as:
js code:
ChatWnd.EditText_ReplaceSel("my replacement");
return true;
When Shift+2 is pressed, the current selection is replaced with whatever you pass to that method. When the user hasn't selected anything but is simply typing, Plus! will treat this as a selection at the current position with zero length. Therefore when you call EditText_ReplaceSel, your replacement will be inserted at the current position. After replacing the selection, simply return true to make Plus! and Messenger stop processing this key.