diff --git a/datashuttle/tui/app.py b/datashuttle/tui/app.py index bac7594d9..1d6ec3079 100644 --- a/datashuttle/tui/app.py +++ b/datashuttle/tui/app.py @@ -43,7 +43,6 @@ class TuiApp(App, inherit_bindings=False): # type: ignore BINDINGS = [ Binding("escape", "exit_app", "Exit app", priority=True), - Binding("ctrl+c", "show_copy_help", "Show copy help", priority=True), ] exit_accept_or_decline_popup = False @@ -120,7 +119,7 @@ def on_button_pressed(self, event: Button.Pressed) -> None: def action_show_copy_help(self) -> None: """Display a notification (for CTRL+C).""" self.notify( - "Use CTRL+Q to copy from Inputs and DirectoryTrees.\n" + "Use CTRL+Y to copy from Inputs and DirectoryTrees.\n" "Use ESC or the 'Exit' button to quit the application.\n" "CTRL+C can be used to copy after highlighting text with the mouse while pressing 'shift'.", timeout=6, diff --git a/datashuttle/tui/custom_widgets.py b/datashuttle/tui/custom_widgets.py index 1ee24308b..bc60744a7 100644 --- a/datashuttle/tui/custom_widgets.py +++ b/datashuttle/tui/custom_widgets.py @@ -100,7 +100,7 @@ def as_names_list(self) -> List[str]: def on_key(self, event: events.Key) -> None: """Handle keyboard press on the Input.""" - if event.key == "ctrl+q": + if event.key == "ctrl+c": self.mainwindow.copy_to_clipboard(self.value) elif event.key == "ctrl+o": @@ -184,7 +184,7 @@ def on_key(self, event: events.Key) -> None: Textual event containing information on the key press. """ - if event.key == "ctrl+q": + if event.key == "ctrl+c": path_ = self.get_node_at_line(self.hover_line).data.path path_str = path_.as_posix() self.mainwindow.copy_to_clipboard(path_str) diff --git a/datashuttle/tui/tooltips.py b/datashuttle/tui/tooltips.py index 6d0e63a5a..80787be81 100644 --- a/datashuttle/tui/tooltips.py +++ b/datashuttle/tui/tooltips.py @@ -130,7 +130,7 @@ def get_tooltip(id: str) -> str: "when hovering the mouse over a folder:\n\n" "-CTRL+O : open the folder in the system filebrowser.\n" "-CTRL+N : rename a file or folder.\n" - "-CTRL+Q : copy the full filepath to clipboard.\n" + "-CTRL+C : copy the full filepath to clipboard.\n" "-CTRL+R : refresh the folder tree.\n" "-CTRL+F : fill the 'sub-' or 'ses-' input with the foldername.\n" "-CTRL+A : similar to CTRL+F, but append." @@ -206,7 +206,7 @@ def get_tooltip(id: str) -> str: "Keyboard shortcuts, when hovering the mouse over a folder:\n\n" "-CTRL+O : open the folder in the system filebrowser.\n" "-CTRL+N : rename a file or folder.\n" - "-CTRL+Q : copy the full filepath to clipboard.\n" + "-CTRL+C : copy the full filepath to clipboard.\n" "-CTRL+R : refresh the folder tree.\n" "-CTRL+F : fill the 'sub-' or 'ses-' input with the foldername.\n" "-CTRL+A : similar to CTRL+F, but append." diff --git a/docs/source/pages/get_started/getting-started.md b/docs/source/pages/get_started/getting-started.md index 5751c149a..e7526cfa9 100644 --- a/docs/source/pages/get_started/getting-started.md +++ b/docs/source/pages/get_started/getting-started.md @@ -163,7 +163,7 @@ if connecting via SSH. In this tutorial, we will set this next to the local path for convenience. -1) Copy the contents of the _local path_ input by clicking it, hovering over it and pressing `CTRL+Q` to copy. +1) Copy the contents of the _local path_ input by clicking it, hovering over it and pressing `CTRL+Y` to copy. 2) Paste it into the _central path_ input with `CTRL+V` and change "local" to "central". ```{image} /_static/screenshots/tutorial-1-make-central-path-dark.png @@ -416,7 +416,7 @@ will update to display the new folders:
By hovering over a folder with the mouse we can quickly -copy the full path to the folder by pressing `CTRL+Q)` +copy the full path to the folder by pressing `CTRL+Y)` (you may need to click the `Directory Tree` first). Alternatively, pressing `CTRL+O` will open the folder in your file browser. diff --git a/docs/source/pages/user_guides/create-folders.md b/docs/source/pages/user_guides/create-folders.md index 0de86c58f..5c1a6034c 100644 --- a/docs/source/pages/user_guides/create-folders.md +++ b/docs/source/pages/user_guides/create-folders.md @@ -112,7 +112,7 @@ Open folder in system filebrowser : `CTRL+O` will open a folder in the system filebrowser. Copy the full filepath. -: `CTRL+Q` will copy the entire filepath of the file or +: `CTRL+Y` will copy the entire filepath of the file or folder. \ diff --git a/tests/tests_tui/test_tui_directorytree.py b/tests/tests_tui/test_tui_directorytree.py index 6b4d2d79c..cc9e811f8 100644 --- a/tests/tests_tui/test_tui_directorytree.py +++ b/tests/tests_tui/test_tui_directorytree.py @@ -134,7 +134,7 @@ async def test_create_folders_directorytree_clipboard( pilot, "#create_folders_directorytree", hover_line=2, - press_string="ctrl+q", + press_string="ctrl+c", ) pasted_path = pyperclip.paste() @@ -178,7 +178,7 @@ def mock_copy(_): pilot, "#create_folders_directorytree", hover_line=2, - press_string="ctrl+q", + press_string="ctrl+c", ) # Check that the error message is displayed.