Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcuts (general) #451

Closed
garrett opened this issue May 13, 2024 · 4 comments · Fixed by #567
Closed

Keyboard shortcuts (general) #451

garrett opened this issue May 13, 2024 · 4 comments · Fixed by #567
Labels
enhancement New feature or request

Comments

@garrett
Copy link
Member

garrett commented May 13, 2024

In addition to an obvious keyboard shortcut for editing the bar, we should also have other shortcuts.

But we need to determine what they are, if we can use them, and so on.

To kick off the discussion, here's what Nautilus has:

image

image

image

I couldn't find it in KDE, but did find a list of some common ones in their docs @ https://docs.kde.org/stable5/en/khelpcenter/fundamentals/kbd.html#kbd-files (but it's not very detailed).

Dolphin itself (which is installable via Flathub, BTW) has a keyboard shortcut configuration dialog that has a ton of defaults.

image

image

@garrett
Copy link
Member Author

garrett commented May 13, 2024

In addition to having shortcuts: We'd probably want a way to show the keyboard shortcuts too.

I'd suggest an entry in the top-level menu that shows a modal that has a table with the action and the shortcut, more or less similar to Nautilus. It doesn't have to be as fancy.

When displaying it, we could use the <kbd> key like MDN shows: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd — I think we'd need to add CSS to make it look like a key if we wanted that, as it doesn't come by default and I think PF doesn't add that to the element.

@garrett
Copy link
Member Author

garrett commented May 13, 2024

Note: macOS generally uses a command key instead of a control key, so handling for macOS would probably need to be different from Linux and Windows.

We also probably want to consider which of the commands from Nautilus overlap with the functionality of Windows and macOS also. (I'd imagine GNOME folks already thought of that and are using the common shortcuts that are also in Windows and macOS.)

We could (and probably should) start small and expand the list of useful shortcuts.

@jelly jelly added the enhancement New feature or request label May 23, 2024
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jun 18, 2024
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jun 18, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jun 19, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
@garrett
Copy link
Member Author

garrett commented Jun 20, 2024

Our keyboard shortcut reference modal would look something like this:

Keyboard shortcuts modal reference

Each section would have a header.
There would be multiple groups per section, with related shortcuts (navigation would have arrow keys grouped).
And then use that in a grid or definition list for a group.

We'd use something like this HTML for the keyboard shortcuts, with kbd:

<kbd class="shortcut"><kbd class="key">Ctrl</kbd> + <kbd class="key">A</kbd></kbd>

...which will probably need some special CSS to add a background color, border, and roundedness, to look like a key.

tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jun 25, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `ctrl + L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jun 27, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `ctrl + L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jun 27, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `ctrl + L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Jul 31, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `ctrl + L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Aug 5, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: go into currently selected directory
- `F2`: rename selected file
- `ctrl + a`: select all files
- `N`: create new directory
- `ctrl + L`: focus files breadcrumbs to manually edit it

Alt + arrow left/right is already supported by cockpit files browser
history.

What is probably good for a discussion is if we want to override default
browser behavior for `ctrl + l` which focuses the Address Bar to "focus
files breadcrumbs to manually edit it" or use the keybind that I set
(`L` aka `shift + l`).
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Aug 6, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Aug 13, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Sep 2, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Sep 2, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Sep 4, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Sep 17, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Sep 24, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
tomasmatus added a commit to tomasmatus/cockpit-files that referenced this issue Sep 25, 2024
fixes: cockpit-project#451

For now this adds following keybindings:

- `alt + arrow up`: go up one directory
- `alt + arrow down`: activate selected item, enter directory
- `Enter`: activate selected item, enter directory
- `ctrl + shift + L`: focus files breadcrumbs to manually edit it
- `F2`: rename selected file
- `shift + N`: create new directory
- `ctrl + c`: copy file/directory
- `ctrl + v`: paste file/directory
- `ctrl + a`: select all files

Alt + arrow left/right is already supported by cockpit files browser
history.
@jelly jelly closed this as completed in #567 Oct 1, 2024
@jelly jelly closed this as completed in 49de6d0 Oct 1, 2024
@garrett
Copy link
Member Author

garrett commented Oct 2, 2024

Congrats!

It needs a follow-up for Apple OS support (macOS, iPhone, iPad) for proper support there:

(I wrote some details with screenshots and provided some code at the bottom which can be used to solve the issue. It should be relatively straightforward to add. I can test on my ancient Mac, we can peek at a VM, and/or we can ask Matej or anyone else with a modern Mac to confirm it's fine.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants