Skip to content

Instantly share code, notes, and snippets.

@tomykaira
Created August 29, 2014 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomykaira/0c0855ac1cde528777b2 to your computer and use it in GitHub Desktop.
Save tomykaira/0c0855ac1cde528777b2 to your computer and use it in GitHub Desktop.
Disable Ctrl+K in Slack, because it is to delete a line.
// ==UserScript==
// @name Disable ctrl+k
// @namespace http://userscript.org/users/tomy_kaira
// @include https://webpay.slack.com/*
// @version 1
// ==/UserScript==
var origKeyDown = TS.ui.onWindowKeyDown;
TS.ui.onWindowKeyDown = function (j) {
if (TS.ui.isUserAttentionOnChat() && !j.altKey && j.which == 75 && TS.utility.cmdKey(j)) {
return;
} else {
return origKeyDown(j);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment