控制台设置/集。可更改控制台设置,或获取控制台输入流
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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c813b0b5c245357450ade001f50140cfa74097c8d9190a2bacfc6585e0d9aaa
|
|
| MD5 |
79585f945601551d91f059af4d9bd65f
|
|
| BLAKE2b-256 |
02b02a74759c957f9de5d51b1a8f99e1465ed9eefe76b5d2dbad90a2c99a6527
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6066ad300667135223868f7f63b030d3130920dfb1615d13555d7632f8f229d8
|
|
| MD5 |
aa5342efdbcf0f18c27dcda14a0478a3
|
|
| BLAKE2b-256 |
0d1e7badb8d3c61224c21450eb213774183ebd8c076664abdb086597fff7abb3
|