Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Reactive.Input - Handle inputs the easy way

This document is focused primarily on dealing with keyboard shortcuts, but it could be expanded to various other gestures such as touch gestures, etc.

Scenarios

First, let's list the types of scenarios we run into with real apps. Some of these are taken from GitHub for Windows.

Specific scenarios

  1. F1 to refresh. Could have different meaning on different views.
  2. ~ to launch a shell from any view. But not when Text input has focus.
  3. Arrow keys: Navigate current focused list. Navigate to next list.
  4. Esc and ALT+LeftArrow closes current modal or popup screen.
  5. Enter navigates to current selected repository.

Scenario Categories

  1. Key bound to a command: This is straightforward. You want a specific key combination to be bound to a specific ICommand instance.

  2. Key bound to a navigation command: In GitHub for Windows, we have the concept that Esc and ALT+Back will navigate back from whatever view you happen to be looking at. This applies to Menus and Modal views. Ideally, we wouldn't have to bind this to ever view's back command but have a way to have commands of a certain "class" respond to this key combination.

  3. Shortcut Popover: We'd like the "?" to launch a popover sheet that's automatically generated for the current view.

  4. Global Shortcuts: We have ~ mapped to launch a command shell no matter where you are. This could simply be a command on the MainWindowViewModel (or ShellViewModel depending on what you call it). But it also has to be smart to ignore cases when ~ is typed within a text input.