A Floating Virtual Keyboard for macOS — Types Into Any Application, With a Premium Glass/HUD Interface
PinchType is a floating, always-on-top virtual keyboard for macOS. It types into any application via the Accessibility API (CGEvent posting) — with a premium glass/HUD interface, five keyboard layouts, autocomplete, an emoji picker, and a suite of productivity conveniences. Built natively in Swift with AppKit.
- Types into any app — CGEvent-based keystroke posting via Accessibility API
- 5 keyboard layouts — QWERTY, AZERTY, QWERTZ, Dvorak, Colemak
- Hold-to-repeat — backspace, space, and arrow keys
- Long-press accents — accent character popup for international typing
- Autocomplete suggestions — dictionary-based completions (
SuggestionEngine.swift) - Emoji picker — search, categories, and recent emojis
- Edge snapping — auto-snaps to screen edges within 20pt
- Resizable — drag the bottom-right handle
- Dark & Light mode — adaptive theming
- Opacity & scale controls — tune the keyboard to your workspace
- Position persistence — window position restored across restarts
- Menu bar icon — quick access and toggling
- Key click sounds — configurable volume
flowchart LR
A[Key Press] --> B[KeyboardEngine]
B --> C{Which key?}
C -->|Character| D[KeyCodeMap]
D --> E[CGEvent Post]
C -->|Layout switch| F[LayoutManager]
C -->|Accent| G[Long-Press Popup]
B --> H[SuggestionEngine]
H --> I[Autocomplete Bar]
B --> J[Emoji Picker]
E --> K[Any macOS App]
PinchType/
├── PinchType/ # Main app target
│ ├── KeyboardEngine.swift # Keystroke orchestration
│ ├── KeyboardKey.swift # Key model & behaviors
│ ├── KeyCodeMap.swift # Layout → keycode mapping
│ ├── LayoutManager.swift # 5 layout management
│ └── SuggestionEngine.swift # Autocomplete engine
├── PinchType.xcodeproj # Xcode 26 project
└── PinchTypeTests/ # XCTest unit tests
Deep-dive design notes live in ARCHITECTURE.md.
| Layer | Technology |
|---|---|
| Language | Swift |
| UI Framework | AppKit (native) |
| Typing | Accessibility API (CGEvent posting) |
| Project | Xcode 26 · macOS 26.5+ |
| Testing | XCTest (PinchTypeTests) |
- macOS 26.5 or later
- Xcode 26+
- Accessibility permission — required for typing into other apps
# 1. Clone
git clone https://github.com/Manthan-13521/PinchType-Virtual-Keyboard.git
cd PinchType-Virtual-Keyboard/PinchType
# 2. Open in Xcode
open PinchType.xcodeproj
# 3. Select the PinchType scheme, then Build & Run- Grant Accessibility permission in System Settings → Privacy & Security
- The floating keyboard appears — click any key to type into the active app
- Snap it to an edge, resize it, or switch layouts from the menu bar icon
- Gesture / trackpad-drawing input mode
- Custom layout editor
- Cloud syncing of settings (iCloud)
- Siri Shortcuts integration
- iPad support
Contributions welcome — especially new layouts, dictionary sources, and accessibility improvements.
Proprietary. All rights reserved.
© 2026 Manthan Jaiswal — Built with Swift & AppKit.