Skip to content

figdavi/Layermp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Layermp

A simple Python tool that uses the keyboard library to create key layers.

Features

  • Customizable profiles: Easily create, delete, modify and transition between profiles.
  • Configurable modifier hotkeys: Define modifier hotkeys to activate key layers based on modes
  • Layer-based key remapping: Map keys dynamically to different actions using key layers.

Profile

  • Name
  • A set of Key Layers

Key Layer

  • A modifier hotkey
  • The modifier mode:
    • Switch: Temporarily activate a layer by holding the activate hotkey, similar to Shift.
    • Lock: Toggle a layer on/off by pressing the activate hotkey, similar to CapsLock.
  • A set of Key Remaps

Key Remap

  • A source key (the key being remapped).
  • A destination key (the key it becomes when the key layer is active).

Example:

  • Let a profile named "Meaningless" contain 1 key layer:
  • Key Layer:
    • Modifier hotkey: CapsLock
    • Modifier mode: Switch
    • Key remaps:
      • a -> Delete
      • s -> F1
      • d -> up (up arrow)

While CapsLock is held, the key layer is active (Switch mode):

                     _____  _____  _____ 
                    /\ Del \\  F1 \\  ↑  \ 
                    \ \_____\\_____\\_____\
                     \/_____//_____//_____/
                      /      /      / 
                  ___/_  ___/_  ___/_   
    __________   /\  a  \\  s  \\  d  \     
   \  CapsLock \ \ \_____\\_____\\_____\    
    \___________\ \/_____//_____//_____/  

Usage

Requirements

Note: Currently, Layermp can only be used if you manually modify the json files in the config folder.

Steps

  1. Clone or download the repository:
git clone https://github.com/figdavi/Layermp.git
cd layermp
  1. Run the program:
python main.py

Future Improvements

  • Add a CLI with Typer + Rich
  • Design a way to check if key names exist as keys (keyboard library doesn't have a support to this by default)
  • Error logging
  • Keylogger with heatmap
  • Implement better printing format for profile and commands classes
  • Create a pt-br README

Related Articles

For an in-depth understanding of key layers, refer to:

Releases

No releases published

Packages

No packages published

Languages