Skip to content

DME Global Shortcuts

Paolo Fabio Zaino edited this page Mar 21, 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).

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.

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

General Architecture

|detected by low-level routines (LLR)| LLR(Process Key event)

LLR --> GSE{Is this a key(s) event requested by a client App?} GSE -->|Yes - send a Wimp Message| Client App[Hack message] GSE -->|No| GSE[Ignore the event]


-->
Clone this wiki locally