Feedback
Windows expose KeyDown and KeyUp events
- Status
- Fixed
- Fixed in
- v26.9.3
- Area
- desktop
- Last updated
- 2026-09-20
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Desktop windows currently offer no keyboard events of their own. Developers who want window-wide keyboard handling — global shortcuts, arrow-key navigation, keyboard-driven tools — have to place a Canvas sized to fill the window (and manage its focus) or poll Keyboard.IsKeyDown from a Timer, neither of which can consume keys.
Add KeyDown and KeyUp events to Window. They fire for keys that no focused control has handled, receive the key name, and can return True to consume the key so it receives no further processing. This matches the behaviour Xojo refugees expect from DesktopWindow and retires the full-window-Canvas workaround.