ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

fix default increase_font_size binding config from physical to unicode

Open LiamGoodacre opened this issue 3 months ago • 6 comments

During d015efc87d59f873e2ae7a5df8fa432cd5db2bdc some of the bindings were converted from physical keys to unicode. The binding for font size increase via = was missed. Therefore there was an inconsistency between font size increase and font size decrease. Decreasing with - would be relative to the keyboard layout, whereas increase required the physical = key.

Dedicated discussion: https://github.com/ghostty-org/ghostty/discussions/8743 Original thread on: https://github.com/ghostty-org/ghostty/discussions/8729#discussioncomment-14439306

I've ran zig build run to sanity check the behaviour and all seems well. Let me know if there's anything else I need to do.


A work-around in the mean time is:

keybind = ctrl+equal=unbind
keybind = ctrl+==increase_font_size:1

LiamGoodacre avatar Sep 18 '25 18:09 LiamGoodacre

The comment above this implies we're doing this on purpose. I want to understand both sets of problems more before approving this.

mitchellh avatar Sep 20 '25 20:09 mitchellh

I have a related Discussion to this issue. Currently the increase_font_size keybind [src] is using unicode + and the next_tab keybind [src] is using physical_key bracket_right ... Dvorak maps + to bracket_right so these two keybindings are in conflict.

As a Dvorak/Mac user for ~15 years, I agree with this comment on a prior Dvorak discussion, that Ghostty should not be shipping physical keybinds for keys like bracket_right/bracket_left

chrismo avatar Oct 13 '25 14:10 chrismo

On a German layout, cmd - decreases the font size, but cmd + does not increase it again. This is broken on nightlies for at least a month now and I would really like a fix. The proposed workaround above also doesn't work on my system.

dwt avatar Nov 08 '25 11:11 dwt

@dwt, I think this might be related to your issue, as my problem was identical: https://github.com/helix-editor/helix/discussions/14624. I originally wrote about it in the comments to this PR but deleted it because I wasn’t sure about the relevance.

One big factor to my confusion with this keybind was that the menu item asserted Cmd + would work —it does not, unless the menu bar is focused. Given that d015efc mentions making bindings ‘match macOS menus,’ perhaps this PR corrects that.

dontwanttothink avatar Nov 08 '25 13:11 dontwanttothink

@dontwanttothink Indeed, your comment helps and gives me a workaround for now with this snippet in my Ghostty config:

# Workaround for https://github.com/ghostty-org/ghostty/pull/8759
# Enables cmd+plus to work on german keyboard layouts
keybind=cmd+BracketRight=increase_font_size:1

Sorry, for grabbing your short name on GitHub. The long form of mine is onstensible: DontWannaTell - but I also really like yours. :)

dwt avatar Nov 10 '25 14:11 dwt

Looking at the code this pull request is trying to change, it only talks about the = key. Does this by any chance cover the + key too, or is this going to be another pull request?

dwt avatar Nov 10 '25 14:11 dwt