Skip to content

Disabling Ctrl+P or other browser shortcuts #21

@BrendanMartin

Description

@BrendanMartin

In insert mode, I sometimes hit CTRL-P when trying to hit CTRL-[ to leave insert mode. Unfortunately, Chrome launches the print dialog if you hit CTRL-P.

Right now I'm using this script as a bookmark to intercept it:

document.addEventListener('keydown', function(event) {
  if(event.ctrlKey && event.keyCode == 80) {
    event.preventDefault(); 
  }
});

But was wondering if this is something we could integrate into this extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions