Skip to content

Instantly share code, notes, and snippets.

@TfTHacker
Last active September 30, 2020 15:50
Show Gist options
  • Save TfTHacker/5b559caa7119d4727ce9c2dd5700bdea to your computer and use it in GitHub Desktop.
Save TfTHacker/5b559caa7119d4727ce9c2dd5700bdea to your computer and use it in GitHub Desktop.
// Roam42 is a prerequisite for this code, as it uses Roam42 libraries
// Install & Config:
// Add the code from this gist to a roam/js block in your roam graph and enable it
// You can change the custom keys where it says Mousetrap.bind('ctrl+e)
// See for more keyboard options: https://craig.is/killing/mice
// I am on European SmartKeyboard & assigned §, which is where ESC is on most keyboards
setTimeout(()=>{
Mousetrap.bind('ctrl+e', function(event, handler) {
event.preventDefault()
roam42KeyboardLib.pressEsc()
});
},15000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment