cylc-ui icon indicating copy to clipboard operation
cylc-ui copied to clipboard

Keyboard interaction for desktop & laptop use

Open sadielbartholomew opened this issue 5 years ago • 4 comments

To complement mouse clicks & movement (or touches for mobile & tablet) as the main & comprehensive means to interact with the UI, we could (eventually) support basic keyboard control.

Some possibilities:

Most common actions to assign to keystrokes, such as 'save', 'undo-redo' & 'cut-copy-paste', do not make sense in the context of workflows (or at least, would be ambiguous under those terms), though certain ones such as 'open-close' & 'select all' could be applicable (for view panels/tabs, & for elements in nested lists for Tree View & gscan, respectively).

  1. arrow (up, down, left, right) keys for navigating through:
    1. the current selection on items from lists such as in gscan & the Tree View;
    2. displayed graph nodes, if we can apply some algorithm to make a sensible choice for what the node 'left' (for example) to another would be (perhaps based on the displayed dependency chain)?
    3. different views?
  2. keyboard shortcuts, for example to:
    1. execute menu items for the selected item (task, job, workflow, etc.)
    2. open & close views;
    3. zoom in/out within views;
    4. toggle between various displayed elements (e.g. between showing tasks or jobs only, or both alongside each other).

Questions:

  • Should we allow basic keyboard interaction at all?
  • If we do:
    • what could keyboard control, e.g. out of the possibilities above?
    • what keystrokes do we assign to each control?
    • should we allow users to define custom keystrokes to override those set up?

My thoughts:

  • Obviously it would not be a high priority feature, but eventually supporting "arrow key" navigation & a few basic keystrokes could be helpful for some users, & almost certainly the majority of users will be using a device with a keyboard (not e.g. a mobile).
  • We want to minimise the potential for users to apply any actions to their workflows by mistake, as that could easily be irreversible, so avoid keyboard shortcuts for any actions that perform operations on the workflow.
  • Therefore support keyboard interaction for altering the display only, i.e. item (1) & all items except (i) of item (2) above.

sadielbartholomew avatar Jul 22 '19 12:07 sadielbartholomew

Sounds like a good idea, and most users of Cylc would be familiar with vim, command line, etc. So +1.

In GitHub UI, there are several shortcuts. If you open a large file (e.g. https://github.com/python/cpython/blob/master/Python/compile.c) it is possible to experiment with a few:

  • l: go to line number

I think we just need to make sure to have documentation like they do so users can reference to that.

kinow avatar Jul 22 '19 22:07 kinow

Gestures, for devices like ipads and touchscreen laptops could be useful... https://github.com/mlyknown/vue-gesture

MartinRyan avatar Aug 13 '19 06:08 MartinRyan

/ for search (i.e. task filter)

oliver-sanders avatar Aug 08 '22 16:08 oliver-sanders

IMO these should be consistent with Cylc TUI

wxtim avatar Aug 22 '23 08:08 wxtim