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()
|
await expect(cmdSearchBar).not.toBeVisible()
|
||||||
|
|
||||||
// Now try the same, but with the keyboard shortcut, check focus
|
// Now try the same, but with the keyboard shortcut, check focus
|
||||||
if (process.platform !== 'linux') {
|
await page.keyboard.press('Meta+K')
|
||||||
await page.keyboard.press('Meta+K')
|
|
||||||
} else {
|
|
||||||
await page.locator('html').press('Control+C')
|
|
||||||
}
|
|
||||||
cmdSearchBar = page.getByPlaceholder('Search commands')
|
cmdSearchBar = page.getByPlaceholder('Search commands')
|
||||||
await expect(cmdSearchBar).toBeVisible()
|
await expect(cmdSearchBar).toBeVisible()
|
||||||
await expect(cmdSearchBar).toBeFocused()
|
await expect(cmdSearchBar).toBeFocused()
|
||||||
@ -3470,11 +3466,7 @@ test.describe('Command bar tests', () => {
|
|||||||
await page.locator('.cm-content').click()
|
await page.locator('.cm-content').click()
|
||||||
|
|
||||||
// Now try the same, but with the keyboard shortcut, check focus
|
// Now try the same, but with the keyboard shortcut, check focus
|
||||||
if (process.platform !== 'linux') {
|
await page.keyboard.press('Meta+K')
|
||||||
await page.keyboard.press('Meta+K')
|
|
||||||
} else {
|
|
||||||
await page.locator('.cm-content').press('Control+C')
|
|
||||||
}
|
|
||||||
|
|
||||||
let cmdSearchBar = page.getByPlaceholder('Search commands')
|
let cmdSearchBar = page.getByPlaceholder('Search commands')
|
||||||
await expect(cmdSearchBar).toBeVisible()
|
await expect(cmdSearchBar).toBeVisible()
|
||||||
@ -3539,11 +3531,7 @@ test.describe('Command bar tests', () => {
|
|||||||
await page.getByRole('button', { name: 'Extrude' }).isEnabled()
|
await page.getByRole('button', { name: 'Extrude' }).isEnabled()
|
||||||
|
|
||||||
let cmdSearchBar = page.getByPlaceholder('Search commands')
|
let cmdSearchBar = page.getByPlaceholder('Search commands')
|
||||||
if (process.platform !== 'linux') {
|
await page.keyboard.press('Meta+K')
|
||||||
await page.keyboard.press('Meta+K')
|
|
||||||
} else {
|
|
||||||
await page.locator('html').press('Control+C')
|
|
||||||
}
|
|
||||||
await expect(cmdSearchBar).toBeVisible()
|
await expect(cmdSearchBar).toBeVisible()
|
||||||
|
|
||||||
// Search for extrude command and choose it
|
// Search for extrude command and choose it
|
||||||
|
@ -24,7 +24,7 @@ export const CommandBar = () => {
|
|||||||
}, [pathname])
|
}, [pathname])
|
||||||
|
|
||||||
// Hook up keyboard shortcuts
|
// Hook up keyboard shortcuts
|
||||||
useHotkeyWrapper(['mod+k', 'ctrl+c'], () => {
|
useHotkeyWrapper(['mod+k'], () => {
|
||||||
if (commandBarState.context.commands.length === 0) return
|
if (commandBarState.context.commands.length === 0) return
|
||||||
if (commandBarState.matches('Closed')) {
|
if (commandBarState.matches('Closed')) {
|
||||||
commandBarSend({ type: 'Open' })
|
commandBarSend({ type: 'Open' })
|
||||||
|
Reference in New Issue
Block a user