Skip to content

Commit

Permalink
Fix zoom out shortcut on Windows (WordPress#66506)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: torounit <[email protected]>
  • Loading branch information
6 people authored Oct 29, 2024
1 parent bcdba59 commit aa7bb5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/editor/src/components/zoom-out-toggle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
useShortcut,
store as keyboardShortcutsStore,
} from '@wordpress/keyboard-shortcuts';
import { isAppleOS } from '@wordpress/keycodes';

/**
* Internal dependencies
Expand Down Expand Up @@ -40,7 +41,9 @@ const ZoomOutToggle = ( { disabled } ) => {
category: 'global',
description: __( 'Enter or exit zoom out.' ),
keyCombination: {
modifier: 'primaryShift',
// `primaryShift+0` (`ctrl+shift+0`) is the shortcut for switching
// to input mode in Windows, so apply a different key combination.
modifier: isAppleOS() ? 'primaryShift' : 'secondary',
character: '0',
},
} );
Expand Down

0 comments on commit aa7bb5a

Please sign in to comment.