Data.func.fromkey get's lost

Hello! o)

If a scriptcommand is invoked by a hotkey, the property data.func.fromkey is set to true, which is expected.
But that value get's lost for the next scriptcommand executed. Quite similar to what has been fixed for the qualifiers lately: Qualifiers don't get through

Find a scriptcommand attached, which demos how the "fromkey" value (true) is lost on the second invokation.
I guess the same is true for "fromdrop", but this property currently is not working at all for me, so I cannot really tell.

function OnInit(data){ = "Command.General: MyDraggedCommand";
data.default_enable = true;
var cmd = data.AddCommand(); = "MyDraggedCommand";
cmd.method = "Command_MyDraggedCommand";
function Command_MyDraggedCommand(data) {
DOpus.Output(data.cmdline+" data.func.fromdrop : " + data.func.fromdrop);
DOpus.Output(data.cmdline+" data.func.fromkey : " + data.func.fromkey);
DOpus.Output(data.cmdline+" data.func.qualifiers: " + data.func.qualifiers);

if (data.cmdline != "MyDraggedCommand 2ndCall():")
	data.func.command.RunCommand("MyDraggedCommand 2ndCall():");


Thank you! o))

I think this behaviour is correct.

FromKey is only for the top level command. If you then run other commands yourself, it's up to you to tell those commands what to do, or to call SetQualifiers on the command object to pass the keys through as desired.

If it wasn't this way, you wouldn't be able to stop them interpreting the keys if you wanted different behaviour. You have full control now, and only what you explicitly request will happen, as it should be to avoid unexpected behaviour.

You're right, it is not similar to the qualifier issue I linked to, sorry for that!
I looked at some of my code again and saw that I indeed pass the qualifiers by calling: data.func.command.SetQualifiers(data.func.qualifiers);

So, I guess I need to rephrase: data.func.fromkey/fromdrop cannot be passed on to the next script command! o)

Good night Leo!

I guess the command object could let the caller trick the command into thinking it is being called via hotkey or drag and drop, like they can trick it into thinking different keys were held down. (Technically, they are being called via a script, not a key or drop. That the script was called via drag and drop or a hotkey is not a transitive property.)

What kind of situation do you find youself needing this in?