Scaffold: Run/delete tests with the keyboard (#2118)

This commit is contained in:
Abe Jellinek 2021-07-09 00:42:08 -07:00 committed by GitHub
parent 1c61c86801
commit f942c224f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -604,6 +604,16 @@ var Scaffold = new function() {
}
}
this.runTranslatorOrTests = async function () {
var tabs = document.getElementById('tabs');
if (tabs.selectedItem.id == 'tab-testing') {
this.runSelectedTests();
}
else {
this.run('do');
}
}
/*
* generate translator GUID
*/

View file

@ -39,7 +39,7 @@
<script src="scaffold.js"/>
<keyset>
<key id="run-do-web" modifiers="accel" key="R" oncommand="Scaffold.run('do')"/>
<key id="run-do-web" modifiers="accel" key="R" oncommand="Scaffold.runTranslatorOrTests()"/>
<key id="detect-web" modifiers="accel" key="T" oncommand="Scaffold.run('detect')"/>
<key id="save" modifiers="accel" key="S" oncommand="Scaffold.save()"/>
<key id="increase-font-size" modifiers="accel" key="+" oncommand="Scaffold.increaseFontSize()"/>
@ -205,6 +205,10 @@
<iframe src="chrome://zotero/content/ace/ace.html" id="editor-tests" flex="1"/>
</tabpanel>
<tabpanel flex="1" id="tabpanel-testing">
<keyset>
<key id="key-delete-tests" keycode="VK_BACK" oncommand="Scaffold.deleteSelectedTests()"/>
</keyset>
<vbox flex="1"><hbox><description>&scaffold.testing.description;</description></hbox>
<hbox flex="1" context="testing-context-menue">
<listbox id="testing-listbox" flex="1" seltype="multiple">

View file

@ -3,8 +3,8 @@ Keyboard Shortcuts
Ctrl/Cmd S : Save
Ctrl/Cmd R : Run doWeb/doImport
Ctrl/Cmd T : DetectWeb/detectImport
Ctrl/Cmd R : Run doWeb/doImport or selected tests
Ctrl/Cmd T : Run detectWeb/detectImport
Ctrl/Cmd + : Increase Font Size
Ctrl/Cmd - : Decrease Font Size