Description
Nick Clemens (kidclamp)
2016-08-24 00:31:45 UTC
Comment hidden (obsolete)
Created attachment 65090 [details] [review] 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: Ctrl-X: Now cuts a line into the clipboard area Ctrl-Shift-X: Now cuts current subfield into clipboard area Ctrl-C: Copies a line into the clipboard area Ctrl-Shift-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 Ctrl-Z: Functions as undo - this was supported but now in the dropdown help 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 Created attachment 67817 [details] [review] 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: Ctrl-X: Now cuts a line into the clipboard area Ctrl-Shift-X: Now cuts current subfield into clipboard area Ctrl-C: Copies a line into the clipboard area Ctrl-Shift-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 Ctrl-Z: Functions as undo - this was supported but now in the dropdown help 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: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=17191 This is a cool feature. Maybe the clipboard could be mentioned in the bug title for the release notes? Please sort the shortcut list for the Ctrls. Ctrl + P seems a bad choice. Sometimes I could paste. But another time in the editor (not outside) it still goes to Print (in Firefox). Another key ? Shortcut list: It would be nice imo if I could get rid of that list on my screen with Esc (yes with the keyboard please :) For another report probably.. Created attachment 68675 [details] [review] Bug 17179: Followup - Use Ctrl-Shift-V instead of Ctrl-P and fix error Thanks for your follow-up, Nick. But Ctrl+Shift+V does not work. Most other keys seem to work such as Ctrl+I. Ctrl+C worked most of the time, but not always? Tested with Firefox under Windows. (Since Ctrl+letter combinations are widely used already, they seem bad candidates.) Created attachment 85396 [details] [review] 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 Ctrl-Shift-X: Now cuts current subfield into clipboard area Added: Ctrl-C: Copies a line into the clipboard area Ctrl-Shift-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 Created attachment 86025 [details] [review] 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 Created attachment 86041 [details] [review] 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 I got these to work okay: Changed: Ctrl-X: Now cuts a line into the clipboard area Added: Ctrl-C: Copies a line into the 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 (and I really like Ctrl-I!!, but Control-P if you don't have the cursor in just the right place will pop the print menu) These did not work: Expected: Shift-Ctrl-C: Copies current subfield into clipboard area Result (in firefox and chrome): Pops up the "Inspector" / Development tools Expected: Nothing happens. Firefox claims so many key combinations :( I had trouble with ctrl-p (print menu every single time - usability nightmare if it's intermittent), ctrl-l (selects address bar text), ctrl-i (page info, another you have to have the cursor in just the right spot), shift-ctrl-c (inspector). The one good thing is that with the 21411 bug, you can remap all of the keys to whatever you want. The bad thing is that at least in Firefox, there aren't many key combos left to use that don't have a Firefox feature associated, and often you have to be really careful about where the cursor is when you use them. It could be really, really frustrating for users. Much more frustrating than say, using MARCEdit or some other tool to write your record and then importing the record. I'm not sure what to do here, none of the options seem perfect. I suppose you could get the cataloguers who use this to install something like https://www.ghacks.net/2016/12/24/disable-keyboard-shortcuts-in-firefox/ so as to unbind and free up a few, but I hate to make people have Firefox addons for what ought to be core features. The use case outlineed in the article there seems very similar to what we are dealing with: an editor window that uses a key binding that also is one that Firefox claims. If we are going to say "yes, use this plugin for firefox with the advanced editor" then I think I'm ok to let this through basically as is after a bit of retesting with the plugin. But we also need to be aware that not every IT department will allow the usage of Firefox plugins, and that those users will have a sub optimal experience. Created attachment 92406 [details] [review] 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 I would really like to move this one along, the keyboard combos seem to work for me, they may not work on all machines, however, one can now remap these keys to combinations that may work. I will gladly take suggestions on different default mappings, but I don't think we should consider this a blocker - being web based means we are going to have to make some browser concessions and I don't know that we have a perfect default to provide Hi Nick, As discussed, I'm failing this because of an error on the Shift-Ctrl-{C,X} keyboard shortcuts. When they are used, console logs errors that curCursor is not a function. Also, as a suggested improvement, possibly addressing some of the useability issues raised, it'd be amazing if any cut or copy operation resulted in the latest item in the clipboard being selected immediately. This would allow users to cut/copy & paste fields and subfields quickly without having to switch to the mouse to select the last copied/cut content and then focusing on the right location in the editor again. Hth, Alex Created attachment 93601 [details] [review] 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> Created attachment 93602 [details] [review] Bug 17179: (follow-up) Correct typos, add default select. Correct error whereby object curCursor was invoked as a function. Added action whereby the most recent entry in the clipboard is selected after all copy and cut operations. Created attachment 93676 [details] [review] 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> Created attachment 93677 [details] [review] Bug 17179: (follow-up) Correct typos, add default select. Correct error whereby object curCursor was invoked as a function. Added action whereby the most recent entry in the clipboard is selected after all copy and cut operations. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 93857 [details] [review] 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> Created attachment 93858 [details] [review] Bug 17179: (follow-up) Correct typos, add default select. Correct error whereby object curCursor was invoked as a function. Added action whereby the most recent entry in the clipboard is selected after all copy and cut operations. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Sorry, going back to failed - just realized changes to installer/data/mysql/mandatory/keyboard_shortcuts.sql are missing :( Created attachment 93861 [details] [review] Bug 17179: (follow-up) Add to kyeboard_shortcuts.sql Created attachment 93897 [details] [review] 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: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 93898 [details] [review] Bug 17179: (follow-up) Correct typos, add default select. Correct error whereby object curCursor was invoked as a function. Added action whereby the most recent entry in the clipboard is selected after all copy and cut operations. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 93899 [details] [review] Bug 17179: (follow-up) Add to keyboard_shortcuts.sql Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice work! Pushed to master for 19.11.00 Added text for the release notes and moved the sponsored by details into a follow-up commit which has been pushed. I feel that this feature has caused some usability issues. I find it odd that Ctrl-C has been remapped to copy the whole field to the clipboard. I like the feature, but the default should be a different key combination. I encountered this because I was trying to copy an ISBN as part of testing for bug 21665 and noticed that after selecting the text nothing was happening when I pressed Ctrl-C, no copying to the new clipboard, no copying to my computer's clipboard, nothing. It took me a while to figure out what was going on and how the new shortcut was supposed to be used, and I imagine a lot of users will encounter similar difficulties. I am aware that the shortcut can be remapped, but I feel that using Ctrl-C as the default is confusing and frustrating, especially when it functions the same way in basically every other software program. I propose that for new installations we change the mapping to be Ctrl-E or something similar. Thoughts? I filed bug 27769 for that. |