Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ In case there is no issue present, the pull request implementing the feature is

### Changed

- We changed <kbd>Enter</kbd> on the root node to create a child node instead of doing nothing.
- We changed the "New PDF node" dialog to list only the PDFs linked to the selected BibTeX node; the PDF button is disabled for other nodes. [#56](https://github.com/JabRef/jabmap/issues/56)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For these shortcuts, you have to first select a node by clicking on it.
| <kbd>CTRL</kbd> + <kbd>B</kbd>| Create a new child BibTeX node
| <kbd>CTRL</kbd> + <kbd>P</kbd>| Create a new child PDF node (BibTeX node selected)
| <kbd>CTRL</kbd> + <kbd>J</kbd>| Select the entry in JabRef and bring JabRef to the front (BibTeX node selected)
|<kbd>ENTER</kbd> | Create a new sibling node
|<kbd>ENTER</kbd> | Create a new sibling node (a child node if the root node is selected)
| <kbd>F2</kbd> or _Double Click_ | Change node topic
| <kbd>DELETE</kbd> or <kbd>BACKSPACE</kbd> | Delete node
| <kbd>↑</kbd> <kbd>←</kbd> <kbd>→</kbd> <kbd>↓</kbd> | Change selected node
Expand Down
8 changes: 8 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ let mind = DefaultMap;
const options = DefaultOptions;
// adding Named shortcut key event processor
options.shortcut.handles = {
// the root has no siblings, so <Enter> would do nothing there
'addBrotherOrChild': function (jm, e) {
if (jm.get_selected_node()?.isroot) {
this.handle_addchild(jm, e);
} else {
this.handle_addbrother(jm, e);
}
},
'undo': function (jm, e) {
// display mind map's previous state (undo the last operation)
hidePopovers();
Expand Down
2 changes: 1 addition & 1 deletion src/mindPresets/DefaultMindOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DefaultOptions = {
enable: true, // Whether to enable shortcut
mapping: { // Shortcut key mapping
addchild: [45, 4096 + 13], // <Insert>, <Ctrl> + <Enter>
addbrother: 13, // <Enter>
addBrotherOrChild: 13, // <Enter>
editnode: 113, // <F2>
delnode: [46, 8], // <Delete>
toggle: 32, // <Space>
Expand Down
Loading