Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6841c00
重构界面UI
IvanHanloth Apr 20, 2025
76ae0c3
增加窗口冻结工具
IvanHanloth Apr 20, 2025
712cacf
优化窗口冻结工具
IvanHanloth Apr 20, 2025
df982e7
修复可能冻结当前进程的问题
IvanHanloth Apr 20, 2025
901aee0
Merge pull request #86 from IvanHanloth/FreezeProcess
IvanHanloth Apr 20, 2025
30d565e
新增logo
IvanHanloth Apr 20, 2025
1500683
更新gitignore
IvanHanloth Apr 20, 2025
71b9100
支持鼠标隐藏
IvanHanloth Apr 20, 2025
51e19bc
新增自动隐藏
IvanHanloth Apr 20, 2025
2f51357
修复窗口恢复工具
IvanHanloth Apr 20, 2025
41912fe
优化程序关闭清理函数
IvanHanloth Apr 20, 2025
4a87781
优化ui
IvanHanloth Apr 20, 2025
9013f5d
新增自动隐藏相关提示
IvanHanloth Apr 20, 2025
894430f
Merge pull request #90 from IvanHanloth/SupportMouse
IvanHanloth Apr 20, 2025
a832a79
新增鼠标移动至四角隐藏
IvanHanloth Apr 21, 2025
5ee3dd4
更新部分ui
IvanHanloth Apr 21, 2025
1cb9403
Merge pull request #91 from IvanHanloth/MoveHideSupport
IvanHanloth Apr 21, 2025
659ca77
优化UI
IvanHanloth Apr 21, 2025
b8fa219
使用_stop
IvanHanloth Apr 21, 2025
1ffbfbd
Merge pull request #93 from IvanHanloth/addWindowMenu
IvanHanloth Apr 21, 2025
89e935c
更新v2.1.0.0版本
IvanHanloth Apr 21, 2025
9583083
Merge branch 'dev' into update2.1.0
IvanHanloth Apr 21, 2025
19848c2
Merge pull request #95 from IvanHanloth/update2.1.0
IvanHanloth Apr 21, 2025
31c419b
Merge pull request #96 from IvanHanloth/main
IvanHanloth Apr 21, 2025
df1f187
修复非首次启动弹出提示问题
IvanHanloth Apr 21, 2025
fa886c7
Merge pull request #98 from IvanHanloth/patch
IvanHanloth Apr 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ config.json
user.ini
*.lock
out/
test.py
test.py
pssuspend64.exe
.bosskey_state
44 changes: 37 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Boss-Key

![](/src/static/bannar.jpg)
![Boss-Key logo bannar](/src/static/bannar.jpg)
Copy link

Copilot AI Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The word 'bannar' appears to be a misspelling. Consider changing it to 'banner'.

Suggested change
![Boss-Key logo bannar](/src/static/bannar.jpg)
![Boss-Key logo banner](/src/static/banner.jpg)

Copilot uses AI. Check for mistakes.

