Skip to main content

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:
      • a → Delete
      • s → F1
      • d → Up

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

Metadata

Release files for capylayer 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capylayer 0.1.4
File Size Uploaded
capylayer-0.1.4.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for capylayer 0.1.4
File Interpreter ABI Platform
capylayer-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 2.2 MB

Release files / capylayer-0.1.4.tar.gz

Download URL capylayer-0.1.4.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c1849b3ff3d9bc06e8e5aea5ce4a12c4ce77b0e1ecd9955f42988c0a9093042f
BLAKE2b-256 checksum
How to use checksums
21020ff356327cdd4edb170bff36c2b33f855fa1375fcab280cf2f156fe55b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.5 Windows/10

Release files / capylayer-0.1.4-py3-none-any.whl

Download URL capylayer-0.1.4-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
508c21555192c2b7b219b1ab62e5d1d2ffd9f8bb040fdd1cdecf12a9565184ea
BLAKE2b-256 checksum
How to use checksums
fee86a829a846b0152aa6a8090cd5773dc3e572a4190b38d6226448f42ea2dd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.5 Windows/10

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page