Disable Vimperator Facebook Chat

When using Facebook chat and Vimperator, when I press escape to exit paste mode, the chat window also exits. Is there a way to stop Vimperator from Facebook being able to see a keystroke?

+4
source share
2 answers

You can display jj to exit insert mode by adding this line to .vimperatorrc

imap jj <Esc>
+1
source

I made the following greasemonkey script to disable the shortcut:

// ==UserScript==
// @name        fb_esc_disable
// @namespace   Olm
// @description FB Chat ESC shortcut remover
// @include     /^https?://www\.facebook\.com/.*$/
// @version     1
// @grant       none
// ==/UserScript==

(function(){
unsafeWindow.document.addEventListener('keydown', function(e) {
  if (e.keyCode === 27) {
    // 27 = ESC
    e.stopImmediatePropagation();
    e.stopPropagation();
    return;
  }
}, true);
})();
Run code
0
source

Source: https://habr.com/ru/post/1545308/


All Articles