capylayer


Namecapylayer JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/figdavi/capylayer
SummaryCreate key layers to your keyboard
upload_time2025-01-02 13:31:44
maintainerNone
docs_urlNone
authorfigdavi
requires_python<4.0,>=3.12
licenseMIT
keywords keyboard keyboard-layout key-layers remapping-keys
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://documentation.help/AutoHotkey-en/KeyList.htm#keyboard) for it to work.

### Other platforms
On Linux and MacOS, for now, [keyboard](https://github.com/boppreh/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

- Python 3.12+ needed ([Download Page](https://www.python.org/downloads/))

- Install via pip:
```bash
pip install capylayer
```

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

2. Then run:
```bash
capylayer
```

## Future Improvements
- Add a TUI with [Textual](https://github.com/Textualize/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
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/figdavi/capylayer",
    "name": "capylayer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "keyboard, keyboard-layout, key-layers, remapping-keys",
    "author": "figdavi",
    "author_email": "figueiredodavi@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/21/02/0ff356327cdd4edb170bff36c2b33f855fa1375fcab280cf2f156fe55b0e/capylayer-0.1.4.tar.gz",
    "platform": null,
    "description": "# capylayer\nA simple python package to create **key layers** activated by modifier hotkeys.\n\nLayers are activated by defined hotkeys. You can build remappings for symbol layers, layouts like Dvorak, or any other customized layer.\n\n## Platform support\n### Windows\nOn windows, an AHK script is used to simulate key remapping. Use AHK [key name syntax](https://documentation.help/AutoHotkey-en/KeyList.htm#keyboard) for it to work.\n\n### Other platforms\nOn Linux and MacOS, for now, [keyboard](https://github.com/boppreh/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).\n\n## Modifier mode\nA modifier hotkey can be set to one of two modes:\n- **Switch**: Activate a layer by *holding*, similar to Shift.\n- **Lock**: Toggle a layer on/off by *pressing*, similar to CapsLock.\n\n## Example\n\n**Profile:** \"capy\"\n- **Key Layer:**\n    - **Modifier hotkey**: `CapsLock`  \n    - **Modifier mode**: Switch  \n    - **Key remaps**:\n        - `a` \u2192 `Delete`\n        - `s` \u2192 `F1`\n        - `d` \u2192 `Up`\n\nWhile `CapsLock` is **held**, the key layer is active:\n```\n                     _____  _____  _____ \n                    /\\ Del \\\\  F1 \\\\  \u2191  \\ \n                    \\ \\_____\\\\_____\\\\_____\\\n                     \\/_____//_____//_____/\n                      /      /      / \n                  ___/_  ___/_  ___/_   \n    __________   /\\  a  \\\\  s  \\\\  d  \\     \n   \\  CapsLock \\ \\ \\_____\\\\_____\\\\_____\\    \n    \\___________\\ \\/_____//_____//_____/  \n```\n\n## Installation\n\n- Python 3.12+ needed ([Download Page](https://www.python.org/downloads/))\n\n- Install via pip:\n```bash\npip install capylayer\n```\n\n## Usage\n1. Add profiles in capylayer/modules/data/profiles (TUI is not implemented currently)\n\n2. Then run:\n```bash\ncapylayer\n```\n\n## Future Improvements\n- Add a TUI with [Textual](https://github.com/Textualize/textual)\n- Design a way to check if key names exist as keys\n- Error logging\n- Key -> Hotkey remapping\n- Key -> Text remapping (useful for LaTeX)\n- Implement better key remapping for Linux and MacOS\n- Compile script dynamically\n- Create a pt-br README\n- Implement a dead key behaviour for accents\n- Add dist files to repo",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create key layers to your keyboard",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/figdavi/capylayer",
        "Repository": "https://github.com/figdavi/capylayer"
    },
    "split_keywords": [
        "keyboard",
        " keyboard-layout",
        " key-layers",
        " remapping-keys"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fee86a829a846b0152aa6a8090cd5773dc3e572a4190b38d6226448f42ea2dd0",
                "md5": "d4fb2f805e5f2f892394464d6fb22829",
                "sha256": "508c21555192c2b7b219b1ab62e5d1d2ffd9f8bb040fdd1cdecf12a9565184ea"
            },
            "downloads": -1,
            "filename": "capylayer-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d4fb2f805e5f2f892394464d6fb22829",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 1124196,
            "upload_time": "2025-01-02T13:31:38",
            "upload_time_iso_8601": "2025-01-02T13:31:38.398352Z",
            "url": "https://files.pythonhosted.org/packages/fe/e8/6a829a846b0152aa6a8090cd5773dc3e572a4190b38d6226448f42ea2dd0/capylayer-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "21020ff356327cdd4edb170bff36c2b33f855fa1375fcab280cf2f156fe55b0e",
                "md5": "470202756c0cbe17f5be65386b727fd5",
                "sha256": "c1849b3ff3d9bc06e8e5aea5ce4a12c4ce77b0e1ecd9955f42988c0a9093042f"
            },
            "downloads": -1,
            "filename": "capylayer-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "470202756c0cbe17f5be65386b727fd5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 1120241,
            "upload_time": "2025-01-02T13:31:44",
            "upload_time_iso_8601": "2025-01-02T13:31:44.086941Z",
            "url": "https://files.pythonhosted.org/packages/21/02/0ff356327cdd4edb170bff36c2b33f855fa1375fcab280cf2f156fe55b0e/capylayer-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-02 13:31:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "figdavi",
    "github_project": "capylayer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "capylayer"
}
        
Elapsed time: 0.52801s