kitty/glfw
Sébastien MORAND 0bf307c95f
macOS: Implement dictation support via accessibility and NSTextInputClient
This commit enables macOS dictation (triggered by pressing Fn twice) to work
in kitty by implementing the necessary accessibility methods.

The key fix is changing `selectedRange` to return `NSMakeRange(0, 0)` instead
of `kEmptyRange` (NSNotFound, 0). When selectedRange returns NSNotFound, macOS
dictation cannot determine where to insert text and fails silently.

Additional accessibility methods implemented:
- accessibilitySelectedTextRange: Returns cursor position for dictation
- accessibilityNumberOfCharacters: Returns 0 (terminal has no fixed buffer)
- accessibilityInsertionPointLineNumber: Returns 0
- accessibilityValue: Returns empty string
- setAccessibilityValue: Routes dictated text to keyboard input

This fix is inspired by the similar fix in Emacs v30 which restored dictation
by implementing selectedRange properly after migrating to NSTextInputClient.

Fixes: https://github.com/kovidgoyal/kitty/issues/3732
2026-01-20 10:35:54 +01:00
..
__init__.py
backend_utils.c ... 2025-12-03 22:57:14 +05:30
backend_utils.h Wayland: Fix spurious key repeat events when some user defined callback takes a long time to execute 2025-12-03 22:26:09 +05:30
cocoa_displaylink.m Nano-optimisation: Avoid using a block with GCD 2025-10-22 13:40:42 +05:30
cocoa_init.m YATB: Yet Another Tahoe Bug from the company that should stick to selling fruit 2025-12-18 11:13:38 +05:30
cocoa_joystick.h
cocoa_joystick.m
cocoa_monitor.m Add some missing assertions 2025-08-16 07:38:54 +05:30
cocoa_platform.h macOS: Fix changes to macos_titlebar_color while in full screen not being applied after exiting fullscreen 2026-01-03 00:19:03 +05:30
cocoa_window.m macOS: Implement dictation support via accessibility and NSTextInputClient 2026-01-20 10:35:54 +01:00
context.c
dbus_glfw.c Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
dbus_glfw.h Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
egl_context.c Fallback to eglGetDisplay() when eglGetPlatformDisplayEXT() returns EGL_NO_DISPLAY 2025-08-16 08:13:40 +05:30
egl_context.h
glfw.py Make Wayland momentum scrolling configurable 2026-01-09 13:46:49 +05:30
glfw3.h Wayland: Fix line and v120 scroll event types being multiplied by screen scale 2026-01-09 12:50:07 +05:30
glx_context.c Add some missing assertions 2025-08-16 07:38:54 +05:30
glx_context.h
ibus_glfw.c Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
ibus_glfw.h
init.c Wire up clipboard lost events 2025-03-12 09:26:36 +05:30
input.c Refactor GLFW scroll event callback to use a proper event struct 2025-12-31 23:40:34 +05:30
internal.h Cancel momentum scroll on button and key events 2026-01-09 13:15:37 +05:30
kwin-blur-v1.xml
linux_desktop_settings.c ... 2025-11-22 20:03:01 +05:30
linux_desktop_settings.h
linux_joystick.c
linux_joystick.h
linux_notify.c Linux: Handle desktop settings portals that are so old they don't implement ReadOne 2025-05-08 15:22:42 +05:30
linux_notify.h
main_loop.h
mappings.h
memfd.h
momentum-scroll.c Support for old compilers 2026-01-11 11:02:14 +05:30
monitor.c Improve handling of output names 2025-05-13 15:29:37 +05:30
monotonic.c
nsgl_context.h
nsgl_context.m Move preservation of OpenGL context into glfw 2025-09-05 15:29:06 +05:30
null_init.c
null_joystick.c
null_joystick.h
null_monitor.c
null_platform.h
null_window.c
osmesa_context.c Add some missing assertions 2025-08-16 07:38:54 +05:30
osmesa_context.h
posix_thread.c
posix_thread.h
source-info.json Wayland: Remove usage of the Wayland color management protocol to inform compositors of the color space used by kitty 2026-01-15 09:53:09 +05:30
vulkan.c
window.c macOS: When toggling in the quick access terminal move it to the currently active screen 2025-09-22 20:04:42 +05:30
wl_client_side_decorations.c DRYer 2025-09-16 08:18:42 +05:30
wl_client_side_decorations.h Wayland: Fix incorrect window size calculation when transitioning from fullscreen to non-fullscreen with client side decorations 2025-07-17 20:36:38 +05:30
wl_cursors.c
wl_cursors.h
wl_init.c Wayland: Remove usage of the Wayland color management protocol to inform compositors of the color space used by kitty 2026-01-15 09:53:09 +05:30
wl_monitor.c Add some missing assertions 2025-08-16 07:38:54 +05:30
wl_platform.h Wayland: Remove usage of the Wayland color management protocol to inform compositors of the color space used by kitty 2026-01-15 09:53:09 +05:30
wl_text_input.c
wl_text_input.h
wl_window.c Wayland: Remove usage of the Wayland color management protocol to inform compositors of the color space used by kitty 2026-01-15 09:53:09 +05:30
wlr-layer-shell-unstable-v1.xml
x11_init.c Cleanup previous PR 2026-01-15 19:26:27 +05:30
x11_monitor.c Add some missing assertions 2025-08-16 07:38:54 +05:30
x11_platform.h Cleanup previous PR 2026-01-15 19:26:27 +05:30
x11_window.c Ignore master pointer device events since we use the slave devices 2026-01-11 12:57:56 +05:30
xkb-compat-shim.h
xkb_glfw.c
xkb_glfw.h