summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2025-06-07add undo/redo keybindings, default them on macOSMitchell Hashimoto
2025-05-29GTK: add action to show the GTK inspectorJeffrey C. Ollie
The default keybinds for showing the GTK inspector (`ctrl+shift+i` and `ctrl+shift+d`) don't work reliably in Ghostty due to the way Ghostty handles input. You can show the GTK inspector by setting the environment variable `GTK_DEBUG` to `interactive` before starting Ghostty but that's not always convenient. This adds a keybind action that will show the GTK inspector. Due to API limitations toggling the GTK inspector using the keybind action is impractical because GTK does not provide a convenient API to determine if the GTK inspector is already showing. Thus we limit ourselves to strictly showing the GTK inspector. To close the GTK inspector the user must click the close button on the GTK inspector window. If the GTK inspector window is already visible but is hidden, calling the keybind action will not bring the GTK inspector window to the front.
2025-05-24add cut/copy/paste keysJörg Thalheim
The origin of these keys are old sun keyboards. They are getting picked up by the custom (progammable) keyboard scene (see https://github.com/manna-harbour/miryoku for a popular layout). Support in ghosty is quite handy because it allows to bind copy/paste in a way that doesn't overlap with ctrl-c/ctrl-v, which can have special bindings in some terminal applications.
2025-05-15macos: add "Check for Updates" action, menu item & key-binding supportAaron Ruan
2025-05-10fix testsMitchell Hashimoto
2025-05-09apprt/gtk: buildMitchell Hashimoto
2025-05-09macOS: buildMitchell Hashimoto
2025-05-07core: add context menu keyJeffrey C. Ollie
2025-05-01Binding for toggling window float on top (macOS only)Mitchell Hashimoto
This adds a keybinding and apprt action for #7237.
2025-04-25Add config color palette C bindingsFriedrich Stoltzfus
C bindings to expose the color palette to Swift for macOS.
2025-04-22move command filtering into apprtMitchell Hashimoto
2025-04-21add toggle command palette bindingMitchell Hashimoto
2025-04-21libghostty: add API for getting commandsMitchell Hashimoto
2025-04-21input: defind Command struct and default commandsMitchell Hashimoto
2025-04-17macOS/libghostty: rework keyboard input handlingMitchell Hashimoto
This is a large refactor of the keyboard input handling code in libghostty and macOS. Previously, libghostty did a lot of things that felt out of scope or was repeated work due to lacking context. For example, libghostty would do full key translation from key event to character (including unshifted translation) as well as managing dead key states and setting the proper preedit text. This is all information the apprt can and should have on its own. NSEvent on macOS already provides us with all of this information, there's no need to redo the work. The reason we did in the first place is mostly historical: libghostty powered our initial macOS port years ago when we didn't have an AppKit runtime yet. This cruft has already practically been the source of numerous issues, e.g. #5558, but many other hacks along the way, too. This commit pushes all preedit (e.g. dead key) handling and key translation including unshifted keys up into the caller of libghostty. Besides code cleanup, a practical benefit of this is that key event handling on macOS is now about 10x faster on average. That's because we're avoiding repeated key translations as well as other unnecessary work. This should have a meaningful impact on input latency but I didn't measure the full end-to-end latency. A scarier part of this commit is that key handling is not well tested since its a GUI component. I suspect we'll have some fallout for certain keyboard layouts or input methods, but I did my best to run through everything I could think of.
2025-04-14gtk: implement bellLeah Amelia Chen
Co-authored-by: Jeffrey C. Ollie <jeff@ocjtech.us>
2025-03-07add ghostty_translate C APIMitchell Hashimoto
2025-03-06gtk: add separate close_window apprt actionLeah Amelia Chen
For *some* reason we have a binding for close_window but it merely closes the surface and not the entire window. That is not only misleading but also just wrong. Now we make a separate apprt action for close_window that would make it show a close confirmation prompt identical to as if the user had clicked the (X) button on the window titlebar.
2025-02-28Introduce `reset_window_size` keybinding and apprt actionMitchell Hashimoto
Related to #6035 This implements the keybind/action portion of #5974 so that this can have a binding and so that other apprts can respond to this and implement it this way.
2025-02-14Add tab title rename feature to macosAswin M Prabhu
2025-02-13macos: add `padded-notch` option for `macos-non-native-fullscreen`Mitchell Hashimoto
Finishes #378 Supercedes #4159 This adds a new enum value for `macos-non-native-fullscreen`: `padded-notch`. This value will add padding to the top of the window to account for the notch on applicable devices while still hiding the menu. This value is preferred over "visible-menu" by some people because for screens without a notch, the window will take up the full height. The plan in the future is that we may color the padded area when a notch is present. In this commit it appears as transparent.
2025-02-11apprt/embedded: make performAction return the performable stateMitchell Hashimoto
2025-01-13Handle setting _NET_WM_STATE (#4936)Mitchell Hashimoto
As recommended in https://github.com/ghostty-org/ghostty/pull/4927#issuecomment-2585003934, adds a config option `maximize` for starting a window in a maximized state in terms of window properties. Also adds a `toggle_maximize` keybind to allow users to manually toggle this feature on and off. It might make more sense to make this an optional config value so that we don't toggle the state off if the WM already handles that for us, but I'll let a reviewer decide. Closes https://github.com/ghostty-org/ghostty/issues/4646
2025-01-13Fix backslash comment in ghostty.hAndreas Skielboe
2025-01-10apprt/gtk: add toggle_maximize keybind and window-maximize config optionAdam Wolf
2025-01-08close_tab keybind (gtk apprt only) (#4033)Sabarigirish Manikandan
Title. Adds a close_tab keybind that essentially behaves the exact same as clicking the tab close button on the tab bar.
2025-01-04macos: handle overridden system bindings with no focused windowMitchell Hashimoto
2025-01-04Key events return boolean if handledMitchell Hashimoto
2025-01-04core: add keyEventIsBindingMitchell Hashimoto
This API can be used to determine if the next key event, if given as-is, would result in a key binding being triggered.
2025-01-04Move app quit to apprt actionMitchell Hashimoto
This changes quit signaling from a boolean return from core app `tick()` to an apprt action. This simplifies the API and conceptually makes more sense to me now. This wasn't done just for that; this change was also needed so that macOS can quit cleanly while fixing #4540 since we may no longer trigger menu items. I wanted to split this out into a separate commit/PR because it adds complexity making the diff harder to read.
2024-12-27Rename `goto_split` top/bottom directions to up/down.Daniel Patterson
2024-12-21config: macos-icon configurationsMitchell Hashimoto
2024-12-21config: change color to a defined C struct for libghosttyMitchell Hashimoto
2024-11-22App applies conditional state, supports theme settingMitchell Hashimoto
The prior light/dark mode awareness work works on surface-level APIs. As a result, configurations used at the app-level (such as split divider colors, inactive split opacity, etc.) are not aware of the current theme configurations and default to the "light" theme. This commit adds APIs to specify app-level color scheme changes. This changes the configuration for the app and sets the default conditional state to use that new theme. This latter point makes it so that future surfaces use the correct theme on load rather than requiring some apprt event loop ticks. Some users have already reported a short "flicker" to load the correct theme, so this should help alleviate that.
2024-11-22apprt: remove change conditional state actionMitchell Hashimoto
2024-11-22apprt: switch to reload_config action that calls update_config APIMitchell Hashimoto
2024-11-21config: C API ghostty_config_cloneMitchell Hashimoto
2024-11-21apprt: add `config_change` actionMitchell Hashimoto
2024-11-19apprt: action to change conditional state, implement for embeddedMitchell Hashimoto
2024-11-13libghostty: remove the pwd functionMitchell Hashimoto
2024-11-13apprt: support a pwd change actionMitchell Hashimoto
2024-10-30apprt: rename set_bg/fg to "color_change" to report all color changesMitchell Hashimoto
2024-10-30apprt: propagate OSC10/11 (set term fore/background color) through to apprtCJ van den Berg
This is to allow the running apprt to set the UI theme to match the terminal application coloring.
2024-10-25macos: make move_tab workMitchell Hashimoto
2024-10-18c: remove the config load string APIMitchell Hashimoto
It was unused and doesn't match our diagnostic API.
2024-10-18config: richer diagnostics for errorsMitchell Hashimoto
Rather than storing a list of errors we now store a list of "diagnostics." Each diagnostic has a richer set of structured information, including a message, a key, the location where it occurred. This lets us show more detailed messages, more human friendly messages, and also let's us filter by key or location. We don't take advantage of all of this capability in this initial commit, but we do use every field for something.
2024-10-08apprt: implement key_sequence actionMitchell Hashimoto
2024-10-07macos: become aware of new split directions left and upMitchell Hashimoto
2024-10-07macos: remove the ability to bind fn/globeMitchell Hashimoto
This was recently introduced a few days ago. Unfortunately, this doesn't work as expected. The "function" modifier is not actually the fn key but used by macOS to represent a variety of "functional" key presses. This breaks other bindings such as #2411. I can't find a source on the internet that reliably tells me how we can detect fn key presses, but I do find a number of sources that tell us we can't.
2024-10-06apprt/embedded: add ghostty_app_set_focusMitchell Hashimoto