I’ve done that
{
"key": ["super+shift+x"],
"command": "clone_file"
}
but it doesn’t work at all, any idea?
I’ve done that
{
"key": ["super+shift+x"],
"command": "clone_file"
}
but it doesn’t work at all, any idea?
The keybindings should be a JSON list, so, something like this should work:
[
{"keys": ["super+shift+x"], "command": "clone_file" }
]
Sorry, my real settings are:
[
{
"keys": ["super+alt+&"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["super+alt+é"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["super+alt+\""],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
},
{
"keys": ["super+alt+'"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
}
},
{
"keys": ["super+alt+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["super+alt+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
}
},
{
"keys": ["super+alt+("],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1],
[0, 1, 1, 2], [1, 1, 2, 2]
]
}
},
{
"keys": ["super+shift+c"],
"command": "show_panel",
"args": {
"panel": "replace",
"reverse": false
}
},
{
"key": ["super+shift+x"],
"command": "clone_file"
}
]
does ST detect that key combination correctly?
open the ST console (View menu -> Show Console) and type/paste sublime.log_input(True)
Enter and then press Super+Shift+x and check what gets logged in the console.
not sure where the noop
message is coming from, but looks like it detects the keypress okay…
how about sublime.log_commands(True)
Enter and try the keybinding again, I’d expect to see:
key evt: shift+super+x
command: clone_file
key evt: shift+super+x
command: drag_select {"event": {"button": 1, "x": 282.21875, "y": 1035.9140625}}
key evt: shift+super+c
command: show_panel {"panel": "replace", "reverse": false}
key evt: shift+super+c
Drag select happens when I select text with the mouse. Does that command appear when you press shiftsuperX? Does text at the cursor get selected? Have you tried binding it to another key combination?
I get the same output as @kingkeith predicted in the console, and the current view is indeed cloned to a new tab.