Use Ctrl+Shift+C for the add-comment shortcut while keeping Cmd+Shift+C active (#32624)

GitOrigin-RevId: 5fdf9ae7dd0fa194c3ac6acf9abb70ac9721fd2e
This commit is contained in:
Copilot
2026-06-19 08:05:48 +00:00
committed by Copybot
parent b570078223
commit ea1871b0df
2 changed files with 20 additions and 1 deletions
@@ -119,7 +119,12 @@ export const shortcuts = Prec.high(
run: toggleReviewPanel,
},
{
key: 'Mod-Shift-c',
key: 'Ctrl-Shift-c',
preventDefault: true,
run: addNewCommentFromKbdShortcut,
},
{
key: 'Cmd-Shift-c',
preventDefault: true,
run: addNewCommentFromKbdShortcut,
},
@@ -75,6 +75,20 @@ describe('keyboard shortcuts', { scrollBehavior: false }, function () {
})
})
it('dispatches add comment with {ctrl+shift+c}', function () {
cy.window().then(win => {
win.addEventListener('add-new-review-comment', cy.stub().as('addComment'))
})
cy.get('@editor').trigger('keydown', {
key: 'c',
ctrlKey: true,
shiftKey: true,
})
cy.get('@addComment').should('have.been.calledOnce')
})
it('indent line with {tab}', function () {
cy.get('@line').trigger('keydown', { key: 'Tab' })
cy.get('@line').should('have.text', ' ')