4coder modifier keys for shortcuts

Long time no see. I have tried to map in 4coder's project.4coder the following:

fkey_command[1] = "build"; fkey_command[2] = "run"; fkey_command[3] = "assemble"; fkey_command[4] = "buildSquare"; fkey_command[5] = "buildHndMd"; fkey_command[6] = "buildBeatEmUp01"; fkey_command[7] = "buildPerceptron"; fkey_command[1, ctrl] = "buildYetAnother";

But unfortunately the following message appears when I alt+x and load_project:

Project errors: C:/Users/User/Apps/4coder/Build/project.4coder:138:15: expected an l-value; l-value formats: 'identifier', 'identifier[#]'

I consulted an LLM, and it suggested to place the following line bellow the list of fkey_commands in project.4coder instead:

fkey_command_shift[1] = "buildYetAnother";

But now the error message that appeared previously in the * messages * window after alt+x and load_project doesn't appear anymore but the fkey_commands appear only until F7: "buildPerceptron", the fkey_command_shift[1] = "buildYetAnother" line was ignored and pressing shift+f1 unsurprisingly doesn't run the .bat file for building a project.

The LLM I consulted suggested adding the following lines:

In custom_commands.cpp:

CUSTOM_COMMAND_SIG(build_yet_another) { exec_system_command(app, buffer_identifier(0), buffer_identifier(0), "buildYetAnother", 0); }

In custom_bindings.cpp:

bind(context, KeyCode_F1, KeyCode_Shift, build_yet_another);

compiling the custom layer, then

in project.4coder:

CUSTOM_COMMAND_SIG(build_yet_another) { exec_project_command(app, "buildYetAnother"); }

But I can't find custom_commands.cpp nor custom_bindings.cpp

Any suggestions?

You should ask on the 4coder discord, you're more likely to get an answer there.

Are you using 4cc or 4coder ? Are you using version 2 of the project files (starts with version(2); ) ? Can you share your project file ?

I don't use fkey commands, but in my project file the syntax is something like this:

commands = {

    .build = { .out = "*compilation*", .footer_panel = false, .save_dirty_files = true,
        .win = "build.bat",
        .linux = "./build.sh",
        .mac = "./build.sh", },

    .run = { .out = "*run*", .footer_panel = false, .save_dirty_files = false,
        .win = "build\\test.exe",
        .linux = "build/test",
        .mac = "build/test", },
};

fkey_command = {
    .F1 = "build",
    .F2 = "run",
};

There is also a command to help you create a new project: setup_new_project.