0

I have hit a few CTRL- in command line and I see the text in the terminal getting smaller with every invocation. What is going on here and is there a way to redo ie magnify the text to bring it back to the original size via a command?

Edit: As per Christopher's suggestion in the comment I can get back to my original font size by hitting CTRL+ but I would still like to understand what is going on behind the scenes here.

3
  • @Christopher yes it does work.
    – Geek
    Jul 8, 2014 at 12:28
  • @Christopher I updated the question based on your comment.
    – Geek
    Jul 8, 2014 at 12:40
  • This is common behavior in many applications like browsers, file managers, terminal emulators, etc.
    – psimon
    Jul 8, 2014 at 16:38

5 Answers 5

10

It's a somewhat standard keyboard shortcut (it works in Konsole, too).

It's simply bound to reduce font size (and simmetrically, Ctrl+ to increase font size).

You can easily disable/modify by going to the shortcuts preferences:

Edit ▸ Preferences ▸ Shortcuts.

4

It has nothing to do with the command line, it's just a Gnome Terminal application shortcut. It won't happen in eg Xterm.

0
3

These are shortcuts for changing the font size in gnome-terminal. You can see them in the View menu and change them in the Edit → Keybord shortcuts… menu.

2

As an addition to other answers, you can usually reset the size to default with the key combination Ctrl0

1

It is a feature of vte (gnome-terminal) and konsole. According to vte's git-log, it was added in November 2002:

handle end-of-line selection correctly. Stop highlighting selection on
* src/vte.c: handle end-of-line selection correctly.  Stop highlighting
    selection on click, but don't lose it until new text is selected.
* python/vte.override: fix binding for set_colors() to properly take a
    list of colors for the palette (#97682).
* src/vte.c, src/vte.h: add increase-font-size and decrease-font-size to allow
    mimicking XTerm's and Mozilla's behavior on Shift/Control
    KP_Add/KP_Subtract
* src/vteapp.c: handle increase-font-size and decrease-font-size.

Konsole added it in April 2007:

Add menu items and shortcuts to increase and decrease font size. I have tried to keep as close as possible to the recommended Zoom In/Out shortcuts given that Ctrl+[Key] shortcuts cannot be used because they are reserved for terminal application use. Ctrl++ zooms in, Ctrl+Shift+- zooms out.

Regarding keyboard shortcuts, xterm has used shifted keypad plus/minus since 1999, imitating rxvt which introduced the feature a few years earlier (seen in version 2.18, August 1996).

That's four implementations over more than 10 years. With macOS (OSX), Terminal.app and iTerm2 do both (using command rather than control), but since there's no reliable documentation on Terminal.app, it's hard to say when the feature was added.

Then again, there are several terminal emulators which appear to lack the feature (still).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.