1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut-pastebin synced 2025-06-07 14:17:26 -04:00

Disable keyboard shortcuts on there toowq

This commit is contained in:
Ryan Voots 2017-09-25 14:15:42 -04:00
parent 240a032fdd
commit 7c7149c687

View file

@ -125,6 +125,15 @@
editor.setReadOnly(true);
editor.setOptions({maxLines: Infinity});
editor.getSession().setUseWrapMode(true);
//safely delete all bindings
var save_keys={};
Object.keys(editor.keyBinding.$defaultHandler.commandKeyBinding)
.filter((value) => value.match(/(?:(?:backspac|hom)e|d(?:elete|own)|(?:righ|lef)t|end|up)/))
.forEach((key) => save_keys[key] = editor.keyBinding.$defaultHandler.commandKeyBinding[key]);
editor.keyBinding.$defaultHandler.commandKeyBinding = save_keys;
/*function resizeAce() {
var h = window.innerHeight;
var ch = h - 400;