Skip to content

Commit 0384e97

Browse files
committed
Fix Ctrl+I shortcut conflict with Tab key in terminals
Ctrl+I sends the same ASCII byte (0x09) as Tab in terminals, making it unreliable across all platforms. Changed install driver shortcut to Ctrl+D which has no such conflict.
1 parent 6858698 commit 0384e97

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sqlit/ui/screens/connection.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ConnectionScreen(ModalScreen):
6363
Binding("escape", "cancel", "Cancel", priority=True),
6464
Binding("ctrl+s", "save", "Save", priority=True),
6565
Binding("ctrl+t", "test_connection", "Test", priority=True),
66-
Binding("ctrl+i", "install_driver", "Install driver", show=False, priority=True),
66+
Binding("ctrl+d", "install_driver", "Install driver", show=False, priority=True),
6767
Binding("tab", "next_field", "Next field", priority=True),
6868
Binding("shift+tab", "prev_field", "Previous field", priority=True),
6969
Binding("down", "focus_tab_content", "Focus content", show=False),
@@ -510,9 +510,9 @@ def _update_driver_status_ui(self) -> None:
510510
detail_hint = escape(detail) if detail else "Import failed."
511511
test_status.update(
512512
f"[yellow]⚠ Driver failed to load:[/] {error.package_name}\n"
513-
f"[dim]{detail_hint} Press ^i for details.[/]"
513+
f"[dim]{detail_hint} Press ^d for details.[/]"
514514
)
515-
dialog.border_subtitle = "[bold]Help ^i[/] Cancel <esc>"
515+
dialog.border_subtitle = "[bold]Help ^d[/] Cancel <esc>"
516516
return
517517
strategy = detect_strategy(extra_name=error.extra_name, package_name=error.package_name)
518518
if strategy.can_auto_install:
@@ -521,15 +521,15 @@ def _update_driver_status_ui(self) -> None:
521521
f"[yellow]⚠ Missing driver:[/] {error.package_name}\n"
522522
f"[dim]Install with:[/] {escape(install_cmd)}"
523523
)
524-
dialog.border_subtitle = "[bold]Install ^i[/] Cancel <esc>"
524+
dialog.border_subtitle = "[bold]Install ^d[/] Cancel <esc>"
525525
else:
526-
# For unknown install methods, show reason and hint to press ^i for details
526+
# For unknown install methods, show reason and hint to press ^d for details
527527
reason = strategy.reason_unavailable or "Auto-install not available"
528528
test_status.update(
529529
f"[yellow]⚠ Missing driver:[/] {error.package_name}\n"
530-
f"[dim]{escape(reason)} Press ^i for install instructions.[/]"
530+
f"[dim]{escape(reason)} Press ^d for install instructions.[/]"
531531
)
532-
dialog.border_subtitle = "[bold]Help ^i[/] Cancel <esc>"
532+
dialog.border_subtitle = "[bold]Help ^d[/] Cancel <esc>"
533533
else:
534534
if self._post_install_message:
535535
test_status.update(f"✓ {self._post_install_message}")

0 commit comments

Comments
 (0)