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

Add keyboard navigation for search #32

Open
lightonflux opened this issue Jan 25, 2021 · 8 comments
Open

Add keyboard navigation for search #32

lightonflux opened this issue Jan 25, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@lightonflux
Copy link

There is currently no keyboard navigation for the search field and search view.

There are some keyboard combinations that are well established and are expected by many users.

Going back & forward

alt + ←

This is not only valid in the context of search, but also every other area of the app that has back buttons. (Forward i haven't seen yet).

Focus search field

ctrl+f is the best established combo, especially on GNOME.

closing search view / unfocus search field

esc or pressing ctrl+f again.

moving to search results

It would also be nice if the next logical item when pressing tab, is the first item in the results list, i haven't checked this, but i think it makes sense. :-)

@xou816 xou816 added the enhancement New feature or request label Jan 25, 2021
@lunaneff
Copy link

In addition to alt+←, spot should also support mouse button 4 as back button (and mouse button 5 as forward, if that gets implemented). Most web browsers have this, so I'm used to using my mouse instead of alt+←

@epvpsyc
Copy link

epvpsyc commented Dec 9, 2021

In addition of being able to use mouse button 4 as back button as mentioned above it would be great if the space bar could be used to pause the currently playing track. This is the default in many music / video players (including spotify).

@jannuary
Copy link
Contributor

jannuary commented Dec 9, 2021

In addition of being able to use mouse button 4 as back button as mentioned above it would be great if the space bar could be used to pause the currently playing track. This is the default in many music / video players (including spotify).

Already a thing, but it only works on dev branch? I wonder if that has something to do with type-to-search eating events

@xou816
Copy link
Owner

xou816 commented Dec 9, 2021

Right, I've got some cleanup to do regarding type to search (well, I'll remove it fully to be clear :D ) but indeed it would sometimes eat up keyboard events!

Spacebar to toggle playback is there too, but sometimes a widget will steal focus and space will just send the activate signal to it. I'm probably not implementing my shortcuts properly (or maybe it'll be sorted out once we're rid of type-to-search)

@NoTuxNoBux
Copy link

NoTuxNoBux commented Jan 14, 2022

It seems that in 0.3.0 type-to-search everywhere has disappeared, which might be intentional. More importantly, though, since Ctrl+f isn't bound yet, you now manually need to click the search icon in the header bar every time (?).

Related to this, there also appears to be a slight UX bug where clicking the search icon brings you to the search screen asking you to "Start typing to search", but focus isn't put in the search field in the header bar, so typing doesn't actually do anything until you manually give it focus.

(The improvements in 0.3.0 are nice, though, just wanted to update the status of this issue here.)

@xou816
Copy link
Owner

xou816 commented Jan 14, 2022

I tried working on this at some point but I somehow can't understand how Gtk handles focusing, I have to dig into it.

@lunaneff
Copy link

@xou816 In Vala you can set the focus to a widget by calling widget.grab_focus(). I don't know how it works in Rust, but I assume it's something similar

@xou816
Copy link
Owner

xou816 commented Jan 24, 2022

It definitely should be similar, but I had ran into some weird issue, was probably doing something wrong, I'll give it another proper shot!

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

No branches or pull requests

6 participants