![Github Release Version](https://img.shields.io/github/v/release/IvanHanloth/Boss-Key)
![Github Repo License](https://img.shields.io/github/license/IvanHanloth/Boss-Key)
Expand All @@ -13,13 +13,13 @@
支持多窗口隐藏、多进程隐藏、自定义热键、隐藏活动窗口、静音窗口、暂停视频播放等超多功能,完全免费、开源,无强制弹窗等

## 应用截图
![](/src/static/screenshot-1.png)
![Boss-Key设置窗口绑定页](/src/static/screenshot-1.png)

![](/src/static/screenshot-2.png)
![Boss-Key设置热键设置页](/src/static/screenshot-5.png)

![](/src/static/screenshot-3.png)
![Boss-Key设置窗口其他选项页](/src/static/screenshot-3.png)

![](/src/static/screenshot-4.png)
![Boss-Key运行提示](/src/static/screenshot-4.png)

## 使用说明
从v2.0.0版本开始,每个版本都会提供三种类型的程序,可以从[Release页面](https://github.com/IvanHanloth/Boss-Key/releases)下载
Expand Down Expand Up @@ -61,6 +61,11 @@

完成所有热键修改后,**记得点击下方的“保存设置”按钮保存并启用设置**

### 鼠标隐藏
v2.1.0版本加入了鼠标相关操作隐藏绑定,可以选择鼠标中键、侧键1、侧键2切换串口隐藏状态。

可以勾选快速移动鼠标至四角隐藏窗口(启用允许移动恢复功能以允许通过快速移动鼠标至四角恢复窗口)

### 检查更新

右键点击托盘打开托盘菜单,选择“检查更新”即可打开当前检查更新窗口。
Expand All @@ -78,6 +83,7 @@

#### 文件路径匹配功能
Boss Key默认使用窗口标题等多因素进行窗口匹配以确保精确隐藏窗口,但是有时可能出现希望根据可执行文件路径来进行匹配:

即只要是由同一个程序启动的窗口都隐藏,此时就可以启用“文件路径匹配”选项进行模糊匹配

#### 同时隐藏当前活动窗口
Expand All @@ -87,7 +93,15 @@ Boss Key默认使用窗口标题等多因素进行窗口匹配以确保精确隐
启用该功能后,可以通过单击托盘图标来显示或隐藏窗口

### 设置和关闭开机自启
如果需要让Boss-Key程序开机自启,可以右键点击托盘图标,在弹出的菜单中选择“开机自启”来切换开机自启状态
如果需要让Boss-Key程序开机自启,可以右键点击托盘图标,在弹出的菜单中选择“开机自启”来切换开机自启状态,或从窗口菜单->工具->开机自启选项进行切换。

### 进程冻结相关功能
自v2.1.0版本开始,Boss-Key加入了隐藏窗口后冻结进程功能。启用此功能将在隐藏窗口后将对应的进程“冻结”,减轻CPU和内存压力。
启用此功能需要**以管理员身份运行**。冻结加强功能则额外需要下载pssuspend64.exe文件置于程序目录下以供调用。

**如何下载和使用加强冻结功能:**

您需要手动访问[https://download.sysinternals.com/files/PSTools.zip](https://download.sysinternals.com/files/PSTools.zip)页面,下载由Microsoft提供的PSTools工具包。解压下载得到`PSTools.zip`文件,可以找到`pssuspend64.exe`文件,直接复制该文件,放置于Boss-Key程序的安装根目录即可。

## 常见问题
**为什么我的电脑运行不了编译后的程序**
Expand Down Expand Up @@ -124,7 +138,12 @@ Boss-Key
│   │   ├── __init__.py 初始化包
│   │   ├── about.py 关于页面
│   │   ├── record.py 录制热键页面
│   │   ├── setting.py 设置页面
│   │   ├── setting 设置页面相关子类
│   │   │  ├── __init__.py 初始化包
│   │   │  ├── base.py 设置页面基础类
│   │   │  ├── binding_page.py 窗口绑定页面
│   │   │  ├── hotkeys_page.py 热键绑定页面
│   │   │  └── options_page.py 其他选项页面
│   │   ├── taskbar.py 托盘图标
│   │   └── window_restore.py 窗口恢复工具页面
│   └── Boss-Key.py 项目入口文件
Expand Down Expand Up @@ -158,7 +177,18 @@ Boss-Key
## 已知问题
- 无法隐藏部分游戏窗口,可能由于游戏窗口加密导致

## 鸣谢
感谢雪藏HsFreezer提供的进程冻结实现思路

## 更新日志
**V2.1.0 (更新于2025/4/21)**
- 新增鼠标中键、侧键隐藏功能
- 新增鼠标移动至四角隐藏功能
- 新增进程冻结功能
- 新增自动隐藏功能
- 优化界面UI设计
- 优化窗口恢复工具

**V2.0.4 (更新于2025/4/9)**
- 修复无法正确禁音应用的问题
- 优化选项提示
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions main/Boss-Key.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from core.config import Config
import platform
import atexit
from GUI.setting.base import SettingWindow

if platform.system() == "Windows":
if platform.release() == "7":
Expand All @@ -30,10 +31,19 @@ class APP(wx.App):
def __init__(self):
wx.App.__init__(self)
def clean():
print("Global Cleaning up...")
try:
Config.HotkeyListener._cleanup()
except:
pass
try:
Config.HotkeyListener.Close()
except:
pass
try:
os.remove(os.path.join(Config.root_path,"Boss-Key.lock"))
except:
pass
atexit.register(clean)

# 设置语言环境为中文
Expand All @@ -43,7 +53,7 @@ def clean():
self.SetAppDisplayName(Config.AppName)
self.SetVendorName(Config.AppAuthor)

lock=os.path.join(os.path.dirname(sys.argv[0]),"Boss-Key.lock")
lock=os.path.join(Config.root_path,"Boss-Key.lock")
if self.is_already_running(lock):
ask=wx.MessageBox("Boss Key 可能已在运行\n点击“确定”继续运行新的Boss-Key程序\n点击“取消”直接关闭此窗口","Boss Key", wx.OK | wx.ICON_INFORMATION | wx.CANCEL | wx.CANCEL_DEFAULT)
if ask==wx.OK:
Expand Down Expand Up @@ -90,7 +100,7 @@ def is_already_running(self, name):
Config.SettingWindowId = wx.NewIdRef()
Config.TaskBarIcon=taskbar.TaskBarIcon()
Config.HotkeyListener=listener.HotkeyListener()
setting.SettingWindow(Config.SettingWindowId)
SettingWindow(Config.SettingWindowId)
if Config.first_start:
wx.FindWindowById(Config.SettingWindowId).Show()
app.MainLoop()
Loading
Loading