Author: Eric Taylor [email protected]
State: Final
Type: Project
Created: 04-Dec-2025
Post-History:
Tcl-Version: 9.1
Tk-Branch: tip-742
Keywords: Tk, console, zoom, mousewheel, accessibility
Vote: Done
Vote-Summary: Accepted 8/0/0
Votes-For: AK, AN, HO, JN, KW, MC, RM, SL
Votes-Against: none
Votes-Present: none
Abstract
This TIP proposes adding Control/Command+MouseWheel bindings to the Tk console to allow users to increase and decrease font size using the mouse wheel in combination with the Control/Command key
Rationale
Many applications (web browsers, text editors, IDEs) support Control/Command+MouseWheel for zooming in and out of content. The Tk console already supports font size adjustment via keyboard shortcuts (Ctrl++ and Ctrl+-) and menu items, but lacks the widely-expected mouse wheel zoom functionality.
Adding this feature would:
- Improve user experience by matching common UI conventions
- Enhance accessibility for users who prefer mouse-based interactions
- Provide a more intuitive way to adjust font size during interactive sessions
Specification
The console font size is increased or decreased when both of the following conditions are met:
- the mouse wheel is moved or the scroll gesture is done on the touchpad (two fingers up/down movement);
- the control-key (Windows/Linux) or Command key (MacOS) is down.
This functionality is available on all platforms with a console window. Currently, this is Windows and MacOS.
Reference Implementation
The implementation is in Tk branch tip-742.
Discussion
Harald Oehlmann (TIP sponsor): The first version of this TIP contained the code changes. This is now forwarded to the implementation branch. Special considerations, like the %D granularity are seen as implementation dependent and were removed from here. This does not mean that this was not valuable information. I only fear, that the TIP might be outdated with time, if there is to much implementation contained.
Backwards Compatibility
This change is fully backward compatible. It adds new functionality without modifying existing behavior or APIs.
Copyright
This document has been placed in the public domain.
