1. 13 Mar, 2020 1 commit
  2. 12 Mar, 2020 4 commits
    • Robert Knight's avatar
      Add keyboard shortcuts for creating annotations and highlights · 4a8329e7
      Robert Knight authored
      Allow the user to create an annotation using the keyboard by selecting
      text (using any available method) and pressing the "a" key, or create a
      highlight by pressing the "h" key.
      
      The shortcuts are only enabled while the adder toolbar is visible. Since
      the toolbar is only shown for static text selections, I think we will be
      able to use single keys as the shortcuts without modifiers, and avoid
      conflicts with browser and OS shortcuts.
      4a8329e7
    • Robert Knight's avatar
      Add utilities for creating keyboard shortcuts · 39d9fae5
      Robert Knight authored
       - `installShortcut` is a function that installs a shortcut key sequence
         listener on the document body (or other user-specified element)
       - `useShortcut` is a hook that installs a shortcut when a component is
         mounted and removes it when the component is unmounted. It can be
         conditionally disabled by setting the shortcut to `null`, since hooks
         themselves cannot be called conditionally
      39d9fae5
    • Kyle Keating's avatar
      Merge pull request #1897 from hypothesis/escape-to-close-element · 4a0013ad
      Kyle Keating authored
      Fix useElementShouldClose to work with Escape key
      4a0013ad
    • Kyle Keating's avatar
      Fix useElementShouldClose to work with Escape key · b642c931
      Kyle Keating authored
      ‘keypress’ is not fired for “Escape” key, so we need to listen for ‘keydown’
      b642c931
  3. 11 Mar, 2020 5 commits
  4. 10 Mar, 2020 7 commits
  5. 09 Mar, 2020 12 commits
  6. 06 Mar, 2020 11 commits