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

Show Windows+# keyboard shortcuts when holding down Windows key #469

Open
jbicha opened this issue Apr 9, 2017 · 11 comments
Open

Show Windows+# keyboard shortcuts when holding down Windows key #469

jbicha opened this issue Apr 9, 2017 · 11 comments

Comments

@jbicha
Copy link
Collaborator

jbicha commented Apr 9, 2017

In Unity, holding down the Windows key shows an overlay letting you easily see which number the apps in the launcher are for the Windows+number keyboard shortcuts.

It looks like this is implemented in Dash to Dock with the Super+Q keyboard shortcut but that's not very discoverable unless someone first read carefully through the Settings.

To implement this, it would be necessary to differentiate between a tap of the Windows key and a long hold of the key. I don't know how difficult that would be.

@franglais125
Copy link
Contributor

franglais125 commented Apr 9, 2017

@jbicha that's actually how I first implemented it: holding down the Super key would show the overlay, as in Unity.

The problem I had with that is that it does not work under Wayland, by design: you can't track key presses. All I could do in the end (to have X and Wayland behave in the same way) was assign a keyboard shortcut that can be connected to a given action.

Here is the PR with more info: #360

Here is a video with the first implementation I did (holding down Super key): https://www.youtube.com/watch?v=2Avkhxt69f4

@jbicha
Copy link
Collaborator Author

jbicha commented Apr 9, 2017

If GNOME wanted this to work in Wayland, could they do it? And if so, could they be talked into setting that up for this particular feature?

@franglais125
Copy link
Contributor

franglais125 commented Apr 9, 2017

I am not sure, but intuitively I want to say yes. However, I don't know how much work this would be.

The compositor needs to pass down the information to the relevant layers. In this specific implementation, I'm using Gdk, so we would need the compositor to pass down the key-press-event (or something similar) to Gdk instances.

Myself I would love to have this implemented, as the Number Overlay would be so much more useful (and easier to use). (@caasiu would like this too for his extension).

However, I also think this should be limited to, for example, only modifiers (Super, Shift, Ctrl, etc.)). If not, we are back at X-level security issues where a key-logger is super easy to implement.

Relevant info (upstream):

@micheleg
Copy link
Owner

micheleg commented Apr 9, 2017

I mostly agree with @franglais125. Beside the technical limitations, key press is also used to move and resize windows, and I remember it was quite annoying to me while I was testing the original implementation. Although these circumstances could maybe be filtered out at the extension level

@markstos
Copy link

Thanks for considering this. As a Unity user looking to migrate, it is a great usability feature to be able to see the numbers before deciding which one to press. In Unity I use this method window switching exclusively instead of Alt-Tab.

Once I remember that my terminal is -2, I can always quickly go directly there. (well, that's broken for me too, but that's a different issue). With Alt-Tab, the number times I need to press Tab to get a particular app varies, so it takes longer and is more error-prone to get back to the app I want.

@hackel
Copy link

hackel commented May 24, 2017

FYI, this is exactly how the windowNavigator extension currently works. When you press alt or control, it displays the number overlays allowing you to select windows or workspaces, respectively. Does this also not function properly under Wayland?

@franglais125
Copy link
Contributor

@hackel Thanks for the additional feedback, however it still won't work for us. The reason it works in that extension is because the overview is open when you use it. In a way, you are then within a shell window.

Under Wayland, you can't track the keyboard status when your app is not in focus, otherwise yes, of course you can. When I did the previous implementation (holding Sup to show the overlay) it would work only under two circumstances:

  1. in overview (same as windowNavigator)
  2. if running a XWayland app (e.g. Firefox), since under X you can track the status of modifiers.

@markstos
Copy link

markstos commented May 24, 2017 via email

@jhasse
Copy link

jhasse commented May 24, 2017

Would it be possible to implement this in GNOME Shell directly? https://bugzilla.gnome.org/show_bug.cgi?id=648000 hasn't been closed as WONTFIX.

@franglais125
Copy link
Contributor

@jhasse while upstream could implement that, it's not up to us I guess.

I've opened a request for this upstream: https://bugzilla.gnome.org/show_bug.cgi?id=788159

@michaeljmayo
Copy link

This issue is the primary reason why I have continued using 14 and 16.
It still has not been fixed in 20. So now I am reinstalling 16.
Should it not be easy to overlay numbers on the relevant icons immediately then the super key is pressed?
Showing the numbers after the number key is pressed is both useless and makes Linux look as stupid as Windows. That's an optic worth avoiding, surely.
When I first encountered this useful feature, in Stupid Windows, where they make no attempt to show the numbers, I immediately wrote the numbers on the bezel of the monitor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants