Skip to content

DME Global Shortcuts

Andreas Skyman edited this page Mar 22, 2022 · 9 revisions

This component is meant to handle all keywords events defined in a set of JSON (or INI) and send them to specific WIMP applications as WIMP Messages.

Each Application can deploy their specific shortcuts configuration files (TBD if in JSON or INI format) in a dedicated directory for DME Global Shortcuts Engine (GSE) and send a "reload" message to GSE that will reload the set of configuration files from that directory and start handling the given combinations for all the specified applications.

Release 1 of DME GSE uses an hidden window to ensure it can receive all key combinations even when a client application has no windows opened. It also interact with DeepKeys (but, in the future, we'll replace this with a full Open Source substitute for DeepKeys, as we want to be able to maintain everything we release form the DME) [1].

In future releases, also the hidden window approach will be replaced with a dedicated module that works like SocketWatch and sends a POLLWORD to DME GSE when a specific key or key combination has been pressed by a user.

[1]: Given the misunderstanding from the original author of DeepKeys (for which we totally respect his copyright and desire not to release DeepKeys as Open Source, more details here), GSE is not going to use DeepKeys and we'll figure out an alternative way to achieve the required feature. This in order to avoid any further misunderstanding.

Why do we need DME GSE?

Despite how it may look like initially, the problem with handling global shortcuts at an application level only is that 2 applications may try to use the same key or keys combination and this would lead to have a lot of problems for a user, so we need a single entity that, not only makes it easier for a developer to handle keys when their app window is closed, but that also arbitrate and reveal conflicting global shortcuts and keys combinations.

So DME GSE is meant to solve this exact problem and, combined with the DME-Core, it's always ensured that it will be loaded before any apps that needs it.

The dynamic nature of the engine also makes it possible to install a new key combination without the need to restart anything.

Finally, because it can reveal conflicting combinations, a user will be able to change the app key or key combinations as it pleases the user and without having to change code in the client application.

Architecture

Component startup and initialization

Key event handling

Shortcuts Table

Component dynamic update of the Shortcuts Table

WIMP Message protocol