diff --git a/packages/lexical-playground/__tests__/keyboardShortcuts/index.mjs b/packages/lexical-playground/__tests__/keyboardShortcuts/index.mjs index d307355ba..64407b2cf 100644 --- a/packages/lexical-playground/__tests__/keyboardShortcuts/index.mjs +++ b/packages/lexical-playground/__tests__/keyboardShortcuts/index.mjs @@ -280,26 +280,26 @@ export async function toggleInsertCodeBlock(page) { } export async function toggleLowercase(page) { - await keyDownCtrlOrMeta(page); + await page.keyboard.down('Control'); await page.keyboard.down('Shift'); await page.keyboard.press('1'); - await keyUpCtrlOrMeta(page); + await page.keyboard.up('Control'); await page.keyboard.up('Shift'); } export async function toggleUppercase(page) { - await keyDownCtrlOrMeta(page); + await page.keyboard.down('Control'); await page.keyboard.down('Shift'); await page.keyboard.press('2'); - await keyUpCtrlOrMeta(page); + await page.keyboard.up('Control'); await page.keyboard.up('Shift'); } export async function toggleCapitalize(page) { - await keyDownCtrlOrMeta(page); + await page.keyboard.down('Control'); await page.keyboard.down('Shift'); await page.keyboard.press('3'); - await keyUpCtrlOrMeta(page); + await page.keyboard.up('Control'); await page.keyboard.up('Shift'); } diff --git a/packages/lexical-playground/src/index.css b/packages/lexical-playground/src/index.css index 6866a586b..53433272c 100644 --- a/packages/lexical-playground/src/index.css +++ b/packages/lexical-playground/src/index.css @@ -779,13 +779,13 @@ i.page-break, background-color: #fff; border-radius: 8px; border: 0; - max-width: 250px; + max-width: 264px; min-width: 100px; } .dropdown .item.wide { align-items: center; - width: 248px; + width: 260px; } .dropdown .item.wide .icon-text-container { diff --git a/packages/lexical-playground/src/plugins/ShortcutsPlugin/shortcuts.ts b/packages/lexical-playground/src/plugins/ShortcutsPlugin/shortcuts.ts index ee2106df1..0b3cc3ca3 100644 --- a/packages/lexical-playground/src/plugins/ShortcutsPlugin/shortcuts.ts +++ b/packages/lexical-playground/src/plugins/ShortcutsPlugin/shortcuts.ts @@ -29,9 +29,9 @@ export const SHORTCUTS = Object.freeze({ DECREASE_FONT_SIZE: IS_APPLE ? '⌘+Shift+,' : 'Ctrl+Shift+,', INSERT_CODE_BLOCK: IS_APPLE ? '⌘+Shift+C' : 'Ctrl+Shift+C', STRIKETHROUGH: IS_APPLE ? '⌘+Shift+S' : 'Ctrl+Shift+S', - LOWERCASE: IS_APPLE ? '⌘+Shift+1' : 'Ctrl+Shift+1', - UPPERCASE: IS_APPLE ? '⌘+Shift+2' : 'Ctrl+Shift+2', - CAPITALIZE: IS_APPLE ? '⌘+Shift+3' : 'Ctrl+Shift+3', + LOWERCASE: IS_APPLE ? '⌃+Shift+1' : 'Ctrl+Shift+1', + UPPERCASE: IS_APPLE ? '⌃+Shift+2' : 'Ctrl+Shift+2', + CAPITALIZE: IS_APPLE ? '⌃+Shift+3' : 'Ctrl+Shift+3', CENTER_ALIGN: IS_APPLE ? '⌘+Shift+E' : 'Ctrl+Shift+E', JUSTIFY_ALIGN: IS_APPLE ? '⌘+Shift+J' : 'Ctrl+Shift+J', LEFT_ALIGN: IS_APPLE ? '⌘+Shift+L' : 'Ctrl+Shift+L', @@ -116,7 +116,7 @@ export function isLowercase(event: KeyboardEvent): boolean { const {code} = event; return ( (code === 'Numpad1' || code === 'Digit1') && - isModifierMatch(event, {...CONTROL_OR_META, shiftKey: true}) + isModifierMatch(event, {ctrlKey: true, shiftKey: true}) ); } @@ -124,7 +124,7 @@ export function isUppercase(event: KeyboardEvent): boolean { const {code} = event; return ( (code === 'Numpad2' || code === 'Digit2') && - isModifierMatch(event, {...CONTROL_OR_META, shiftKey: true}) + isModifierMatch(event, {ctrlKey: true, shiftKey: true}) ); } @@ -132,7 +132,7 @@ export function isCapitalize(event: KeyboardEvent): boolean { const {code} = event; return ( (code === 'Numpad3' || code === 'Digit3') && - isModifierMatch(event, {...CONTROL_OR_META, shiftKey: true}) + isModifierMatch(event, {ctrlKey: true, shiftKey: true}) ); }