Conversation
Co-authored-by: f97 <143237992+f97@users.noreply.github.com>
Co-authored-by: f97 <143237992+f97@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Button chọn loại trừ ứng dụng đổi thành 3 dấu chấm, thêm tính năng trong loại trừ app bằng cách kéo thả con trỏ vào vị trí app sẽ tự động chọn app name.
Add app exclusion UI with drag-and-drop functionality to macOS OpenKey
Sep 7, 2025
Owner
|
@copilot update cho cả win |
…e dots button Co-authored-by: f97 <143237992+f97@users.noreply.github.com>
Author
I've implemented the same app exclusion functionality for Windows! The changes include: ✅ Three dots button ("...") - Changed from icon to text on both main dialog and exclusion dialog The Windows implementation provides the same user experience as macOS using platform-specific APIs. Commit: 9e68f0c |
Copilot
AI
changed the title
Add app exclusion UI with drag-and-drop functionality to macOS OpenKey
Add app exclusion UI with drag-and-drop functionality to macOS and Windows OpenKey
Sep 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the requested app exclusion feature for both macOS and Windows versions of OpenKey, adding a user-friendly interface that allows users to exclude specific applications from Vietnamese input processing.
Key Changes
1. Three Dots Button Implementation
Changed the app exclusion selection button from text/icon to "..." (three dots) as specifically requested. The button is prominently displayed in both platforms:
2. Drag-and-Drop App Selection
Implemented innovative cursor-based app selection functionality for both platforms:
macOS Implementation:
CGWindowListCopyWindowInfoAPI for accurate app identification at cursor positionWindows Implementation:
SetCursor(LoadCursor(NULL, IDC_CROSS))SetWindowsHookEx(WH_MOUSE_LL)for mouse trackingWindowFromPoint,GetWindowThreadProcessId, andGetModuleBaseNameAPIs for app detection3. Complete UI Integration
macOS: Added a new "Loại trừ ứng dụng" (App Exclusion) section to the System tab featuring:
Windows: Enhanced exclusion dialog with:
4. Backend Integration
Connected the new UI to the existing SmartSwitchKey exclusion engine on both platforms:
Technical Implementation
macOS Components:
isAppExcluded(),addAppToExclusionList(), andremoveAppFromExclusionList()functionsWindows Components:
SetWindowsHookExfor global mouse trackingUser Experience
macOS Users can now:
Windows Users can now:
This implementation fully addresses the Vietnamese requirement: "Button chọn loại trừ ứng dụng đổi thành 3 dấu chấm, thêm tính năng trong loại trừ app bằng cách kéo thả con trỏ vào vị trí app sẽ tự động chọn app name" by providing both the three dots button and the drag-and-drop cursor functionality for automatic app name selection across both macOS and Windows platforms.
Files Modified
macOS:
Sources/OpenKey/macOS/ModernKey/Base.lproj/Main.storyboard- Added exclusion UI elementsSources/OpenKey/macOS/ModernKey/ViewController.h/.m- Implemented app exclusion functionalitySources/OpenKey/macOS/ModernKey/SmartSwitchKeyWrapper.mm- Created C++ integration wrapperSources/OpenKey/macOS/ModernKey/vi-VN.lproj/Main.strings- Added Vietnamese localizationWindows:
Sources/OpenKey/win32/OpenKey/OpenKey/ExclusionDialog.h/.cpp- Implemented drag-drop functionalitySources/OpenKey/win32/OpenKey/OpenKey/OpenKey.rc- Enhanced UI with new button and layoutSources/OpenKey/win32/OpenKey/OpenKey/resource.h- Added new button constantsShared:
.gitignore- Added build artifact exclusions💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.