This commit is contained in:
@@ -717,6 +717,41 @@ describe('keybindings', () => {
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
// Why: #8533 — both previously defaulted to Mod+Shift+E on darwin; emulator won.
|
||||
it('keeps explorer on Mod+Shift+E and gives the mobile emulator a non-colliding macOS default', () => {
|
||||
expect(getEffectiveKeybindingsForAction('sidebar.explorer.toggle', 'darwin')).toEqual([
|
||||
'Mod+Shift+E'
|
||||
])
|
||||
expect(getEffectiveKeybindingsForAction('tab.newSimulator', 'darwin')).toEqual([
|
||||
'Mod+Alt+Shift+E'
|
||||
])
|
||||
expect(getEffectiveKeybindingsForAction('tab.newSimulator', 'linux')).toEqual([])
|
||||
expect(getEffectiveKeybindingsForAction('tab.newSimulator', 'win32')).toEqual([])
|
||||
expect(formatKeybindingList(['Mod+Alt+Shift+E'], 'darwin')).toBe('⌘⌥⇧E')
|
||||
|
||||
expect(
|
||||
keybindingMatchesAction(
|
||||
'sidebar.explorer.toggle',
|
||||
{ key: 'e', code: 'KeyE', meta: true, control: false, alt: false, shift: true },
|
||||
'darwin'
|
||||
)
|
||||
).toBe(true)
|
||||
expect(
|
||||
keybindingMatchesAction(
|
||||
'tab.newSimulator',
|
||||
{ key: 'e', code: 'KeyE', meta: true, control: false, alt: false, shift: true },
|
||||
'darwin'
|
||||
)
|
||||
).toBe(false)
|
||||
expect(
|
||||
keybindingMatchesAction(
|
||||
'tab.newSimulator',
|
||||
{ key: 'e', code: 'KeyE', meta: true, control: false, alt: true, shift: true },
|
||||
'darwin'
|
||||
)
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
it('defines an unassigned per-agent tab action for every TUI agent', () => {
|
||||
for (const agent of ALL_TUI_AGENTS) {
|
||||
const actionId = agentTabActionId(agent)
|
||||
|
||||
@@ -567,8 +567,10 @@ export const KEYBINDING_DEFINITIONS: readonly KeybindingDefinition[] = [
|
||||
group: 'Tabs',
|
||||
scope: 'tabs',
|
||||
searchKeywords: ['shortcut', 'tab', 'simulator', 'emulator', 'mobile', 'ios', 'new'],
|
||||
// Why: keep explorer on Mod+Shift+E (VS Code muscle memory). Emulator is
|
||||
// macOS-only and less common, so it yields to a free chord (#8533).
|
||||
defaultBindings: {
|
||||
darwin: ['Mod+Shift+E'],
|
||||
darwin: ['Mod+Alt+Shift+E'],
|
||||
linux: [],
|
||||
win32: []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user