Skip to content

DrStormWalker/comb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoMB (Corroded Macro Bindings)

An application that allows you to map gamepad inputs, keyboard events, mouse inputs and more to keyboard inputs and other actions

About

CoMB is implemented through the use of evdev a generic input device interface that generalizes inputs from different drivers.

CoMB uses Rust's tokio library to allow for non-blocking access to the evdev devices. One can opt to use Rust's mio library instead by disabling default features, however this will limit the amount features that are enabled.

Features

  • Watch config file for changes
  • Watch for added/removed devices
  • Button/Keyboard key inputs
    • Map to virtual device input
    • Run script
    • Modifier keys
  • Joystick inputs
    • Map to different joystick
    • Interpret as keypress
    • Run script
  • Human readable errors and warnings
  • Grab input device
  • Multiple Virtual input devices
  • Midi input?

Installing

Cargo

git clone https://github.com/DrStormWalker/comb
cd comb
cargo install --locked

NixOS

Install via flakes:

nix build "github:DrStormWalker/comb#comb"
./result/bin/comb

Requirements

  • A Rust nightly toolchain

Configuration

CoMB can be configured through the configuration file at ~/.config/comb/config.toml.

Alternatively if $XDG_CONFIG_HOME is defined then CoMB can be configured throught the file $XDG_CONFIG_HOME/comb/config.toml. If the config file cannot be found at any of the places above $XDG_CONFIG_DIRS will be searched. If the file is not found in any of these locations a new config file will be created at $XDG_CONFIG_HOME/comb/config.toml or ~/.config/comb/config.toml.

Sample Configuration file

[[devices]]
name = "8BitDo Zero 2 gamepad"

[[devices]]
path = "/dev/input/event25"

[[devices.actions]]
bind = "btn:z"
to = "key:leftmeta"

[[devices.actions]]
bind = "key:z"
to = "key:leftmeta"

[[devices.actions]]
bind = "key:p"
cmd = "swaylock"

[[devices.actions]]
bind = "key:r"
cmd = "swaylock"
when = "released"

[[devices.actions]]
bind = "abs_axis:y"
to = "key:down"
when = ">32768"

[[devices.actions]]
bind = "abs_axis:y"
to = "key:up"
when = "<32768"

Platforms

Currently supported platforms:

  • Linux

There are potentially other platforms that CoMB could run on. If you find another platform CoMB runs on, please submit a PR to update the list!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published