Skip to content

Commit 1bf5d9b

Browse files
committed
fix(tui): remove ctrl+h keybind from panel
1 parent bfa9bb2 commit 1bf5d9b

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

tui/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { openPanel } from "./shared/navigation"
33
import type { DcpRouteNames, DcpTuiConfig } from "./shared/types"
44

55
export const registerCommands = (api: TuiApi, config: DcpTuiConfig, names: DcpRouteNames) => {
6-
const keys = api.keybind?.create({ close: "escape,ctrl+h" })
6+
const keys = api.keybind?.create({ close: "escape" })
77
api.command.register(() => [
88
{
99
title: `${config.label} panel`,

tui/routes/panel.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ const PanelScreen = (props: {
1818
const palette = createMemo(() => getPalette(props.api.theme.current as Record<string, unknown>))
1919
const sessionID = () => getSessionIDFromParams(props.params)
2020
const source = () => getRouteSource(props.params)
21-
const keys = props.api.keybind?.create({ close: "escape,ctrl+h" })
21+
const keys = props.api.keybind?.create({ close: "escape" })
2222

2323
useKeyboard((evt) => {
2424
if (props.api.route.current.name !== props.names.routes.panel) return
2525
if (props.api.ui?.dialog?.open) return
26-
const matched = keys
27-
? keys.match("close", evt)
28-
: evt.name === "escape" || (evt.ctrl && evt.name === "h")
26+
const matched = keys ? keys.match("close", evt) : evt.name === "escape"
2927
if (!matched) return
3028
evt.preventDefault()
3129
evt.stopPropagation()

0 commit comments

Comments
 (0)