Koha/koha-tmpl/intranet-tmpl/prog/en/includes/keyboard_shortcuts.inc
Nick Clemens 3b0ab38559
Bug 17179: Add keyboard shortcuts to repeat (duplicate) a field, and cut text
This patchset introduces an internal clipboard to the advanced editor
and provides some new functionality to make use of this, default shortcuts are provided
but can be edited per bug 21411

The default shortcuts for new/changed functions are:

Changed:
Ctrl-X:       Now cuts a line into the clipboard area
Shift-Ctrl-X: Now cuts current subfield into clipboard area

Added:
Ctrl-C:       Copies a line into the clipboard area
Shift-Ctrl-C: Copies current subfield into clipboard area
Ctrl-P:       Pastes the selected item from the clipboard at cursor
Ctrl-I:       Copies the current line and inserts onto a new line below

To test:
Verify all functionality above and confirm it behaves as expected

Note:
Ctrl-v pastes from the system clipboard - codemirror does not have
access and this is why we use our "Clipboard"

For browser cut/paste please use mouse right click or context menus

Ctrl-P can be accessed as print by focusing outside the editor window

Signed-off-by: Alex Sassmannshausen <alex@komputilo.eu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-10-09 14:36:09 +01:00

20 lines
1.3 KiB
PHP

[%- BLOCK keyboard_shortcut_descriptions -%]
[% SWITCH shortcut_name %]
[%- CASE 'insert_copyright' -%]<span>Insert copyright symbol (©)</span>
[%- CASE 'insert_copyright_sound' -%]<span>Insert copyright symbol () (sound recordings)</span>
[%- CASE 'insert_delimiter' -%]<span>Insert delimiter ()</span>
[%- CASE 'subfield_help' -%]<span>Get help on current subfield</span>
[%- CASE 'link_authorities' -%]<span>Link field to authorities</span>
[%- CASE 'delete_field' -%]<span>Delete current field and copy to 'clipboard'</span>
[%- CASE 'delete_subfield' -%]<span>Delete current subfield and copy to 'clipboard'</span>
[%- CASE 'new_line' -%]<span>New field on next line</span>
[%- CASE 'line_break' -%]<span>Insert line break</span>
[%- CASE 'next_position' -%]<span>Move to next position</span>
[%- CASE 'prev_position' -%]<span>Move to previous position</span>
[%- CASE 'toggle_keyboard' -%]<span>Toggle Keyboard</span>
[%- CASE 'copy_line' -%]<span>Copy current field</span>
[%- CASE 'copy_subfield' -%]<span>Copy current subfield</span>
[%- CASE 'paste_line' -%]<span>Paste selection from 'clipboard'</span>
[%- CASE 'insert_line' -%]<span>Copy current field on next line</span>
[%- END -%]
[%- END -%]