mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 08:58:30 +01:00
Add key bindings for tabs
This commit is contained in:
parent
6df9b649a1
commit
c50f5769db
1 changed files with 38 additions and 2 deletions
|
@ -98,11 +98,11 @@ class BindingsWaiter {
|
||||||
break;
|
break;
|
||||||
case "Space": // Bake
|
case "Space": // Bake
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.app.bake();
|
this.manager.controls.bakeClick();
|
||||||
break;
|
break;
|
||||||
case "Quote": // Step through
|
case "Quote": // Step through
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.app.bake(true);
|
this.manager.controls.stepClick();
|
||||||
break;
|
break;
|
||||||
case "KeyC": // Clear recipe
|
case "KeyC": // Clear recipe
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -120,6 +120,22 @@ class BindingsWaiter {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.manager.output.switchClick();
|
this.manager.output.switchClick();
|
||||||
break;
|
break;
|
||||||
|
case "KeyT": // New tab
|
||||||
|
e.preventDefault();
|
||||||
|
this.manager.input.addInputClick();
|
||||||
|
break;
|
||||||
|
case "KeyW": // Close tab
|
||||||
|
e.preventDefault();
|
||||||
|
this.manager.input.removeInput(this.manager.input.getActiveTab());
|
||||||
|
break;
|
||||||
|
case "ArrowLeft": // Go to previous tab
|
||||||
|
e.preventDefault();
|
||||||
|
this.manager.input.changeTabLeft();
|
||||||
|
break;
|
||||||
|
case "ArrowRight": // Go to next tab
|
||||||
|
e.preventDefault();
|
||||||
|
this.manager.input.changeTabRight();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (e.code.match(/Digit[0-9]/g)) { // Select nth operation
|
if (e.code.match(/Digit[0-9]/g)) { // Select nth operation
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -216,6 +232,26 @@ class BindingsWaiter {
|
||||||
<td>Ctrl+${modWinLin}+m</td>
|
<td>Ctrl+${modWinLin}+m</td>
|
||||||
<td>Ctrl+${modMac}+m</td>
|
<td>Ctrl+${modMac}+m</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Create a new tab</td>
|
||||||
|
<td>Ctrl+${modWinLin}+t</td>
|
||||||
|
<td>Ctrl+${modMac}+t</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Close the current tab</td>
|
||||||
|
<td>Ctrl+${modWinLin}+w</td>
|
||||||
|
<td>Ctrl+${modMac}+w</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Go to next tab</td>
|
||||||
|
<td>Ctrl+${modWinLin}+RightArrow</td>
|
||||||
|
<td>Ctrl+${modMac}+RightArrow</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Go to previous tab</td>
|
||||||
|
<td>Ctrl+${modWinLin}+LeftArrow</td>
|
||||||
|
<td>Ctrl+${modMac}+LeftArrow</td>
|
||||||
|
</tr>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue