mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 10:06:58 -04:00
Initial keybinding functionality + documentation
Todo: - allow user to specify whether to use alt or meta key (relatively easy to implement) - keybinding icon for about pane
This commit is contained in:
parent
bd1790b692
commit
638e03856b
3 changed files with 222 additions and 24 deletions
|
@ -8,6 +8,7 @@ import OutputWaiter from "./OutputWaiter.js";
|
|||
import OptionsWaiter from "./OptionsWaiter.js";
|
||||
import HighlighterWaiter from "./HighlighterWaiter.js";
|
||||
import SeasonalWaiter from "./SeasonalWaiter.js";
|
||||
import BindingsWaiter from "./BindingsWaiter.js";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -60,6 +61,7 @@ const Manager = function(app) {
|
|||
this.options = new OptionsWaiter(this.app);
|
||||
this.highlighter = new HighlighterWaiter(this.app, this);
|
||||
this.seasonal = new SeasonalWaiter(this.app, this);
|
||||
this.bindings = new BindingsWaiter(this.app, this);
|
||||
|
||||
// Object to store dynamic handlers to fire on elements that may not exist yet
|
||||
this.dynamicHandlers = {};
|
||||
|
@ -89,7 +91,7 @@ Manager.prototype.initialiseEventListeners = function() {
|
|||
window.addEventListener("focus", this.window.windowFocus.bind(this.window));
|
||||
window.addEventListener("statechange", this.app.stateChange.bind(this.app));
|
||||
window.addEventListener("popstate", this.app.popState.bind(this.app));
|
||||
|
||||
window.addEventListener("keydown", this.bindings.parseInput.bind(this.bindings));
|
||||
// Controls
|
||||
document.getElementById("bake").addEventListener("click", this.controls.bakeClick.bind(this.controls));
|
||||
document.getElementById("auto-bake").addEventListener("change", this.controls.autoBakeChange.bind(this.controls));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue