Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions datashuttle/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions datashuttle/tui/custom_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions datashuttle/tui/tooltips.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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."
Expand Down
4 changes: 2 additions & 2 deletions docs/source/pages/get_started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -416,7 +416,7 @@ will update to display the new folders:
<br>

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.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/pages/user_guides/create-folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

\
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_tui/test_tui_directorytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand Down
Loading