Sublime Forum

Shortcut doesn't trigger the correct command

#1

I have Cmd+F2 associated to the “toggle_bookmark”. It has always worked just fine but recently this command somehow became associated with “next_bookmark”, as can be seen in the screenshot below:

The menu shows the correct shortcut, but in the console it shows “next_bookmark”.

And this is my config:

[
    { "keys": ["super+alt+shift+c"], "command": "select_word" },
    { "keys": ["f12"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
    { "keys": ["super+space"], "command": "auto_complete" },
    { "keys": ["super+;"], "command": "toggle_comment", "args": { "block": false } },
    { "keys": ["f5"], "command": "build" },
    { "keys": ["super+shift+c"], "command": "run_macro_file", "args": {"file": "Packages/User/copyword.sublime-macro"} },
    { "keys": ["super+shift+x"], "command": "run_macro_file", "args": {"file": "Packages/User/cutword.sublime-macro"} },
    { "keys": ["super+shift+v"], "command": "run_macro_file", "args": {"file": "Packages/User/deletewordandpaste.sublime-macro"} },
    { "keys": ["super+shift+w"], "command": "close_others" },
    { "keys": ["f1"], "command": "goto_documentation" },
    { "keys": ["super+alt+p"], "command": "prompt_select_workspace" },
    { "keys": ["f9"], "command": "goto_definition" },
    { "keys": ["f3"], "command": "find_next" },
    { "keys": ["shift+f3"], "command": "find_prev" },
    { "keys": ["super+f2"], "command": "toggle_bookmark" },
    { "keys": ["f2"], "command": "next_bookmark" },
    { "keys": ["shift+f2"], "command": "prev_bookmark" },
]

So everything seems to be normal except it doesn’t execute the right command. Any idea what could be causing this?

0 Likes

#2

I don’t see this in your keybindings.

0 Likes

#3

Sorry I meant Cmd+F2 (which is Super+F2 in the config file)

0 Likes

#4

I would try with sublime.log_input(True) as well, so that you can see what key Sublime thinks you’re pressing when it responds with that command.

0 Likes

#5

Thanks for the info. I’m getting this when I press Cmd+F2:

key evt: f2

So it seems it thinks I’m only pressing F2. In fact, any combination I press Ctrl+F2, Shift+F2, etc. it always prints “f2” only. That seems to be true of all other Fn keys. Any idea what can be causing this?

0 Likes

#6

Do both Shift, Control etc keys do the same thing?

I would guess that something like this would be related to the OS doing something specific in regards to the keyboard layout or such otherwise. Or possibly some external application might be modifying things.

0 Likes