Skip to content

Commit 4217fdf

Browse files
committed
Remove Alt+X keyboard shortcut for closing browser connection status
- remove shortcut alt+x on 'connected' status bar ├── apps │ └── editor │ └── src │ └── views │ └── prompt │ └── frontend │ └── Main │ └── MainView │ ├── MainView.tsx │ ├── components │ │ └── BrowserConnectionStatus │ │ └── BrowserConnectionStatus.tsx │ └── hooks │ └── use-keyboard-shortcuts.ts └── packages └── ui └── src └── components └── editor └── prompt-view └── StatusBar └── StatusBar.tsx
1 parent 7e3ff18 commit 4217fdf

3 files changed

Lines changed: 0 additions & 13 deletions

File tree

‎apps/editor/src/views/prompt/frontend/Main/MainView/MainView.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ export const MainView: React.FC<Props> = (props) => {
240240
on_cli_prompt_type_change: props.on_cli_prompt_type_change,
241241
on_show_home: props.on_show_home,
242242
on_agentic_search: props.on_agentic_search,
243-
on_close_browser_connection: browser_connection.handle_close,
244243
is_disabled: props.are_keyboard_shortcuts_disabled
245244
})
246245

@@ -392,7 +391,6 @@ export const MainView: React.FC<Props> = (props) => {
392391
is_visible={props.target == 'WEB'}
393392
is_connected={props.is_connected}
394393
is_closed={browser_connection.is_closed}
395-
is_alt_pressed={is_alt_pressed}
396394
on_close={browser_connection.handle_close}
397395
on_install={props.on_install_browser_extension}
398396
translations={{

‎apps/editor/src/views/prompt/frontend/Main/MainView/components/BrowserConnectionStatus/BrowserConnectionStatus.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ type Props = {
1414
}
1515
on_install: () => void
1616
on_close: () => void
17-
is_alt_pressed?: boolean
1817
}
1918

2019
export const BrowserConnectionStatus: React.FC<Props> = (props) => {
@@ -37,7 +36,6 @@ export const BrowserConnectionStatus: React.FC<Props> = (props) => {
3736
icon: 'codicon-close-small',
3837
label: props.translations.hide,
3938
title: props.translations.hide,
40-
keycap: props.is_alt_pressed ? 'X' : undefined,
4139
on_click: props.on_close
4240
})
4341
}

‎apps/editor/src/views/prompt/frontend/Main/MainView/hooks/use-keyboard-shortcuts.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export const use_keyboard_shortcuts = (params: {
1313
on_cli_prompt_type_change: (prompt_type: CliPromptType) => void
1414
on_show_home: () => void
1515
on_agentic_search?: () => void
16-
on_close_browser_connection?: () => void
1716
is_disabled: boolean
1817
}) => {
1918
const [is_alt_pressed, set_is_alt_pressed] = useState(false)
@@ -153,14 +152,6 @@ export const use_keyboard_shortcuts = (params: {
153152
params.on_agentic_search?.()
154153
return
155154
}
156-
157-
if (event.code == 'KeyX') {
158-
if (params.target == 'WEB') {
159-
event.preventDefault()
160-
params.on_close_browser_connection?.()
161-
}
162-
return
163-
}
164155
}
165156

166157
window.addEventListener('keydown', handle_key_down)

0 commit comments

Comments
 (0)