121 Commits

Author SHA1 Message Date
Mitchell Hashimoto
03f37087a5 mouse button callbacks returns bool for consumption 2024-06-30 09:42:15 -07:00
Mitchell Hashimoto
26735f0e05 apprt: convert selection info to a single struct and C API 2024-06-29 11:23:14 -05:00
Mitchell Hashimoto
80700d524d macos: add API to get selection top-left for quicklook 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
4c3fbffa4b macos: return valid selection range 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
d5f27245d4 macos: hacky API to get a CTFont for QuickLook 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
6faeb9ba40 core: mouse pressure state and callbacks 2024-06-29 10:42:45 -05:00
Mitchell Hashimoto
25484d2ccc macos: set background opacity/blur on window controller not surface 2024-06-07 12:31:45 -07:00
Mitchell Hashimoto
14417d2592 Allow keybinding arbitrary unicode codepoints (#1814)
Fixes #1802 

This allows `keybind` configurations to map to any Unicode codepoint. This enables keybindings for which we don't have a registered keycode or for custom keyboard firmwares that may produce arbitrary text (but the Ghostty support is limited to a single codepoint).

The `keybind` syntax is unchanged. If a bound character doesn't map to a known logical key that Ghostty knows about, we map it to a Unicode codepoint. The unicode codepoint is compared against the _unshifted codepoint_ from the apprt key event. 

Note that this binding is to a single _codepoint_. We don't support arbitrary sequences of characters or multi-code point graphemes for keybindings due to the complexity in memory management that would introduce.

This also provides a good fallback for scenarios where it might make sense to educate Ghostty about a key code or fix a bug in our keyboard input system, but the unicode data is correct. In that scenario, unicode key binds should allow key binds to still work while we investigate the input issues.

Example:

```
shift+ö=text:hello
```

This now works as expected on a US hardware keyboard with the Hungarian keyboard layout.
2024-06-02 10:53:36 -07:00
Qwerasd
5df0935f82 update font_size to f32 in libghostty 2024-05-09 00:03:40 -04:00
Mitchell Hashimoto
ca9689be46 renderer/metal: API to handle macOS display ID changing 2024-05-04 19:40:58 -07:00
Mitchell Hashimoto
e31e25f54d apprt/embedded: add draw now API 2024-05-04 14:49:49 -07:00
Mitchell Hashimoto
9aadf59ab1 macos,libghostty: font size is a u8 2024-03-27 20:53:03 -07:00
Mitchell Hashimoto
be0595d71d apprt/embedded: add occlusion state callback 2024-02-12 13:48:09 -08:00
Mitchell Hashimoto
258d51395c apprt/embedded: add API for reporting color scheme 2024-02-02 13:02:16 -08:00
Aurélien Cibrario
509be969af Added plus + key 2024-01-21 21:09:24 -08:00
Mitchell Hashimoto
4dbd10c913 apprt/embedded: support asking for selection text, existence 2024-01-21 17:22:44 -08:00
Mitchell Hashimoto
26e6e8cec8 apprt/embedded: add iOS platform with uivew 2024-01-18 15:03:03 -08:00
Mitchell Hashimoto
01afa293c8 apprt/embedded: fix initialization on macOS 2024-01-18 08:55:03 -08:00
Mitchell Hashimoto
df09c21103 apprt/embedded: compile for Linux 2024-01-18 08:44:56 -08:00
Mitchell Hashimoto
ed3f1df5f0 Merge pull request #1316 from qwerasd205/macos-file-handler
Added macOS file open handler
2024-01-16 18:56:34 -08:00
Qwerasd
51f53aa9bf Added macOS file open handler 2024-01-16 16:26:21 -05:00
Mitchell Hashimoto
376345dcae macos: detect renderer health failures and show error view 2024-01-16 11:27:18 -08:00
Mitchell Hashimoto
243379c50f apprt/embedded: ghostty_surface_pwd 2023-12-23 16:59:09 -08:00
Mitchell Hashimoto
7600c761ef fix callback struct ordering, use internal_os.open 2023-12-18 08:00:40 -08:00
Borja Clemente
646e3c365c Add settings shortcut on MacOS
- Settings shortcut opens the config file in the default editor.

Signed-off-by: Borja Clemente <borja.clemente@gmail.com>
2023-12-17 16:19:22 +01:00
Mitchell Hashimoto
89348fd73e include: add new keycodes 2023-12-13 18:46:55 -08:00
Gregory Anders
86b7442f3c macos: implement desktop notifications 2023-11-15 11:21:30 -06:00
Mitchell Hashimoto
5001e2c60c macos: filter option in AppKit when option-as-alt set
Fixes #872

In #867 we fixed macos-option-as-alt, but unfortunately AppKit ALSO does
some translation so some behaviors were not working correctly.
Specifically, when you had macos-option-as-alt set, option+e would
properly send `esc+e` to the pty but it would ALSO set the dead key
state for "`" since AppKit was still translating the option key.

This commit introduces a function to strip alt when necessary from the
translation modifiers used at the AppKit layer, preventing this
behavior.
2023-11-13 13:26:37 -08:00
Gregory Anders
98b43007a0 core: use ClipboardRequestType instead of ClipboardPromptReason
Instead of making a separate enum that must be translated from the
ClipboardRequest type, simply re-use ClipboardRequest to determine the
clipboard confirmation reason.
2023-11-10 23:12:39 -05:00
Gregory Anders
86245ff0cf macos: add option to prompt user for confirmation on OSC 52 commands 2023-11-10 23:12:39 -05:00
Mitchell Hashimoto
dd1faf5e50 macos: handle preedit in AppKit, enables Korean input 2023-11-10 09:53:56 -08:00
Gregory Anders
cd01340cce macos: add key binding for equalizing split sizes 2023-11-07 16:23:28 -06:00
Gregory Anders
9b14398153 macos: support resizing splits 2023-11-05 20:42:59 -06:00
Mitchell Hashimoto
ef44551522 apprt/embedded: hook up paste confirmation 2023-11-05 09:20:16 -08:00
Mitchell Hashimoto
9b134a60c1 apprt/embedded: add API to detect if a single surface needs quit confirm 2023-10-30 09:06:23 -07:00
Gregory Anders
2ee80a52df macos: set window resizeIncrements when cell size changes
The resizeIncrements property is only modified when the cell size of the
focused window changes. If two splits have the same cell size then the
property is not modified when focusing between the two splits.
2023-10-26 20:27:58 -05:00
Mitchell Hashimoto
29bbcbbf92 core: add input binding to control terminal inspector 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
92d172377e macos: don't do full surface-style key translation for imgui 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
52ccef3b8e macos: only re-render the inspector when requested 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
d50ff6ece7 macos: complete cimgui events 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
2c40183c3c macos: rendering basic imgui 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
ee832aa361 apprt/embedded: ghostty_surface_text function, remove _char 2023-10-04 07:56:56 -07:00
Mitchell Hashimoto
140afb395f apprt/embedded: supporting setting working directory in config 2023-10-03 17:34:44 -07:00
Mitchell Hashimoto
a1a8aeb104 initial window size needs to take into account window chrome 2023-09-30 21:35:50 -07:00
Mitchell Hashimoto
cc8e1cd936 macos: support initial window size 2023-09-30 20:47:31 -07:00
Mitchell Hashimoto
7059b4f74d apprt/embedded: ghostty_cli_main 2023-09-20 12:35:52 -07:00
Mitchell Hashimoto
5a02635d2c macos: async style clipboard reading 2023-09-19 10:36:17 -07:00
Mitchell Hashimoto
de0f71c6a1 c api: add ghostty_info to get metadata about the build 2023-09-15 12:32:41 -07:00
Mitchell Hashimoto
724900f143 macos: implement setCursorVisibility 2023-09-14 19:37:30 -07:00
Mitchell Hashimoto
cb2931cb27 rename cursor shape to mouse shape for OSC 22 2023-09-14 11:12:17 -07:00