Assuming the comment syntax is specific to the file type, you can use a simple macro (although even if you don't, the macro will be a bit more active). In any case, save the following Packages/Useras you like. Make sure the extension .sublime-macro.
[
{
"args":
{
"block": false
},
"command": "toggle_comment"
},
{
"command": "duplicate_line"
},
{
"args":
{
"block": false
},
"command": "toggle_comment"
}
]
Then create a key binding as shown below.
{ "keys": ["f12"], "command": "run_macro_file", "args": {"file": "res://Packages/User/<the file name>.sublime-macro"} },
, keys <the file name> .