Giter VIP home page Giter VIP logo

myev's Introduction

Key Remapper

Key Remapper is a powerful and flexible tool for remapping keyboard keys on Linux systems with an emphasis on Wayland support. It allows you to customize your keyboard layout, create complex key mappings, and enhance your typing experience.

Features

  • Wayland support
  • Remap any key to another key
  • Configure different actions for tap and hold events
  • Easy-to-use TOML configuration file
  • Support for a wide range of keyboard keys
  • Minimal overhead and efficient performance

Prerequisites

Before you begin, ensure you have the following installed on your Linux system:

  • Rust programming language (latest stable version)
  • Cargo package manager
  • libudev development files (usually libudev-dev package)

Installation

  1. Clone the repository:

    git clone https://github.com/eboody/myev.git
    cd myev
    
  2. Build the project:

    cargo build --release
    
  3. The compiled binary will be available at target/release/key-remapper.

Configuration

Key Remapper uses a TOML configuration file to define key mappings. Create a file named key_remapper_config.toml in the same directory as the executable.

Here's an example configuration:

[[key_mappings]]
key = "KEY_CAPSLOCK"
on_tap = "KEY_ESC"
on_hold = "KEY_LEFTMETA"

[[key_mappings]]
key = "KEY_RIGHTALT"
on_tap = "KEY_RIGHTALT"
on_hold = "KEY_RIGHTCTRL"

In this example:

  • CapsLock is remapped to act as Escape when tapped and as the Left Meta key (usually Windows key) when held.
  • Right Alt is remapped to act as Right Alt when tapped and as Right Ctrl when held.

For a full list of available key names, refer to the evdev-key-names.md file in the repository.

Usage

  1. Ensure your configuration file (key_remapper_config.toml) is in the same directory as the Key Remapper executable.

  2. Run Key Remapper with root privileges:

    sudo ./myev
    
  3. The program will display a list of available input devices. Enter the number corresponding to the keyboard you want to remap.

  4. Key Remapper will start running and apply your configured mappings.

  5. To stop Key Remapper, use Ctrl+C.

Troubleshooting

  • If you encounter permission issues, make sure you're running the program with sudo.
  • If your key mappings aren't working as expected, double-check your key_remapper_config.toml file for any syntax errors.
  • Ensure that the key names in your configuration file match exactly with those listed in evdev-key-names.md.

Contributing

Contributions to Key Remapper are welcome! Please feel free to submit pull requests, create issues, or suggest new features.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • This project uses the evdev crate for handling input events.
  • Thanks to all contributors and users of Key Remapper.

Disclaimer

Be cautious when remapping keys, especially system keys. Always ensure you have a way to undo your changes or access your system if something goes wrong. The authors are not responsible for any issues arising from the use of this software.

myev's People

Contributors

eboody 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.