tldraw/packages
Steve Ruiz 6fde34fafd
[improvement] better comma control for pointer (#2568)
This PR fixes a few bugs with the "comma as pointer" feature.

In tldraw, the `,` key can be used as a replacement for "pointer down"
and "pointer up". This is most useful on laptops with trackpads that
make dragging inconvenient. (See
https://github.com/tldraw/tldraw/issues/2550).

Previously, the canvas had to be focused in order for the comma key to
work. If you clicked on a menu item and then pressed comma, it would not
product a pointer event until you first clicked on the canvas. This is
now fixed by moving the listener out of the `useDocumentEvents` and into
`useKeyboardShortcuts`.

### Change Type

- [x] `minor` — New feature

### Test Plan

1. Click the canvas.
2. Use the comma key to control pointer down / up.
3. Click a shape tool on the toolbar.
4. Move your mouse over the canvas.
5. Press the comma key. It should produce a dot / shape / etc

### Release Notes

- Improve comma key as a replacement for pointer down / pointer up.
2024-01-21 14:09:05 +00:00
..
assets [dotcom] Delete service worker, cache tldraw assets (#2552) 2024-01-19 15:31:01 +00:00
editor [improvement] better comma control for pointer (#2568) 2024-01-21 14:09:05 +00:00
state Bump Yarn to 4.0.2 and add version constraints (#2481) 2024-01-18 11:09:17 +00:00
store Bump Yarn to 4.0.2 and add version constraints (#2481) 2024-01-18 11:09:17 +00:00
tldraw [improvement] better comma control for pointer (#2568) 2024-01-21 14:09:05 +00:00
tlschema Bump Yarn to 4.0.2 and add version constraints (#2481) 2024-01-18 11:09:17 +00:00
tlsync Bump Yarn to 4.0.2 and add version constraints (#2481) 2024-01-18 11:09:17 +00:00
utils Bump Yarn to 4.0.2 and add version constraints (#2481) 2024-01-18 11:09:17 +00:00
validate Bump Yarn to 4.0.2 and add version constraints (#2481) 2024-01-18 11:09:17 +00:00