[fix] Lock shortcut (#1677)

This PR fixes the shortcut for lock shapes, which may be blocked by
browser defaults. We now use Shift+L instead of Cmd+Shift+L. Closes
https://github.com/tldraw/tldraw/issues/1676.

### Change Type

- [x] `patch` 

### Test Plan

1. Try the lock tool shortcuts.

- [x] End to end tests

### Release Notes

- [@tldraw/editor] Fix lock tool shortcut
This commit is contained in:
Steve Ruiz 2023-06-29 22:43:28 +01:00 committed by GitHub
parent c524cac3f7
commit 91dfdecc93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -299,6 +299,12 @@ test.describe('Keyboard Shortcuts', () => {
/* ---------------------- Misc ---------------------- */
// toggle lock
await page.keyboard.press('Shift+l')
expect(await page.evaluate(() => __tldraw_ui_event)).toMatchObject({
name: 'toggle-lock',
})
// await page.keyboard.press('Control+i')
// expect(await page.evaluate(() => __tldraw_ui_event)).toMatchObject({
// name: 'open-menu',

View file

@ -930,7 +930,7 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
id: 'toggle-lock',
label: 'action.toggle-lock',
readonlyOk: false,
kbd: '!$l',
kbd: '!l',
onSelect(source) {
trackEvent('toggle-lock', { source })
editor.toggleLock()