Is there way to change font size in putty using the wheel in mouse or contrl +/- key?

3

2

I love using Putty as a ssh terminal in Window. But what I don't like about it is that it doesn't allow me to change font using shortcut or a mouse. Is there a way(or plugin) to change the font size in putty using the wheel in mouse or contrl +/- key just as in other applications such as Mac Terminal, Chrome,etc?

Thanks

Alby

Posted 2012-03-30T21:59:20.177

Reputation: 317

You can do this in the default Cygwin terminal (mintty), which incidentally is based on bits of PuTTY. – ak2 – 2012-06-28T14:22:14.497

Answers

10

No, there isn't. Fonts have to be configured before starting the session or during the session with a long list of actions (access the window system menu - change settings - window - appearance).

However in a derived project called ExtraPuTTY this function (ctrl + mousewheel up/down) is available in latest development snapshot ("ExtraPuTTY 0.28 (Ind 16) snapshot version")

d135-1r43

Posted 2012-03-30T21:59:20.177

Reputation: 218

3

You can alternatively use AutoHotKey with this script. This isn't exactly a quiet way but it works. The shortcuts are Ctrl+Alt+= to increase the size, and Ctrl+Alt+- to decrease the size. If you want Ctrl +/- keys, just remove exclamation marks.

ChangeFontSize(Direction="Down") {
    nIndex := 15;
    WinGet, hWnd, ID, ahk_class PuTTY
    hSysMenu := DllCall("GetSystemMenu", "UInt", hWnd, "UInt", False)
    nID := DllCall("GetMenuItemID", "UInt", hSysMenu, "UInt", nIndex)
    PostMessage, 0x112, nID, 0, , ahk_id %hWnd%
    SendInput {Shift Down}{Tab}{Shift Up}a{LAlt Down}n{LAlt Up}{LAlt Down}s{LAlt Up}{%Direction%}{Enter}{LAlt Down}a{LAlt Up}
}

#IfWinActive ahk_class PuTTY
^!=::
ChangeFontSize()
return

#IfWinActive ahk_class PuTTY
^!-::
ChangeFontSize("Up")
return

This was tested only on Windows 8.1 using PuTTY 0.62 (the vanilla one from the primary website). You may have to adjust nIndex value, which is 0-based and includes dividers, if your system menu looks different from what I have. If you're using a different version of PuTTY or a derivative then you may also have change the sequence of shortcut keys in the script. Make it work and enjoy.

This is what my PuTTY system menu looks like: PuTTY system menu on Windows 8.1

clayjar

Posted 2012-03-30T21:59:20.177

Reputation: 31

Nice job! Pretty clever use of macros – Daniel Kessler – 2014-02-05T17:27:26.133

1

At least on Windows 7 I increase/decrease the font size by holding Ctrl and scrolling the mouse wheel while in active Putty session

Sergey Lukin

Posted 2012-03-30T21:59:20.177

Reputation: 111

1

Although PuTTY doesn't by default support scroll to resize, PuTTY Tray does. That product maintains a fork of PuTTY with enhancements and bug fixes not found in the traditional version. I prefer it because they use GitHub for collaborative contributions.

Jason R. Coombs

Posted 2012-03-30T21:59:20.177

Reputation: 1 952

-2

I don't change the font size, but I make Mac Terminal bigger or smaller, with the following keys: ⌘+ ⌘-

EhevuTov

Posted 2012-03-30T21:59:20.177

Reputation: 135