Skip to content

Commit

Permalink
Fix zoom out shortcut on Windows (#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

1 comment on commit aa7bb5a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in aa7bb5a.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11578281433
📝 Reported issues:

Please sign in to comment.