diff options
author | Alexander_Kabui | 2024-08-13 11:52:41 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-08-29 18:58:56 +0300 |
commit | a1990202cd1692ab718e3fa4ec44455e19fc1671 (patch) | |
tree | 68a7ffd886dc8a36bdd8119327aaea9b0cdafebf /gn2/wqflask/templates/gn_editor_settings.html | |
parent | 495c6e926b86e71a7a8a62b3df0c7e691ab66ac8 (diff) | |
download | genenetwork2-a1990202cd1692ab718e3fa4ec44455e19fc1671.tar.gz |
Add keyboard binding option.
Diffstat (limited to 'gn2/wqflask/templates/gn_editor_settings.html')
-rw-r--r-- | gn2/wqflask/templates/gn_editor_settings.html | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gn2/wqflask/templates/gn_editor_settings.html b/gn2/wqflask/templates/gn_editor_settings.html index 769fe23d..62ab4f6a 100644 --- a/gn2/wqflask/templates/gn_editor_settings.html +++ b/gn2/wqflask/templates/gn_editor_settings.html @@ -63,6 +63,26 @@ </div> </form> <br> + + <h4><i>Choose KeyBoard Binding:</i></h4> + <div class="form-check"> + <input class="form-check-input" type="radio" name="keyboard" id="default" value="default" checked > + <label class="form-check-label" for="default">Default</label> + </div> + + <div class="form-check"> + <input class="form-check-input" type="radio" name="keyboard" id="vscode" value="vscode"> + <label class="form-check-label" for="vscode">Vscode</label> + </div> + <div class="form-check"> + <input class="form-check-input" type="radio" name="keyboard" id="emacs" value="emacs"> + <label class="form-check-label" for="emacs">Emacs</label> + </div> + <div class="form-check"> + <input class="form-check-input" type="radio" name="keyboard" id="vim" value="vim" > + <label class="form-check-label" for="vim">Vim</label> + </div> + <br> <div class="row"> <div class="col-sm-offset-1"> <button class="btn btn-primary" id="settingBtn"> @@ -85,7 +105,10 @@ theme: `ace/theme/${$('input[name="theme"]:checked').val()}`, fontSize: parseInt($("#fontSizeRange").val()), wrap:$('input[name="wrap"]:checked').val()== "false" ? false : true, - cursorStyle: $('input[name="cursor"]:checked').val() + cursorStyle: $('input[name="cursor"]:checked').val(), + keyboardHandler:($('input[name="keyboard"]:checked').val() == "default"? + null: `ace/keyboard/${$('input[name="keyboard"]:checked').val()}` + ) } htmx.find("#output").dispatchEvent( |