[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
fix-docs-shape-type
Steve Ruiz 2023-06-29 22:43:28 +01:00 zatwierdzone przez GitHub
rodzic c524cac3f7
commit 91dfdecc93
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -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',

Wyświetl plik

@ -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()