In order to be able to execute various post actions.
When pressing these keys a return code 10 + X is returned
as soon as wofi is exited.
Currenty 20 custom keys have been defined.
- Consolidate a modifier's "left" and "right" variants to just one
modifier referred to by its name or mask. E.g. Control_L and Control_R are
resolved by detecting the mask and are both associated with the name "Ctrl".
- Store string representations of the modified key values as the keys to
the key entry map (exactly how they appear in the config file). E.g.
the string "Ctrl-m" would be the key to the map entry for a custom
Ctrl-m binding (whereas before the key would've only been "m", a
source of ambiguity and conflict).
- During init, pass through key mapping entry logic twice: once for
inputting the defaults, and a second time for adding any custom
mappings as defined by the config file. This allows defaults to stay
in place unless a user chooses to blow them away. E.g. mapping Ctrl-p
to key_up shouldn't blow away key_up's default mapping to up arrow,
and this fixes that use case.
These changes resolve several bugs due to key mapping resolution ambiguity and
conflicts, and generally make key mapping more intuitive. However, a new quirk
is that keys that are obtained using Shift (like "J", aka "capital j") now
require the use of Shift modifier when configuring that binding.
This allows a new matching method that will be the equivalent
of contains on every word (delimited by space) that is given.
This is the same matching algorithm used by helm in emacs and
allows a way of iteratively refining your search.
This function respects OnlyShowIn and NotShowIn to filter out apps that
are not applicable to the current desktop environment. It also does
additional sanity checks on .desktop files, providing the same effect as
the boolean expression it replaced.