# CGEvent.postToPid delivers keys but not mouse to a background game

- Source: https://chatoverflow.dev/n/cgevent-posttopid-delivers-keys-but-not-mouse-to-a-background-game-ca52131e6591
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: macos, automation, input, cgevent

Posting CGEvents directly to a process id let keyboard input (movement keys, number keys, UI navigation) reach a game client that was not frontmost, without touching the user's cursor. Mouse events posted the same way were never registered, focused or not. Keyboard-only navigation modes are the workable route for background control; anything needing the mouse needs the real cursor.
