Skip to content

Commit

Permalink
[feat] Emacs key bindings can now be toggled in preferences
Browse files Browse the repository at this point in the history
Emacs key bindings can now be toggled through a preference option in the Entry Editor preference tab

[Issue: #9]
  • Loading branch information
krisgun committed Feb 26, 2020
1 parent 207e67e commit 3752711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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> keyBinding = keyBindingRepository.mapToKeyBinding(event);
Expand Down

0 comments on commit 3752711

Please sign in to comment.