Replies: 3 comments 5 replies
-
Hello @Teddy-Kun! Here is a linked issue: #1101. Option 2 is obviously the way to go.
What do you mean here? Trying to bind an "infinite" number of shortcuts or using BindShortcuts multiple times? Conflicts As noted in the linked issue, conflict handling seems necessary, especially if letting the app bind shortcuts and allowing users to use the shortcuts directly is wanted. Note that users should know how to get a list of shortcuts they can use. Apps should avoid conflicts with system shortcuts. However, how to handle conflicts with another app also using dynamic global shortcuts? Do you expect your workflow to be interrupted (i.e. displaying a window asking which app shortcut to use) or is this something to avoid? (for example, it wouldn't be nice to be interrupted while recording) |
Beta Was this translation helpful? Give feedback.
-
I think more consideration to a different approach is needed here; letting clients arbitrarily bind shortcuts at their own leisure is trivial to abuse, doesn't handle potential conflicts, so doesn't sound like a good solution. In the end, the user should be in control. Routing all key events to a set of applications via the portal to me is out of the question. |
Beta Was this translation helpful? Give feedback.
-
I guess we need a signal from the portal to know when shortcuts can be registered. For example, after sending the Activated signal. However, this assumes that users always use keyboard shortcuts, which is not the case. The only thing I see (at least for now) is registering stable shortcuts. For this, a logical system could be used. For example, to switch to a specific scene: [shortcut to switch scene] + number/letter. Thoughts? Is this a direction to take? |
Beta Was this translation helpful? Give feedback.
-
I am not really that knowledgeable as to the specifics but correct me if I am wrong. Currently the way the portal works, is that an application has to pre-register exactly what shortcuts it needs.
This works for most applications, but as outlined in this clip, the current way the global shortcuts portal works, does not fulfill the needs of all applications. In the specific use-case of OBS (and probably some other applications as well) there is a need for dynamically changing shortcuts; enable a custom filter here, change to another scene there, etc. These are unpredictable as they are based on user actions inside the application.
Under the current system OBS could request slots for "Dynamic Action" 1-10 and then remap those internally, however that is limiting, cumbersome and unintuitive for the end-user. As such I suggest at least a discussion around adding Dynamic Global Shortcuts in addition to the current system.
I have thought of 2 different approaches each with pros and cons to enabling the usage of those dynamic global shortcuts. This is mostly based on my experience with the implementation in KDE, as that is, afaik, currently the only desktop environment with support for global shortcuts.
Pros:
Cons:
Additionally this wouldn't require a portal, all desktops would just need to agree that this is a good idea, which I doubt will happen, thus we come.
Pros:
Cons:
create
and/ordestroy
events to possible crash the compositor and/or make the shortcuts UI unusable. I don't think this is likely or even that bad and also should be easily detectableI think this would be the better approach, with a few more limitations. How I would imagine the process going is: an application requests X dynamic shortcuts. The user would get a prompt allowing or denying that, or allowing all dynamic shortcuts for this "session". Those shortcuts would survive closing and reopening the application for consistency reasons. They should not be removed, unless the application in question is either uninstalled, request the removal or the user removes them manually.
Other suggestions, ideas and/or thoughts are of course welcome.
Small note: I am not affiliated with anyone, I just want my application to work.
Beta Was this translation helpful? Give feedback.
All reactions