Skip to main content

控制台设置/集。可更改控制台设置,或获取控制台输入流

Reason this release was yanked:

Readme 与 Classifiers 的描述有部分错误,且字典中 "control" 中的 "lctrl" 错误的与按键 right ctrl 关联。

Project description

Console Input/Output

控制台设置/集。可更改控制台设置,或获取控制台输入流

系统要求

支持的平台

  • 操作系统: Windows 10/11 (64位)
  • 架构: x64/AMD64
  • Python: 3.14+

不支持的平台

  • 32位 Windows 系统
  • Linux 或 macOS
  • ARM 架构 Windows
  • Python 2.x

安装

PyPI安装(推荐)

pip install conset

快速开始

基础使用

import conset

# 获取输入
conin = conset.conin()

if conin:
    # 鼠标
    print("鼠标位置: y = ", conin[-1]["mouse"]["pos"]["y"], ", x = ", conin[-1]["mouse"]["pos"]["y"])

    # 键盘
    if conin[-1]["keyboard"]["keydown"]:
        print("按键: ", conin[-1]["keyboard"]["keyname"])

API 参考

conin()

conin()会返回一个列表,长度为控制台接收到的操作数量。 列表内的每个元素都是一个固定结构的字典,具体结构如下

{
    "mouse": {
        "pos": {
            "y": 0, # int
            "x": 0 # int
        },
        "button": None, # None, "left", "right"
        "flag": None # None, "move", "double", "wheel", "hwheel"
    },
    "keyboard": {
        "keydown": False, # False, True
        "keyname": None,  # None, str([keyname])
    },
    "control": {
        "ralt": False,  # False, True
        "lalt": False,  # False, True
        "rctrl": False, # False, True
        "lctrl": False, # False, True
        "shift": False, # False, True
        "numlock": False,    # False, True
        "scrolllock": False, # False, True
        "capslock": False,    # False, True
        "enhanced_key": False # False, True
    }
}

许可证

这是专有软件。请查看 LICENSE 文件了解详细条款。
重要: 使用本软件即表示您同意遵守许可证条款。

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

conset-0.0.1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

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

conset-0.0.1-py3-none-win_amd64.whl (20.5 kB view details)

Uploaded Python 3Windows x86-64

File details

Details for the file conset-0.0.1.tar.gz.

File metadata

  • Download URL: conset-0.0.1.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for conset-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8c813b0b5c245357450ade001f50140cfa74097c8d9190a2bacfc6585e0d9aaa
MD5 79585f945601551d91f059af4d9bd65f
BLAKE2b-256 02b02a74759c957f9de5d51b1a8f99e1465ed9eefe76b5d2dbad90a2c99a6527

See more details on using hashes here.

File details

Details for the file conset-0.0.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: conset-0.0.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for conset-0.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6066ad300667135223868f7f63b030d3130920dfb1615d13555d7632f8f229d8
MD5 aa5342efdbcf0f18c27dcda14a0478a3
BLAKE2b-256 0d1e7badb8d3c61224c21450eb213774183ebd8c076664abdb086597fff7abb3

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