diff --git a/datashuttle/tui/app.py b/datashuttle/tui/app.py index ef443db7b..09f293390 100644 --- a/datashuttle/tui/app.py +++ b/datashuttle/tui/app.py @@ -120,7 +120,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+W 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 55f02df7c..739b7153f 100644 --- a/datashuttle/tui/custom_widgets.py +++ b/datashuttle/tui/custom_widgets.py @@ -99,7 +99,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+w": self.mainwindow.copy_to_clipboard(self.value) elif event.key == "ctrl+o": @@ -174,7 +174,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+w": 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..b74893a83 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+W : copy the highlighted 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+W : copy the highlighted 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..87d89f228 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+W` 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 diff --git a/docs/source/pages/user_guides/create-folders.md b/docs/source/pages/user_guides/create-folders.md index 0de86c58f..22180c066 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+W` 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 559a4485b..5b6f21b1b 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+w", ) 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+w", ) # Check that the error message is displayed.