Skip to content

A program that creates "key string" binding to execute commands.

License

Notifications You must be signed in to change notification settings

OZoneGuy/shortcut-mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. Usage
    1. Create Configuration
  2. Installation
    1. Arch Linux
    2. Git
  3. Future features

A program that runs in the background to provide a different way to execute shortcuts. This program utilises key press sequences, following a master key bind, to execute different shell commands. This is meant for shortcuts and not key binds, such as volume up.

Usage

Create Configuration

Create the a config file, default location $XDG_CONFIG_HOME/shortcut-mapper/key-map or $HOME/.config/shortcut-mapper/key-map if $XDG_CONFIG_HOME is not set. An example config file is provided in /usr/share/shortcut-mapper/key-map, or checkout template/key-map. It is copied to the config file location of no file is found.

The file must contain a Master key binding. This key binding must be pressed before the program starts listening to key strings. Must be in a separate line. Key modifiers, like Ctrl , can be used. The list of currently supported key modifiers are as follows:

  • C: Ctrl
  • M: Alt
  • S: Super

The format for the Master key bind is as such: ((Mod-)^{*}^{}^{}Key). Where (Mod) is any modifier specified above and key is any single character key. An example would be C-S-k which is Control+Super+k which is the default in case it failed to recognise a master key bind.

Here you can also create key strings. The format of which is as such: ((key)^{+}^{}\ cmd) where (key) is any single character key and (cmd) is the command to be executed. The key string has to be at least one character long and the command is any shell command.

Conflicting key string will be reported in the system log. Only the first conflicting key string will be registered.

Installation

Arch Linux

Install shortcut-mapper-git from AUR

Git

  1. Clone this repo, git clone ... DIR
  2. cd into the directory
  3. Run cmake . -B BUILD-DIR
  4. Run cmake --build BUILD-DIR
  5. Run cmake --install BUILD-DIR with sudo privileges

Future features

  • Show a dialogue box when activated

    To show the current shortcut string

  • Support input masks for shortcut strings

    Masks like Ctrl or Alt .

  • Support using shift

  • Terminate when loading key map if the Master key bind is unavailable

  • Log to system log and to a file in /var/log

About

A program that creates "key string" binding to execute commands.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published