From 37527110ca38680550ed3a0264aeda4ae7fb440c Mon Sep 17 00:00:00 2001 From: Kristoffer Gunnarsson Date: Wed, 26 Feb 2020 21:41:44 +0100 Subject: [PATCH] [feat] Emacs key bindings can now be toggled in preferences Emacs key bindings can now be toggled through a preference option in the Entry Editor preference tab [Issue: #9] --- src/main/java/org/jabref/JabRefGUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/JabRefGUI.java b/src/main/java/org/jabref/JabRefGUI.java index 2aaa6fc4f02..1a7eb0a2cb4 100644 --- a/src/main/java/org/jabref/JabRefGUI.java +++ b/src/main/java/org/jabref/JabRefGUI.java @@ -95,7 +95,7 @@ private void openWindow(Stage mainStage) { //KeyBindingRepository keyBindingRepository = Globals.getKeyPrefs(); scene.addEventFilter(KeyEvent.KEY_PRESSED, event -> { - if (scene.focusOwnerProperty().get() instanceof TextField) { + if (Globals.prefs.getBoolean(JabRefPreferences.EDITOR_EMACS_KEYBINDINGS) && scene.focusOwnerProperty().get() instanceof TextField) { KeyBindingRepository keyBindingRepository = Globals.getKeyPrefs(); TextField focusedTextField = (TextField) scene.focusOwnerProperty().get(); Optional keyBinding = keyBindingRepository.mapToKeyBinding(event);