TIP 742: Add Mouse Wheel Zoom Support to Tk Console

Login
    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:

Specification

The console font size is increased or decreased when both of the following conditions are met:

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.

This document has been placed in the public domain.