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

Global Shortcuts Portal silent propagation of shortcuts #1101

Open
Aviana opened this issue Sep 9, 2023 · 7 comments
Open

Global Shortcuts Portal silent propagation of shortcuts #1101

Aviana opened this issue Sep 9, 2023 · 7 comments
Labels
needs discussion Needs discussion on how to implement or fix the corresponding task new api This requires adding API to an existing portal portal: global shortcuts Global shortcuts portal

Comments

@Aviana
Copy link

Aviana commented Sep 9, 2023

Currently the only way to submit the applications shortcuts to the portal (and thus the compositor on the other side) is through the "BindShortcuts" method. This Method is described as follows:

Bind the shortcuts of this session. This will typically result the portal presenting a dialog letting the user configure shortcut triggers.

If i have an application such as OBS-studio for example that changes the amount of possible keybindings every time there are changes to the amount of scenes/etc (since each scene comes with the ability to key-bind it) there would be the system dialog popping up. And the new keybindings have to be sent each time they change because the user could visit the system settings at any time. It would make a lot more sense to make all the changes to the scenes and then hop into the keybindings to bind whatever should be bound.
Possible solutions could be to move the showing of the system dialog to a new method or implementing a new one that does the same as "BindShortcuts" but does not show the system dialog but rather only updates it if it is already shown.

@swick
Copy link
Contributor

swick commented Sep 11, 2023

I think what you're describing is called an action set in other APIs. You would define multiple sets of global shortcuts, submit that to the portal, the user would then be able to bind all the shortcuts of all the sets. The app could then switch between the sets on its own and the portal would not show any UI when a different action set is made active.

That's a reasonable addition IMO.

@Aviana
Copy link
Author

Aviana commented Sep 14, 2023

While the idea of having sets of global shortcuts is great for applications that come with profiles for their settings, it is not what i was talking about. I want to silently edit the amount of actions in a set.

Another example:
A user has used an application before but now sits in front of a fresh system. They launch their app of choice but instead of going through the apps own button to open the keybinds they just press the system settings because they assume to find them there. However they will only show up once the system settings have been opened through the app. This seems confusing.

@GeorgesStavracas GeorgesStavracas added new api This requires adding API to an existing portal needs discussion Needs discussion on how to implement or fix the corresponding task portal: global shortcuts Global shortcuts portal labels Oct 3, 2023
@Mikenux
Copy link

Mikenux commented Nov 28, 2023

@Aviana:

In other words, the user thinks that to see the active shortcuts, they needs to open the system settings because the portal dialog box looks like the system settings. Is that what you meant?

For keyboard shortcuts relating to scenes, I'm not sure I understand. Could you describe the case with "steps to reproduce"?

@Aviana
Copy link
Author

Aviana commented Dec 7, 2023

There are no steps to reproduce as applications do not exist besides the open pull request for Mumble.
And from my point of view this portal has a design issue where there could be confusion to a non technical user.
This stems from when applications show up in whatever method the compositor provides to review existing shortcuts.

Points of confusion and my own impact rating:

So when i install an application that supports this portal, the actions in this program that could be bound to shortcuts will not show up in the shortcut managing interface of the compositor until the program has been launched for the first time and it submits a BindShortcuts request. (Minor and not necessarily the point of this issue)

Let's say i have installed my new application and the application currently has action1 as its only action that could be bound to a shortcut. The user now presses the button inside the application to bind action1. The BindShortcuts method gets called and the user is presented with a UI to bind this action to a shortcut. The user can even close the application and manage the shortcuts through the compositors interface. However if the application through its context now gains action2 there is now the problem that if the application doesn't immediately sends a BindShortcuts request the user could be going to the compositors interface and not find action2 there. A reason to not send the BindShortcuts immediately could be that the user is generating multiple actions in series. This would spam them with the option to bind every one of them as the application does not know when a new action will be created.
I am advocating for a method to send a shortcut in a way just to notify the compositor of its existence without the prompt to bind it. The showing of the prompt is currently suggested by the documentation when BindShortcuts is called.
(This is the major point of this issue)

Applications also don't clean up after themselves when they are uninstalled. They will still show up in the compositors interface until manually removed. (Minor and not necessarily the point of this issue)

@Mikenux
Copy link

Mikenux commented Dec 9, 2023

Still, it looks like you want sets of actions/shortcuts. So it seems to be missing the division of the list of shortcuts into sets (which would be named). In fact, the app knows all the shortcuts it wants to use, so it can ask to register them all at the same time. Then, when they are all registered, they could then change at will without asking the user. Perhaps a global shortcut to display the actions of a set depending on the context (determined by the app) could be added.

The problem of silently registering shortcuts occurs when they conflict with those of the system. If they are changed silently, how to handle that? If system shortcuts are automatically overwritten when launching the app, then the user will be surprised that they no longer work if used. If the system shortcuts are not overwritten, this will cause problems when the user wants to use the app shortcuts: either they will not work, or it means asking (which could disrupt the workflow).

Applications also don't clean up after themselves when they are uninstalled. They will still show up in the compositors interface until manually removed. (Minor and not necessarily the point of this issue)

Perhaps the task of the desktop environment?

@Aviana
Copy link
Author

Aviana commented Dec 9, 2023

In fact, the app knows all the shortcuts it wants to use

But it does not. As i have said there are apps where the amount of shortcuts (and yes even in a single set) could change at any point in time depending on user input. This could mean a new shortcut and therefore popup asking for confirmation every 10 seconds.
And no, i am not asking to fully register the shortcut silently. I want to register the handle that describes the shortcut. To notify the compositor of it's existence and the possibility of assigning a shortcut. So the title of this issue might be misleading.

@Mikenux
Copy link

Mikenux commented Dec 9, 2023

Ok, that's better understandable. The keyboard shortcuts can also be registered (so there are suggestions), but are either inactive or ask if triggered (option for the app to disrupt or not the user when there is a conflict, so shortcuts can be triggered directly if the user know them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Needs discussion on how to implement or fix the corresponding task new api This requires adding API to an existing portal portal: global shortcuts Global shortcuts portal
Projects
Status: Triaged
Development

No branches or pull requests

4 participants