Skip to main content

A library for converting keys in keyboard layouts

Project description

miskey

miskey is a lightweight Python library for converting text typed with the wrong keyboard layout.

Supported directions:

  • en-ru - from English layout to Russian
  • ru-en - from Russian layout to English

Installation

From PyPI

pip install miskey

Quick Start

from miskey import miskey

print(miskey("ghbdtn", "en-ru"))   # привет
print(miskey("Vjcrdf", "en-ru"))   # Москва
print(miskey("руддщ", "ru-en"))   # hello

Characters that are not present in the mapping are kept as-is:

from miskey import miskey

print(miskey("ghbdtn! vbh 123", "en-ru"))  # привет! мир 123

API

miskey(text: str, language: str) -> str

  • text - input string
  • language - conversion direction (for example, en-ru)

Raises:

  • TypeError if text or language is not a string
  • ValueError if language is empty or unsupported

Requirements

  • Python >=3.13

License

MIT

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

miskey-0.1.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

miskey-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file miskey-0.1.0.tar.gz.

File metadata

  • Download URL: miskey-0.1.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for miskey-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83f35c2e604f230e471baf06cf85bebe5730e1129f17ed966520652d329ef0f3
MD5 cfd52892a7fb51710559c9c5c5dc6581
BLAKE2b-256 60a964fb3f6e105efee9369659047aae06936e2cd54f9605cd3f35ab14b01b98

See more details on using hashes here.

File details

Details for the file miskey-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: miskey-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for miskey-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96829fc537eff08d13b056b8748d10002894a384c39b03619a65e96d477599d0
MD5 05fae4edbe273775b567d58914d4d5da
BLAKE2b-256 52186d8278fba19aa7be79778a652feb143c5450fcc8d0c52df435bf6eb349af

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