While working on basic keyboard support for QuickShare, I found and addressed some other issues. This patch thus addresses 3 items (let me know if I should make 3 separate diffs instead).
- Basic keyboard support: allow navigating the plasmoid paste menu with arrow keys, selection with enter key, and dismissal with escape key. No keyboard support yet for "secondary menus" eg the device picker in send to device. Also makes the plasmoid show the paste menu when activated by the global keyboard shortcut (previously does nothing).
Note: I'm not 100% on how separation should work between the plasmoid's ui and the purpose plugin mechanism itself, but since the purpose plugin side also has UI elements I thought it made sense to have relevant keyboard support implemented there where applicable so the plasmoid inherits and modifies it. In theory this should also extend basic keyboard support to any other consumers of the purpose plugins.
- Fix an issue with the "Paste" action. For urls (when copying file/files), the Paste action was broken and didn't correctly pass the data to the sharedialog, so that the only way to share files previously was to use drag/drop. This patch fixes this.
- Fix a crash that happens when the plasmoid is activated with an empty clipboard. The crash actually happens in kquickcontrolsaddons.clipboard, which probably could use a patch so it handles empty-clipboard situations more gracefully, but here I have just avoided trying to access the clipboard if it is empty in the plasmoid. This might be related to bug 358268.