ctrl-c is copy, we should not bind to copy or paste or any common shit (#2895)
* ctrl-c is copy, we should not bind to copy or paste or any common shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -3418,11 +3418,7 @@ test.describe('Command bar tests', () => {
|
||||
await expect(cmdSearchBar).not.toBeVisible()
|
||||
|
||||
// Now try the same, but with the keyboard shortcut, check focus
|
||||
if (process.platform !== 'linux') {
|
||||
await page.keyboard.press('Meta+K')
|
||||
} else {
|
||||
await page.locator('html').press('Control+C')
|
||||
}
|
||||
await page.keyboard.press('Meta+K')
|
||||
cmdSearchBar = page.getByPlaceholder('Search commands')
|
||||
await expect(cmdSearchBar).toBeVisible()
|
||||
await expect(cmdSearchBar).toBeFocused()
|
||||
@ -3470,11 +3466,7 @@ test.describe('Command bar tests', () => {
|
||||
await page.locator('.cm-content').click()
|
||||
|
||||
// Now try the same, but with the keyboard shortcut, check focus
|
||||
if (process.platform !== 'linux') {
|
||||
await page.keyboard.press('Meta+K')
|
||||
} else {
|
||||
await page.locator('.cm-content').press('Control+C')
|
||||
}
|
||||
await page.keyboard.press('Meta+K')
|
||||
|
||||
let cmdSearchBar = page.getByPlaceholder('Search commands')
|
||||
await expect(cmdSearchBar).toBeVisible()
|
||||
@ -3539,11 +3531,7 @@ test.describe('Command bar tests', () => {
|
||||
await page.getByRole('button', { name: 'Extrude' }).isEnabled()
|
||||
|
||||
let cmdSearchBar = page.getByPlaceholder('Search commands')
|
||||
if (process.platform !== 'linux') {
|
||||
await page.keyboard.press('Meta+K')
|
||||
} else {
|
||||
await page.locator('html').press('Control+C')
|
||||
}
|
||||
await page.keyboard.press('Meta+K')
|
||||
await expect(cmdSearchBar).toBeVisible()
|
||||
|
||||
// Search for extrude command and choose it
|
||||
|
@ -24,7 +24,7 @@ export const CommandBar = () => {
|
||||
}, [pathname])
|
||||
|
||||
// Hook up keyboard shortcuts
|
||||
useHotkeyWrapper(['mod+k', 'ctrl+c'], () => {
|
||||
useHotkeyWrapper(['mod+k'], () => {
|
||||
if (commandBarState.context.commands.length === 0) return
|
||||
if (commandBarState.matches('Closed')) {
|
||||
commandBarSend({ type: 'Open' })
|
||||
|
Reference in New Issue
Block a user