Dear fellows,
I'd like to change the format code action assignment to Ctrl+Alt+Shfit+F, because Ctrl+D is very easy to hit unintentionally. Based on articles I found ou there I was able to simply kill it, but now I need to simply reassign its hot key, and I am at a total loss here.
I have a very vage remembrance of coming across sample code for OTAPI that was an actual keyboard mapping, it was quite a while ago , I'm not sure I really did. I took a wild guess from what found and tried
The relevant section of wat I did so far is
procedure TMelhoriasEditor.BindKeyboard(const BindingServices: IOTAKeyBindingServices);
var
LBindingRec : TKeyBindingRec;
LFmtKeyBidingProc : TKeyBindingProc;
begin
(BorlandIDEServices as IOTAKeyboardServices)
.LookupKeyBinding([Shortcut(Ord('D'), [ssCtrl])],LBindingRec);
LFmtKeyBidingProc := LBindingRec.KeyProc;
BindingServices.AddKeyBinding(
[
Shortcut(
Ord('F'),
[ssCtrl,ssAlt,ssShift]
)
],
LFmtKeyBidingProc,
nil
);
BindingServices.AddKeyBinding([Shortcut(VK_INSERT, [ssCtrl,ssAlt,ssShift])], AlternarModoInsercao, nil);
BindingServices.AddKeyBinding([Shortcut(VK_INSERT, [])], MatarTecla, nil);
BindingServices.AddKeyBinding([Shortcut(VK_RETURN, [ssCtrl])], InserirLinhaAbaixo, nil);
BindingServices.AddKeyBinding([Shortcut(VK_RETURN, [ssShift])], InserirLinhaAbaixo, nil);
// BindingServices.AddKeyBinding([Shortcut(Ord('D'), [ssCtrl])], MatarTecla, nil);
end;
Could some kind soul put me in the right track, please? Also, am I dreaming about having seen such code for a keyboard mapping?
Thank you very much.
-- Carlos