Giter Club home page Giter Club logo

global-keybind's Introduction

global keybind

This can be useful when running a wayland compositor, as it allows you to send applications input without focusing them (or an xwayland window). For example, you can use this to pass a push-to-talk keybind to a voice chat application.

usage

cli

Determine the event device for the input device you want to use. This can be done by running evtest and looking for the device with the name of the input device you want to use. Alternatively, you can use cat /proc/bus/input/devices and look for the device with the name of the input device you want to use.

You will also need to determine the event code for the key you want to use. This can be done by running evtest, selecting the device, then pressing the key you want to use. The resulting code's value can be found from the linux input-event-codes.h.

Here is an example invocation of the program that will press F12 when the mouse side button is pressed: global-keybind-cli --device /dev/input/event0 --key-to-press 275 --key-to-send F12

home-manager

A home-manager module is provided under the flake output homeModules.global-keybind. This can be used to start a systemd user service that will run the program. Here is an example configuration that will press F12 when the mouse side button is pressed:

global-keybind = {
  enable = true;
  device = "/dev/input/event5";
  display = ":1";
  key_to_press = 275;
  key_to_send = "F12";
};

global-keybind's People

Contributors

justinrubek avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.