Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to diagnose and fix a key-binding conflict in Sublime Text 3

My default key-bindings for pasting are

{ "keys": ["ctrl+v"], "command": "paste" },
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },

I overrode them in my user key-bindings with

{ "keys": ["alt+k"], "command": "paste" },
{ "keys": ["ctrl+k"], "command": "paste_and_indent" },

I use Dvorak keyboard, which means your V is my K. Also, I want paste_and_indent to be the default.

But Ctrl+k executes paste, not paste_and_indent. I determined this by turning on command logging in the console, with

sublime.log_commands(True)

However, if I make the paste_and_indent command to something else, like Ctrl+Alt+k or Alt+k, it correctly calls paste_and_indent.

I looked through the key-bindings for all of my installed packages, and don't see any other command using Ctrl+k. I also disabled most of my packages except syntaxes. I even accidentally disabled Package Control, but still, Ctrl+k only executes paste.

How can I determine and fix this conflict, so Ctrl+k executes paste_and_indent?

like image 924
aliteralmind Avatar asked Sep 30 '14 14:09

aliteralmind


1 Answers

Check out the FindKeyConflicts plugin. There are several options for looking at all key bindings, or just conflicting ones, in a variety of contexts. All the options are available via the Command Palette.

like image 131
MattDMo Avatar answered Oct 22 '22 01:10

MattDMo