Skip to main content

Create key layers to your keyboard

Project description

capylayer

A simple python package to create key layers activated by modifier hotkeys.

Layers are activated by defined hotkeys. You can build remappings for symbol layers, layouts like Dvorak, or any other customized layer.

Platform support

Windows

On windows, an AHK script is used to simulate key remapping. Use AHK key name syntax for it to work.

Other platforms

On Linux and MacOS, for now, keyboard library is used to simulate the key remapping action, unfortunately it does not work as intended/fully for a range of keys. For example, modifier keys like Alt when remapped by other keys will not fully work (E.g. Alt + F4 won't work).

Modifier mode

A modifier hotkey can be set to one of two modes:

  • Switch: Activate a layer by holding, similar to Shift.
  • Lock: Toggle a layer on/off by pressing, similar to CapsLock.

Example

Profile: "capy"

  • Key Layer:
    • Modifier hotkey: CapsLock
    • Modifier mode: Switch
    • Key remaps:
      • aDelete
      • sF1
      • dUp

While CapsLock is held, the key layer is active:

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

Installation

pip install capylayer

Usage

  1. Add profiles in capylayer/modules/data/profiles (TUI is not implemented currently)

  2. Then run:

capylayer

Future Improvements

  • Add a TUI with Textual
  • Design a way to check if key names exist as keys
  • Error logging
  • Key -> Hotkey remapping
  • Key -> Text remapping (useful for LaTeX)
  • Implement better key remapping for Linux and MacOS
  • Compile script dynamically
  • Create a pt-br README
  • Implement a dead key behaviour for accents
  • Add dist files to repo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

capylayer-0.1.4.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

capylayer-0.1.4-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file capylayer-0.1.4.tar.gz.

File metadata

  • Download URL: capylayer-0.1.4.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.5 Windows/10

File hashes

Hashes for capylayer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c1849b3ff3d9bc06e8e5aea5ce4a12c4ce77b0e1ecd9955f42988c0a9093042f
MD5 470202756c0cbe17f5be65386b727fd5
BLAKE2b-256 21020ff356327cdd4edb170bff36c2b33f855fa1375fcab280cf2f156fe55b0e

See more details on using hashes here.

File details

Details for the file capylayer-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: capylayer-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.5 Windows/10

File hashes

Hashes for capylayer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 508c21555192c2b7b219b1ab62e5d1d2ffd9f8bb040fdd1cdecf12a9565184ea
MD5 d4fb2f805e5f2f892394464d6fb22829
BLAKE2b-256 fee86a829a846b0152aa6a8090cd5773dc3e572a4190b38d6226448f42ea2dd0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page