A powerful midkey tool for translate and dictionary
  • C++ 49.7%
  • QML 28.8%
  • Python 7.7%
  • Objective-C++ 7.6%
  • CMake 6.2%
Find a file
2026-02-18 15:40:45 +08:00
.github/workflows ci : 暂时禁用 2026-02-12 20:55:29 +08:00
design ui : small combobox 显示效果优化 2026-02-18 15:40:45 +08:00
scripts init project midkeyTool 2026-01-10 21:32:50 +08:00
src feat : add Constant singleton for shared constants 2026-01-14 20:24:58 +08:00
test feat : system mouse midkey invoke popup finish 2026-01-13 15:21:11 +08:00
.gitignore fix : remove trace to qt design generated files 2026-01-20 14:41:11 +08:00
.gitmodules init project midkeyTool 2026-01-10 21:32:50 +08:00
AGENTS.md feat : system mouse midkey invoke popup finish 2026-01-13 15:21:11 +08:00
CMakeLists.txt qt-cpp template finish 2026-01-11 00:31:19 +08:00
CMakePresets.json qt-cpp template finish 2026-01-11 00:31:19 +08:00
README.md feat : system invoke 2026-01-12 16:58:54 +08:00
vcpkg.json feat : add Constant singleton for shared constants 2026-01-14 20:24:58 +08:00

midkeyTool

一个基于鼠标中键触发的效率增强工具

作者: pernalin

快速开始

# 1. 克隆项目(含子模块)
git clone --recurse-submodules <your-repo-url> && cd midkeyTool
# 如果已克隆但未初始化子模块: git submodule update --init --recursive

# 2. 设置 vcpkg(如已安装可跳过)
git clone https://github.com/microsoft/vcpkg.git && cd vcpkg
./bootstrap-vcpkg.sh    # Linux/macOS
# .\bootstrap-vcpkg.bat  # Windows PowerShell
# 设置环境变量: VCPKG_ROOT=/path/to/vcpkg, 加入 PATH

# 3. 构建 + 安装
cmake --build --preset=msvc-debug                              # Windows
cmake --install build/msvc-debug --config Debug
# cmake --build --preset=clang-debug && cmake --install build/clang-debug  # macOS

# 4. 运行
./install/bin/core_app                           # 主程序
./install/bin/core_tests                         # 全部测试
./install/bin/core_tests --gtest_filter=*.*     # 指定测试

项目结构

midkeyTool/
├── src/
│   ├── core/              # 核心库
│   ├── main.cpp                   # 主程序入口
│   └── CMakeLists.txt
├── test/
│   ├── src/example_tests.cpp      # Google Test 测试示例
│   └── lib/googletest/            # 测试框架子模块
├── CMakePresets.json              # 构建预设: msvc-debug/release, clang-debug/release
├── vcpkg.json                     # 依赖配置
└── scripts/
    ├── init.py                    # 项目初始化脚本
    └── AutoInstallDeps.cmake      # 自动依赖安装

开发指南

操作 方法
添加依赖 vcpkg.json 添加包名 → src/core/CMakeLists.txt 添加 find_package + target_link_libraries
添加测试 在 test/src/ 创建 *_tests.cpp,参考 example_tests.cpp,更新 test/CMakeLists.txt SOURCE_FILES

技术栈

  • C++ 标准: C++17
  • 构建系统: CMake 3.24+
  • 包管理器: vcpkg
  • 测试框架: Google Test
  • GUI 框架: Qt 6.10.1

常见问题

  • 找不到 vcpkg 工具链: 确保设置 VCPKG_ROOT 环境变量并加入 PATH
  • Google Test 子模块为空: 运行 git submodule update --init --recursive

MIT License