Okay, what I did after a day of research in the FDK (and some other) documentation(s), is this piece of code:
Notification(Constants.FA_Note_PreFunction,Constants.FA_Note_PostFunction, true);
function Notify(note, object, sparam, iparam) {
switch (note) {
case Constants.FA_Note_PostFunction:
break;
case Constants.FA_Note_PreFunction:
if (sparam=="z") {
var tl = new TextLoc();
tl=app.ActiveDoc.TextSelection.beg;
app.ActiveDoc.AddText (tl, "y");
ReturnValue(Constants.FR_CancelOperation);
}
break;
}
}
It does not solve my problem with changing the "z" to a "y" entirely as the cursor stays in front of the y, where as I need it after the y for regular typing, but I think I can solve that problem somehow.
But I still have problems solving my second issue with catching the arrow keys. I SHOULD get their f-codes by the iparam (or at least the FDK documentation says something like that), but all I get is invalid objects. As the sparam for these keys is null it seems that I am stuck here. Does anyone have an idea how to catch keys that are no regular String characters?