Skip to content

cyyc889/Golden-Keycap

Repository files navigation

Golden Keycap

  • 热力图-饼图-柱状图,记录最勤快的键帽,把它换成黄金!
  • Heatmap - Pie chart - Bar chart, record the most hardworking keycaps and replace them with gold!

1. 项目结构

.
├── keyboard_count.py
├── keyboard_heatmap.py
├── keyboard_plot.py
├── main.py
└── requirements.txt

2. 环境依赖

安装:

pip install -r requirements.txt

3. 功能概述

3.1 按键记录(keyboard_count.py)

  • 捕获键盘输入、实时显示前 20 热度
  • Captures keyboard input and displays the top 20 most frequent keys in real-time
  • 自动累积历史数据
  • Automatically accumulates historical data
  • Ctrl + C 保存至 keyboard_freq.csv
  • Saves data to keyboard_freq.csv upon pressing Ctrl + C

3.2 键盘热力图(keyboard_heatmap.py)

  • 基于频率绘制 ANSI 键盘灰度热力图
  • Generates an ANSI keyboard grayscale heatmap based on key frequencies
  • 自动输出 keyboard_heatmap.png
  • Automatically outputs keyboard_heatmap.png

3.3 Top10 统计图(keyboard_plot.py)

  • 生成 Top10 按键饼图 + 柱状图
  • Generates Top 10 key charts: Pie chart + Bar chart
  • 生成 keyboard_plot.png
  • Outputs keyboard_plot.png

3.4 全流程调度(main.py)

  • 自动记录 → 保存 → 生成两类图像
  • Automatically records → Saves → Generates two types of images

4. 使用方法

python main.py
  • 窗口模式下按 Ctrl + C 停止并自动生成图像。
  • In windowed mode, press Ctrl + C to stop and automatically generate the images.
  • 编译器模式下 结束运行 停止并自动生成图像。
  • In compiler mode, end the run to stop and automatically generate the images.

5. 数据文件

keyboard_freq.csv

  • 键值、次数、百分比。
  • Contains key value, count, and percentage.

6. 扩展性

  • 支持 ANSI 键盘;其他键会记录但不在热力图展示,可按需扩展布局。
  • Supports ANSI keyboard layout; other keys are recorded but not shown on the heatmap. Layouts can be expanded as needed.

About

NULL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages