mirror of
https://github.com/microsoft/terminal.git
synced 2026-02-04 05:35:20 +00:00
Allow mouse clicks to reposition cursor by emitting cursor key sequences #11788
Open
opened 2026-01-31 02:57:24 +00:00 by claunia
·
65 comments
No Branch/Tag Specified
main
automated/loc-update
feature/llm
dev/cazamor/sui/search
dev/pabhoj/actions_editor_search
dev/lhecker/11509-kitty-keyboard-protocol
dev/lhecker/11509-kitty-keyboard-protocol-wip
dev/pabhoj/actions_editor_visual
dev/cazamor/selfhost/2026-01-29
dev/duhowett/no-blank-issues-you-lost-privileges-for-that-fam
dev/lhecker/benchcat-fix
dev/lhecker/dcs-perf
dev/duhowett/eoy-25/allow-set-foreground
release-1.24
release-1.23
dev/cazamor/bot/deprecate-area-atlasengine
dev/pabhoj/actions_editor_followups
dev/cazamor/selfhost/2026-01-20
dev/cazamor/selfhost/2026-01-12
dev/cazamor/spec/auto-save
dev/duhowett/eoy-25/underline-colors-in-atlas-bug-redux
dev/duhowett/fhl-2024/asciicast-recorder
dev/duhowett/eoy-25/underline-colors-in-atlas-bug
dev/duhowett/hax/serial-port-support
dev/duhowett/connection-utf8
dev/lhecker/fused-event
dev/lhecker/18928-wip
dev/duhowett/fhl-2024/clang
dev/cazamor/uia-leak
dev/duhowett/win7-wpf-termcontrol-squash
release-1.22
dev/cazamor/selfhost/11-18-v3
dev/cazamor/selfhost/11-18
dev/duhowett/fhl-2025/bitmap-fonts
dev/duhowett/server-2025-vms
dev/duhowett/cant-believe-gotta-do-this-shit
dev/lhecker/1410-large-scrollback
dev/lhecker/dark-mode
dev/cazamor/sui/invert-cursor-color
dev/duhowett/fhl-2025/wt-command-palette-cmdpal-integration
dev/duhowett/fhl-2025/wt-json-relative-icons
dev/lhecker/fucking-service-locator
dev/duhowett/unicode-17
dev/duhowett/multi-blern
dev/lhecker/wellp2-alt
dev/duhowett/wellp2
dev/lhecker/1860-horizontal-scrollbar
dev/lhecker/fix-window-count
dev/cazamor/sui/tab-color-old
dev/duhowett/hax/conhost-icon
dev/duhowett/hax/sui-color-chip-border
dev/duhowett/hax/terminalsettings-as-a-lib-/with-types-merged-into-tsm
dev/pabhoj/page_control_input_cleanup
dev/duhowett/padding-in-atlas-rebase-20250729
dev/lhecker/attach-thread-input
dev/duhowett/portable-shader-members
msbuildcache-reenable
dev/cazamor/selfhost/1.24-2025-06-10
dev/cazamor/upgrade-settings-containers
dev/cazamor/sui/ext-page/powershell-stub
dev/cazamor/selfhost/1.24-2025-05-15
dev/pabhoj/sui_action_overhaul
dev/cazamor/selfhost/1.24-2025-05-06
dev/cazamor/selfhost/1.24-2025-04-29
dev/cazamor/sui/ext-page/lazy-load-objects
dev/cazamor/sui/ext-page/badge
dev/cazamor/selfhost/1.24
dev/lhecker/sdk-26100
dev/duhowett/testing
dev/jadelaga/VS-Pty.Net-1.22
dev/duhowett/fhl-2025/what-if-no-content-ids
dev/cazamor/a11y/vt-seq-prototype
dev/lhecker/18584-part2
dev/lhecker/get-lang-id
dev/duhowett/hax/clogs
release-1.21
dev/pabhoj/featurellm_fix_paste
dev/lhecker/grapheme-backup
dev/jadelaga/VS-Pty.netFixes
dev/lhecker/atlas-engine-compute-shader
dev/migrie/s/ai-providers
dev/lhecker/animated-cursor-wip
dev/pabhoj/featurellm_timeout
dev/lhecker/dark-mode-alt
dev/duhowett/osc-strided-table
dev/lhecker/bugbash
dev/pabhoj/featurellm_improve_parsing
dev/duhowett/coast-to-coast
dev/lhecker/curly-improvements
dev/duhowett/net8
dev/duhowett/onebranch-custom-pool
dev/lhecker/renderer-overhaul-2nd-attempt
dev/lhecker/cleanup
dev/cazamor/sui/confirmation-announcements
dev/lhecker/theme-quality
dev/duhowett/hax/cmake
dev/lhecker/winconpty-cleanup
dev/duhowett/learn/rewrite-highlights
dev/migrie/b/no-nesting-when-searching
release-1.20
dev/lhecker/14165-conhost-font-size
dev/duhowett/sel-2-spans
dev/lhecker/7118-cursor-color
dev/lhecker/remove-glyph-width
dev/lhecker/igfw-scroll-region
dev/lhecker/17656-win32im-double-encoding
dev/duhowett/fhl-2024/merge-idls
dev/duhowett/feed-forward-variables
dev/lhecker/remove-chrome-math
dev/duhowett/copylink
dev/duhowett/applicableactions
gh-readonly-queue/main/pr-17566-de50310295b7d92ed3d51f07974a2a945776bf9d
dev/lhecker/atlas-engine-stride-copy
dev/migrie/b/bump-nuget-in-c
dev/migrie/f/992-redux-redux
dev/migrie/f/filter-weight-input-too
dev/migrie/f/disable-nesting
dev/migrie/f/local-snippets-cleaner
dev/migrie/s/1553-mouse-bindings
selfhost-1.22-bugbash-2024-06-04
selfhost/1.22-bugbash-2024-06-04
dev/lhecker/15689-tab-drag-crash-fix
dev/migrie/f/sxnui-font-size-change
dev/migrie/f/local-snippets-on-action-refactor
dev/migrie/f/just-local-snippets
dev/migrie/save-input-patches
dev/migrie/f/md-pane-official
dev/migrie/base-pane
dev/migrie/fhl/tasks-pane
release-1.19
dev/migrie/b/17130-clear-marks-2
dev/migrie/b/17075-its-me-the-killer
dev/duhowett/i-figured-out-why-sometimes-the-publish-build-failed
dev/duhowett/nuget-publication-with-aad-app-id
selfhost-1.20
dev/duhowett/graph
dev/migrie/b/15803-activate-dont-copypasta
dev/duhowett/is-pgo-broken-because-of-sui-being-slower
dev/migrie/b/remove-terminaltab
dev/migrie/fhl/md-pane
dev/migrie/fhl/local-tasks-2024
dev/migrie/fhl/2024-inline-notebook
dev/duhowett/interface-projects
dev/duhowett/dead-loc
release-1.18
dev/migrie/fhl/2024-spring-merge-base
dev/duhowett/hax/l9
inbox
dev/migrie/14073-on-main
dev/duhowett/hax/conhost_dump_replay
user/lhecker/atlas-engine-srgb
dev/migrie/fhl/sxnui-tooltips-3
dev/migrie/7718-notifications-experiments
dev/migrie/fhl/7718-notifications
dev/migrie/fhl/7718-notifications-reboot
dev/lhecker/remove-gsl
dev/lhecker/16575-TerminateProcess
dev/lhecker/window-thread-climate-control
dev/lhecker/client-context-input-output-mode
dev/lhecker/ring-buffer-input-buffer
release-1.17
dev/lhecker/propsheet-fontdlg-refactor
dev/lhecker/renderer-overhaul
dev/pabhoj/test
dev/duhowett/chop
dev/lhecker/til-ulong-cleanup
dev/lhecker/til-env-cleanup
dev/migrie/f/16005-a11y-pane
dev/cazamor/a11y/fastpass
dev/migrie/b/15487-push-cwd
dev/migrie/b/15536-or-15219-idk
dev/duhowett/move-timers-down-into-core-interactivity-etc
dev/migrie/b/15812-broadcast-paste-two
dev/migrie/fhl-fall-2023/11162-quake-III-arena
dev/migrie/fhl-fall-2023/1620-automatic-tab-progress
dev/migrie/fhl-fall-2023/9992-quake-II
dev/migrie/fhl-fall-2023/9992-default-quake-settings
dev/migrie/fhl-fall-2023/9992-window-name-settings
dev/migrie/fhl-fall-2023/oceans
dev/lhecker/ColorScheme-improvements
dev/migrie/search-v2-v3
dev/migrie/pr-15717/its-dangerous-to-go-alone
dev/migrie/f/4768-taskbar-icons
dev/duhowett/padding-in-atlas
dev/migrie/f/3121-tooltips
dev/duhowett/sticky-control
dev/duhowett/fix-tracing-2
dev/migrie/b/add-support-for-vsc-marks
dev/migrie/f/1860-this-is-literally-what-less-is-for
dev/migrie/s/5916-draft
dev/lhecker/tracy
dev/migrie/s/north-star
dev/cazamor/tag-youre-it
dev/migrie/f/12336-let-it-mellow
dev/migrie/f/now-with-more-compat-settings
dev/migrie/f/compatibility-sui
dev/duhowett/hax/wpf-atlas
dev/duhowett/fgb
dev/migrie/b/15487-relative-paths-are-hard
dev/lhecker/colrv1
loc-update
dev/migrie/fhl/dyndep-csharp
dev/migrie/fhl/dyndep
dev/migrie/fhl-clickable-send-input
dev/migrie/f/cwd-hijinks-5506-15173
dev/lhecker/openconsole-async-start
1.17
dev/migrie/bump-scratch
dev/migrie/f/3726-restartConnection
dev/migrie/b/cxn-restarting-attempt-1-backport
dev/migrie/b/9053-part-3-the-actual-doing-of-the-thing
dev/migrie/b/13388-focus-logger
dev/migrie/b/9053-part-4-i-guess-defterm
dev/migrie/oop/3/of-the-silmarils
of-the-darkening-of-valinor
dev/migrie/fhl/notebook-proto-000
dev/migrie/f/narrator-buddy
dev/migrie/mux-2.8.2-march-2023
dev/migrie/f/roast-mutton
dev/migrie/f/12861-preview-input
dev/lhecker/clang-tidy
dev/migrie/f/3121-wE-dOnT-hAvE-dEv-DaYs
dev/duhowett/compiler-compliance
dev/duhowett/i-have-a-burning-hatred-for-ntstatus-of-later-so-why-not-fix-it
dev/duhowett/shorthand-namespaces
dev/duhowett/rename-all-dlls
dev/duhowett/errordialog
dev/lhecker/gsl-narrow
dev/migrie/b/11522-dumb-idea
release-1.16
dev/miniksa/env
dev/duhowett/hax/embed-everything
dev/migrie/b/13388-attempt-003
dev/migrie/b/14512-test-research
dev/migrie/b/13388-attempt-002
dev/migrie/b/14464-copyOnSelect-moving-text
dev/migrie/s/thema-schema-for-1.16
dev/migrie/s/theme-pair-schema
dev/migrie/b/13388-experiments-1
dev/cazamor/spec/a11y-vt-seq
dev/migrie/b/14557-empty-folder-dropdown
dev/cazamor/spec/a11y-vt-seq-v2
release-1.15
dev/migrie/f/process-model-v3-test-0
dev/lhecker/vsconfig
dev/migrie/s/5000-presentation
dev/lhecker/5907-startup-perf
dev/lhecker/winrt-file-api-benchmark
dev/duhowett/128-bit-compiler
dev/duhowett/hax/arm64-native-build
dev/migrie/fhl/more-shell-integration
dev/migrie/b/13388-experiments-0
dev/lhecker/til-to-ulong-improvements
dev/migrie/s/markdown-notebooks
dev/cazamor/a11y/nav-by-page
dev/cazamor/a11y/system-menu-support
dev/duhowett/no-private-registry-keys
dev/cazamor/wpf/uia-expose-enable-events
dev/cazamor/wpf/uia-events
extendAISpec
dev/migrie/fhl/clickSendInput
dev/migrie/fhl/save-command
dev/migrie/b/theme.profile
dev/migrie/b/13943-a-test-for-this
dev/migrie/oop/2/endgame
dev/duhowett/hax/merge_idl
dev/migrie/oop/2/infinity-war
dev/migrie/spellbot-cve
dev/cazamor/a11y-sev3/new-profile-announcement
dev/migrie/fhl/upside-down-mode
release-1.14
dev/migrie/f/9458-startupInfoToTerminal
dev/migrie/fhl/5916-triggers
dev/migrie/b/13523-context-menu
dev/migrie/b/6523-endpaint-outside-lock
dev/migrie/b/12413-OnUnhandledException
dev/lhecker/render-snapshot
dev/cazamor/1.15/scroll-to-point
dev/migrie/mux-2.8-aug-2022
dev/lhecker/lock-console-guard
dev/migrie/f/1504-final
dev/pabhoj/sui_follow_ups
dev/migrie/f/til-winrt.h
dev/cazamor/color-picker-redesign
dev/migrie/fhl/vscode-autocomplete-prototype
dev/migrie/f/1504-prototype
dev/migrie/oop/2/loki
dev/migrie/oop/2/wandavision
dev/migrie/b/8698-YOURE-OUT-OF-ORDER
fabricbot-configuration-migration
dev/migrie/b/12788-did-it-work
dev/migrie/b/localtests-ci-2022
dev/cazamor/1.14/replace-compareInBounds
dev/pabhoj/preview_string
dev/cazamor/ks/switchSelectionEndpoint
dev/migrie/oop/2/COM-ISwapChainProvider-attempt-1
dev/migrie/b/dxd-marker
release-1.13
dev/migrie/b/13066-for-defterm
dev/cazamor/revert-dwm
dev/migrie/b/13066-sw_flash_repeatedly
dev/migrie/b/no-cloaky-cloak
dev/migrie/f/apples-to-oranges
dev/migrie/f/no-custom-caption-btns
dev/migrie/f/10509-mica-and-transparent-titlebars
dev/migrie/b/12911-wpf-focus-fg
dev/migrie/titebar-colors
dev/lhecker/4015-cursor
dev/migrie/fhl/rgb-rainbow-window-frame
dev/migrie/fhl/scroll-marks-prototype
release-1.12
dev/miniksa/compliance
dev/migrie/f/default-icons
dev/migrie/fhl/10175-web-search-for-text
dev/migrie/fhl/menu-complete-prototype
dev/migrie/b/2988-merged-prototypes
dev/migrie/b/2988-niksa-msgs-prototype
dev/migrie/fhl/9583-colorSelection
dev/migrie/b/10609-sui-leak
dev/migrie/b/32-attempt-3
dev/migrie/release-1.12-rejuv-attempt-2
dev/migrie/demo-for-presentation
dev/migrie/b/32-but-im-here-for-12567
dev/duhowett/conpty_first_frame_blug
dev/migrie/b/11092-unfocused-acrylic-settings
dev/migrie/localtests-in-ci
dev/migrie/b/12356-attempt-2
dev/migrie/b/12353-with-null
dev/migrie/b/12387-trim-spaces
dev/migrie/b/5033-bad-start
dev/lhecker/12351-broken-locales
dev/migrie/b/8663-input-to-oem-crash
dev/migrie/b/11743-win10-opacity-is-hard
dev/migrie/f/ctrl-click-elevate
dev/migrie/b/12196-shim-localization
dev/lhecker/issue-4015-til-rect
dev/cazamor/eim/mvvm
dev/migrie/f/--elevate
dev/migrie/b/11668-i-think
dev/migrie/b/11994-wsl-mangline
dev/migrie/eim/3475-action-xmacros
dev/migrie/eim/incremental-build-000
dev/cazamor/a11y/fake-uia-data
dev/migrie/f/non-terminal-content-elevation-warning
dev/migrie/f/632-on-warning-dialog
dev/lhecker/rgba
dev/migrie/b/8480-keybindings-in-tabs
release-1.11
dev/migrie/b/11561-dead-ends
dev/migrie/oct-21-roadmap-update
dev/migrie/fhl/adaptive-card-extension
dev/cazamor/test/11440
dev/migrie/f/warning-dlg-automation
dev/migrie/b/1.12-crash-on-exit
dev/migrie/b/11146-next-tab-in-cmdpal
release-1.10
dev/migrie/5ff9a24-and-75e2b5f
dev/duhowtt/hax/cpal-jumplist-async
dev/lelian/actionid/1
dev/migrie/f/just-elevated-state
dev/lhecker/terminal-settings-cleanup
dev/migrie/gh-10824
dev/pabhoj/cursor_light
dev/migrie/oop/wandavision
dev/migrie/oop/endgame
dev/migrie/oop/infinity-war
dev/lhecker/app-state-actually-hidden
dev/migrie/b/6160-dynamic-default-warning
dev/mgirie/b/more-nchhittest-ideas
dev/migrie/b/9320-interfacial-separation
cinnamon/fhl/find-contextmenu
dev/lhecker/wsl-distro-generator-cleanup
dev/migrie/b/10875-but-more-clever
dev/migrie/b/broken-globalsummon-overloading
dev/duhowett/hax/rle-row
dev/migrie/fhl-2021/cmdpal-select-list
dev/migrie/fhl-2021/differential-pixel-shading
dev/duhowett/hax/no-writable-glyphat
dev/migrie/fhl-2021/more-shader-variables
dev/migrie/titlebar-shenannigans
dev/miniksa/win10_font_matching
dev/lhecker/conhost-oom
dev/migrie/b/10332-less-snappy-scrolling
dev/migrie/b/7422-1px-top-border
release-1.9
dev/cazamor/move-scratch
release-1.8
dev/miniksa/manifest_2
release-1.6
release-1.7
dev/migrie/oop/the-whole-thing
dev/migrie/oop/connection-factory
dev/migrie/f/quake-dropdown-2
dev/miniksa/rle2
dev/migrie/f/quake-toCurrent-experiments-2
dev/migrie/f/quake-toCurrent-experiments
dev/migrie/f/quake-dropdown
dev/cazamor/actions-page/template
dev/duhowett/hax/cursor_stamp_foreground_background
dev/migrie/f/1860-hey-might-was-well-hack-during-a-hackathon
dev/migrie/oop-terminal.control-split-control
dev/duhowett/hax/build-with-wholearchive
dev/cazamor/spec/tsm-actions-temp
dev/migrie/oop-tear-apart-control
dev/migrie/oop-scratch-3
dev/cazamor/sui/bugfix-reload-crash
dev/migrie/f/xmacro
dev/cazamor/sui/proto/profile-nav-view
dev/migrie/f/name-windows
dev/migrie/dol/messing-with-shaders-take-1
release-1.5
dev/cazamor/sui/inheritance-hyperlinks-test
dev/migrie/r/commandline-lib-002
dev/migrie/f/com.fabrikam.toaster
dev/cazamor/adaptive-cards-prototype
dev/migrie/f/commandline-lib
dev/miniksa/zipzoom2
dev/migrie/f/remote-commandlines
dev/migrie/f/632-elevated-profiles
dev/migrie/oop-broker-000
dev/migrie/fix-pr-7015
dev/duhowett/clang
dev/miniksa/input_tests_2
dev/miniksa/input2
dev/migrie/oop-rpc-000
release-1.4
dev/migrie/oop-mixed-elevation-1
dev/migrie/oop-window-content-1
cinnamon/open-json
dev/miniksa/input_tests
dev/duhowett/hax/tsm-graphviz
dev/miniksa/input
dev/duhowett/hax/caption_buttons
release-1.3
dev/cazamor/a11y/expand-line-under-viewport
dev/cazamor/acc/ch/word-nav-perf
dev/cazamor/spec/settings-ui-architecture-draft
dev/duhowett/hax/tap_upgrade
dev/migrie/f/pane-exit-animation
release-1.2
dev/migrie/move-lib-up-and-dll-down
release-1.1
dev/migrie/f/branch-2-backup
dev/migrie/f/settings-getters-only
dev/duhowett/hax/command_palette_search
dev/migrie/f/6856-let-terminalpage-expandcommands
dev/migrie/f/theming-2020
dev/migrie/oop-scratch-4
dev/duhowett/hax/punchout
dev/migrie/s/action-ids
dev/migrie/f/lets-just-generate-these
dev/migrie/oop-scratch-2
dev/miniksa/dcomp
dev/miniksa/gotta_go_fast_spsc
dev/miniksa/gotta_go_fast
dev/miniksa/perf_skip_checks
dev/miniksa/perf_buffer_dig
dev/migrie/s/1203-cursorTextColor
dev/migrie/f/fix-intellisense-i-guess-backup
release-1.0
dev/migrie/f/execute-commandlines
dev/migrie/f/2046-Command-Palette-v2
dev/migrie/b/6421-passthrough-alt
dev/migrie/b/moving-focus-is-hard
dev/miniksa/set
dev/migrie/f/1203-phase-1
dev/migrie/f/get-localtests-in-ci
dev/cazamor/drag-panes
dev/cazamor/tile-background
release-0.11
dev/duhowett/dev/duhowett/hax/appstate_remember
dev/duhowett/load_condrv
dev/duhowett/hax/wpf_win_8_hax
dev/migrie/b/3088-weird-exact-wrap-resize
release-0.10
dev/migrie/b/4591-custom-scaling-bug
dev/duhowett/hax/attr_smuggling
dev/migrie/b/5161-mingw-vim-fix
dev/miniksa/dx_bitmap
dev/migrie/b/1503-try-messing-with-cooked-read
dev/duhowett/eyebeam
dev/migrie/b/5113-experiments
dev/duhowett/hax-selection-exclusive
dev/migrie/f/more-vt-renderer-tracing
dev/miniksa/bitmap
dev/duhowett/wprp
dev/miniksa/bitmap-mad-with-power
dev/migrie/f/resize-quirk
dev/migrie/f/reflow-buffer-on-resize-002
wpf-renderer-revert
dev/miniksa/draw
release-0.9
dev/miniksa/tabs-color-fix
dev/miniksa/4309
dev/migrie/f/just-wrapping
dev/migrie/b/3490-try-another-resize-algo
release-0.8
dev/migrie/b/3490-a-simpler-resize
dev/migrie/b/3490-resize-down
dev/miniksa/4254
dev/migrie/f/conpty-wrapped-lines-2
dev/migrie/b/be-better-at-hiding
dev/migrie/f/3327-xaml-theming-proto
dev/miniksa/gardening2
release-0.7
dev/duhowett/conpty-flags
dev/migrie/f/603-vintage-opacity
dev/migrie/PR#3181-comments
dev/duhowett/font-64
release-0.5
dev/migrie/b/663-paste-lf-always
dev/migrie/b/2011-reordered-fallthrough-strings
dev/migrie/b/411-init-tab-stops
dev/migrie/b/json-patching-is-hard
dev/migrie/b/2455-try-getting-tests-working
dev/migrie/b/1223-change-256-table
dev/migrie/f/2171-openterm.cmd
dev/migrie/f/drag-panes
dev/migrie/f/2046-command-palette
release-0.3
dev/miniksa/manager
dev/migrie/f/non-terminal-panes
dev/migrie/f/passthrough-2019
dev/miniksa/shared_pch
dev/migrie/f/1897-less-duplicated-work
release-0.2
dev/cazamor/mcs/viewport-selection
dev/duhowett/version_hack
v1.24.10212.0
v1.23.20211.0
v1.24.3504.0
v1.23.13503.0
v1.24.2812.0
v1.23.12811.0
v1.24.2682.0
v1.23.12681.0
v1.24.2372.0
v1.23.12371.0
v1.23.12102.0
v1.22.12111.0
v1.23.11752.0
v1.22.11751.0
v1.22.11141.0
v1.23.11132.0
v1.23.10732.0
v1.22.10731.0
v1.21.10351.0
v1.22.10352.0
v1.23.10353.0
v1.22.3232.0
v1.21.3231.0
v1.22.2912.0
v1.21.2911.0
v1.22.2702.0
v1.21.2701.0
v1.22.2362.0
v1.21.2361.0
v1.21.1772.0
v1.20.11781.0
v1.21.1382.0
v1.20.11381.0
v1.21.1272.0
v1.20.11271.0
v1.20.11215.0
v1.19.11213.0
v1.20.10822.0
v1.19.10821.0
v1.20.10572.0
v1.19.10573.0
v1.20.10303.0
v1.19.10302.0
v1.18.10301.0
v1.20.10293.0
v1.19.10292.0
v1.18.10291.0
v1.18.3181.0
v1.19.3172.0
v1.19.2831.0
v1.18.2822.0
v1.19.2682.0
v1.18.2681.0
v1.18.1462.0
v1.17.11461.0
v1.18.1421.0
v1.17.11391.0
v1.17.11043.0
v1.16.10261.0
v1.17.1023
v1.16.10231.0
v1.15.3465.0
v1.16.3463.0
v1.15.2712.0
v1.15.2874.0
v1.16.2641.0
v1.16.2523.0
v1.15.2524.0
v1.15.2282.0
v1.14.2281.0
v1.14.1962.0
v1.15.2002.0
v1.15.2001.0
v1.15.1862.0
v1.14.1861.0
v1.14.1451.0
v1.14.1432.0
v1.13.11431.0
v1.13.10983.0
v1.12.10982.0
v1.13.10733.0
v1.12.10732.0
v1.13.10395.0
v1.12.10393.0
v1.13.10336.0
v1.12.10334.0
v1.12.3472.0
v1.11.3471.0
v1.12.2931.0
v1.12.2922.0
v1.11.2921.0
v1.11.2731.0
v1.10.2714.0
v1.11.2421.0
v1.10.2383.0
v1.10.1933.0
v1.9.1942.0
v1.9.1523.0
v1.8.1521.0
v1.9.1445.0
v1.8.1444.0
v1.8.1092.0
v1.7.1091.0
v1.8.1032.0
v1.7.1033.0
v1.7.572.0
v1.6.10571.0
v1.5.10411.0
v1.6.10412.0
v1.6.10272.0
v1.5.10271.0
v1.5.3242.0
v1.4.3243.0
v1.5.3142.0
v1.4.3141.0
v1.4.2652.0
v1.3.2651.0
v1.3.2382.0
v1.2.2381.0
v1.1.2233.0
v1.2.2234.0
v1.1.2021.0
v1.2.2022.0
v1.1.1812.0
v1.0.1811.0
v1.1.1671.0
v1.0.1401.0
v0.11.1333.0
v0.11.1251.0
v0.11.1191.0
v0.11.1111.0
v0.11.1121.0
v0.10.781.0
v0.10.761.0
v0.9.433.0
v0.8.10261.0
v0.8.10091.0
v0.7.3451.0
v0.7.3382.0
v0.7.3291.0
v0.7.3252.0
v0.6.3181.0
v0.6.2951.0
v0.6.2911.0
v0.5.2762.0
v0.5.2761.0
v0.5.2681.0
v0.5.2661.0
v0.3.2321.0
v0.4.2342.0
v0.4.2382.0
v0.3.2171.0
v0.3.2142.0
v0.2.1831.0
v0.2.1715.0
v0.2.1703.0
v0.1.1621.0
v0.1.1581.0
v0.1.1502.0
v0.1.1431.0
v0.1.1361.0
v0.1.1093.0
v0.1.1161.0
v0.1.1204.0
experiment-master
v0.1.1025.0
experiment-OutsideBuild
broken-tabstops
RS2-final
v0.1.1002.0
experiment-rel-windows-inbox
experiment-f-ServerApp
v0.1.1211.0
1904.29002
1810.02002
1708.14008
Labels
Clear labels
⛺ Reserved
A11yCO
A11yMAS
A11ySev1
A11ySev2
A11ySev3
A11yTTValidated
A11yUsable
A11yVoiceAccess
A11yWCAG
Area-Accessibility
Area-AtlasEngine
Area-AzureShell
Area-Build
Area-Build
Area-Chat
Area-CmdPal
Area-CodeHealth
Area-Commandline
Area-CookedRead
Area-DefApp
Area-Extensibility
Area-Fonts
Area-GroupPolicy
Area-i18n
Area-Input
Area-Interaction
Area-Interop
Area-Localization
Area-Output
Area-Performance
Area-Portable
Area-Quality
Area-Remoting
Area-Rendering
Area-Schema
Area-Server
Area-Settings
Area-SettingsUI
Area-ShellExtension
Area-ShellExtension
Area-ShellExtension
Area-Suggestions
Area-Suggestions
Area-TerminalConnection
Area-TerminalControl
Area-Theming
Area-UserInterface
Area-VT
Area-Windowing
Area-WPFControl
AutoMerge
Blocking-Ingestion
Culprit-Centennial
Culprit-WinUI
Disability-All
Disability-Blind
Disability-LowVision
Disability-Mobility
External-Blocked-WinUI3
Fixed
Gathering-Data
good first issue
HCL-E+D
HCL-WindowsTerminal
Help Wanted
Impact-Compatibility
Impact-Compliance
Impact-Correctness
Impact-Visual
In-PR
InclusionBacklog
InclusionBacklog-Windows TerminalWin32
InclusionCommitted-202206
Issue-Bug
Issue-Docs
Issue-Feature
Issue-Feature
Issue-Question
Issue-Samples
Issue-Scenario
Issue-Task
Needs-Attention
Needs-Author-Feedback
Needs-Bisect
Needs-Discussion
Needs-Repro
Needs-Tag-Fix
Needs-Tag-Fix
Needs-Triage
No-Recent-Activity
Priority-0
Priority-1
Priority-2
Priority-3
Product-Cmd.exe
Product-Colortool
Product-Colortool
Product-Colortool
Product-Conhost
Product-Conpty
Product-Meta
Product-Powershell
Product-Terminal
Product-WSL
pull-request
Resolution-Answered
Resolution-By-Design
Resolution-Duplicate
Resolution-External
Resolution-Fix-Available
Resolution-Fix-Committed
Resolution-No-Repro
Resolution-Won't-Fix
Severity-Blocking
Severity-Crash
Severity-DataLoss
spam
this-will-be-a-breaking-change
Tracking-External
WindowsTerminal_Win32
Work-Item
zAskModeBug
zInbox-Bug
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/terminal#11788
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sosnik on GitHub (Dec 13, 2020).
Description of the new feature/enhancement
It is not possible to place the cursor with the mouse in any of these shells under Windows Terminal. It is, however, quite possible to do this when running bash with msys2, cygwin or wsl on mintty (or WSL terminal).
This issue was discussed in #4268, where it was dismissed because
I'm not sure I know of any shell application that actually supports that tbh.. This is patently not the case as it is supported in the integrations between bash and mintty (and the same bash as used by mintty is being loaded in Windows Terminal).Mouse support was tracked in #376, #545 and #5177. There was a pull request in #/pull/4859 to close some of these issues, however cursor placement still doesn't appear to work in the applications I listed.
@zadjii-msft commented on GitHub (Dec 14, 2020):
Okay which terminal emulator are you seeing this behavior in? I just tried a plain old conhost with Ubuntu20.04, and I'm not seeing
bashrequest mouse mode.Same thing with Msys
Both these have pretty vanilla setups.
Is there something that you have to set in your
bashrcto configurebashto request mouse mode? Mouse input is a little complicated here. Win32 mouse input doesn't work in the Windows Terminal, but VT-style mouse input should work.@sosnik commented on GitHub (Dec 14, 2020):
cygwin, msys, msys2, and wsltty all use mintty as the terminal emulator. As far as I am aware, there's nothing special in my bash dotfiles. Here is a gif of mouse positioning in cygwin:

Here's one for msys2:

And one for Ubuntu WSL running under mintty:

mintty itself has a setting to place mouse cursor with clicks:

To access this settings pane:
Click Title bar of application running under mintty (e.g. msys) -> Go to Properties > Go to Mouse TabI am assuming this is a feature provided by mintty and not necessarily by bash (compiled for these platforms) because opening
bash.exefrom within cmd (conhost) or through the Windows Terminal application does not produce this result. One would assume that if this was functionality internal to bash, it would work in those other requirements.Therefore, I believe this should be a feature that can be implemented within Windows Terminal.
This is the mintty repo: https://github.com/mintty/mintty
@skyline75489 commented on GitHub (Dec 14, 2020):
Yeah the "Clicks place command line cursor" is the key. I can confirm this with
wsltty.@skyline75489 commented on GitHub (Dec 14, 2020):
In Terminal.app & iTerm2 on macOS, you can hold down option while clicking to jump in the prompt line. I just found out this and I think this is actually a helpful feature.
@sosnik I appreciate the effort for mentioning the implementation of mintty. But due to the licensing difference(WT being MIT and mintty being GPL), it is not legal or ethical for us to use the actual code of GPL-licensed projects. Still I like the feature. I'd like this added to the backlog.
@sosnik commented on GitHub (Dec 14, 2020):
I understand the legal and ethical limitations. I merely wanted to point out the mintty implementation as proof that 'it can be done'.
Nevertheless, let's see what comes of it. I use a mixture of keyboard and mouse for terminal navigation (sometimes mouse is just more convenient when you're using it with a screen magnifier).
@zadjii-msft commented on GitHub (Dec 14, 2020):
Ah okay. So this still isn't a shell feature, it's a terminal one. Glad I wasn't totally off base in #4268.
I'll keep this open to be the "add a setting to allow mouse clicks to send arrow keypresses issue". It's a bit of a wonky setting (IMO), but hey there's prior art we can use for it. I'd wonder how this would interact with something like
vim's visual selection mode with the mouse.I'd probably end up sticking this under the
experimental.namespace, mostly because "this may not work the way you'd expect"@malxau commented on GitHub (Dec 15, 2020):
I'm really curious how this works. Using mintty in git bash, I can see that the mouse click can move the cursor across lines (which blows my mind.) When we'd spoken about this before, the big question I had is how to decide when to emit vertical cursor keys vs. assume a line has wrapped and emit many more horizontal keys. The "correct" answer is application dependent. (Is readline handling mouse clicks itself for this?)
Using SSH so I can have Win32 console processes under mintty, the experience degrades somewhat, because the mouse click can only move the cursor along the same line that it's currently on. It's clearly trying to guess the number of keystrokes to emit and send them to the application though - I used tabs so when it calculated the number of cells to move it didn't match the number of characters seen by the application, and the cursor moved to the wrong place.
@DHowett commented on GitHub (Dec 15, 2020):
Yeah, I am deeply conflicted about this feature. Cool and magical when it works, “something is a bit off” when it doesn’t.
Also, can’t msys2 host win32 processes natively now? They added ConPTY support recently. Why use SSH for that? This may warrant a side thread.
@malxau commented on GitHub (Dec 15, 2020):
@DHowett My fault, I was using an old version of Git for Windows that I had lying around. Using the current version and enabling ConPTY during setup means I don't need to SSH. Without SSH though, results are the same - it only emits keystrokes for navigating around the current line.
@sosnik commented on GitHub (Dec 15, 2020):
mintty manages to incorporate a lot of mouse support indeed. It also intercepts scroll events and will scroll within a console window (like
moreorman) instead of scrolling the terminal output (current behaviour with Windows Terminal). However there are some variations in how interactive console applications are handled by mintty and applications running with it. For instance, cygwin running in mintty works with nodejs repl, msys2 running under mintty doesn't, but msys2 running under Windows Terminal does.There are probably different builds of mintty at work, and perhaps some custom interactions with the shell/rest of the system.
I haven't had occasion to use it before, vim is one place where I'm fully keyboard-based.
@DHowett commented on GitHub (Dec 15, 2020):
at least that one is standardized and an application requests it via
DECSET.@dkaloc commented on GitHub (Jan 21, 2021):
Hi.
Not sure how much relevant this is, but I wrote some tiny shell scripts implementing placing the CLI text cursor on mouse clicks for Zsh running in an xterm-compatible terminal.
The solution is yet undocumented (sorry for that :-)) and kind of brute-force, but as an exchange, you get a script supporting multiline, glyphs of variable widths and prompts (left and right) of any complexities.
Usage. If you are a Prezto user, do the following:
Cheers,
Dusan
PS: Tried hard to also support bash and fish shells, but unfortunately they lack the right tools in their shell program-facing APIs.
@dkaloc commented on GitHub (Jan 21, 2021):
Forgot to mention that the code "steals" your mouse when ZLE is active.
But if it doesn't work for you (and I guess it doesn't), then set the
capture-mouse-in-zleto'no'and:@christianparpart commented on GitHub (Sep 14, 2021):
After reading through almost all of this, because i initially also liked that idea and considered implementing it on my end too, i now think it is absolutely wrong to implement that on the terminal emulator end.
That is what the mouse reporting protocols are there for and it is the applications duty to make use of them instead of having the terminal emulator trying to brute force through them. I think it should rather be sent out a feature request to the shells/libs (fish, bash, libreadline, libedit,, maybe zsh for first-class support) to make use of the existing mouse reporting VT sequences to get that. :-)
@malxau commented on GitHub (Sep 14, 2021):
I may be missing something, but can you elaborate a bit more on how this would work?
AFAIK, the issue is that once an application requests mouse sequences, the terminal stops processing mouse sequences. That includes things like selection and scrolling. In the past (with conhost) I went down the "boil the ocean" route of trying to re-implement these features, which isn't ideal and leaves a real tension between two components trying to do the same thing and doing them slightly differently. With Terminal that isn't possible, because it doesn't expose the viewport (so no scrolling, see #10191 ), and there's no ability to read back buffer contents outside of the viewport, so selection doesn't work well either.
I think making this work would require fine grained mouse control specification, where an application can say things like "hey terminal, please tell me about mouse clicks, but please continue to handle mouse drag or scroll the way you previously did."
@christianparpart commented on GitHub (Sep 14, 2021):
Ah yes! You're perfectly right. I forgot about users may still want to be able to select some text in the main page area or scrollback buffer as well as having the ability to still scroll via mouse wheel events of course. That sounds conflicting, right - but so does the other way as already mentioned for example how to deal with cursor presses in relation to apps like vim/emacs etc.
So both ideas are conflicting on their own end - and - in the end both are heavily underspecced. Just like mouse selection and viewport scrolling is not part of the VT standard (mouse event interception though is!).
Although, most terminal emulators do support suppressing any activated mouse protocol by also pressing an additional modifier key (such as Shift) so users can press buttons regardless of the VT mouse protocol states.
If the modifier-solution is not enough, I think the only thing I can do to say how I would start approaching towards that goal, that is, by starting to communicate with other TE devs (from other TEs) and see if we can find a common ground that everybody agrees to and can be implemented.
That being said, I still think forcing the TE frontend to generate cursor move VT input sequences is wrong, because we already expose mouse protocol to the app side, so it should stay at the app side.
How to solve the task to be able to let the user use the mouse for grid cell selections / viewport changes without modifier and regardless of the mouse protocol being activated?
IIRC we have the following mouse modes:
All these modes currently de-facto cause any mouse selection (without supress-modifier) to be directly passed to the app and will not be handled on the TE side.
What we want is a mode that causes the latter behavior to not happen, that is, whatever mouse protocol the app wants to use, and by default (!) then suppresses TE handling. I now propose a new DEC mode (whatever free number is available) that tells the TE to not suppress mouse handling on the TE-side when mouse tracking is enabled.
The presence of such a feature can be easily detected using
DECRQM, enabled/disabled viaSM/RMand should be handled in at leastRISas well.Now an app such as bash/zsh/fish/... can enable mouse tracking AND enable that imaginary DEC mode I mentioned above to avoid the TE to suppress evaluating the mouse events (i.e. both ends are receiving/handling the events), whereas the app side (e.g. the shell) can use that to see if the mouse press event for example has actually happened inside the command prompt region, and if so, can move the cursor to that coordinate.
One side note would probably be, that mouse events are only to be received for the main page area (i.e. not the scrollback area).
p.s.: That imaginary mode should not necessarily mention that - if enabled - it will suppress mouse handling on the terminal side (should it?) but rather say that this is a only "passively" listening to these events, because it's not actively handling every mouse events (like in vim) but rather only when inside the shell's active prompt line. The TE then can use this information to indeed not disable own mouse handling. -- That's just how I would propose the wording for such a DEC mode.
p.p.s.: Sorry for the wall of text, and sorry, it's not meant to sound educational, I just didn't know how sparse or detailed I should reply to your question. :-)
@christianparpart commented on GitHub (Sep 14, 2021):
To that I wanted to add that the terminal did not seem to have any kind of scrollback but only pages (which work differently!), so the concept of scrollback and viewport is a new one. The app also can only modify the contents of the (main) page area(s). Adding VT sequences to cause the viewport to be changed would require a little more effort (e.g. the app would also need to know about the number of lines in the scrollback, ideally). I am not sure that would be actually anyhow helpful IMHO. :)
@zadjii-msft commented on GitHub (Sep 14, 2021):
I really like this idea. I probably don't have the cycles to really think through if there would be any issues with this design, but it seems like a good idea to me. It could work in tmux, it'll work over ssh, it'll work regardless of font size, those are usually the things that come to mind. Usually I'd hit up @j4james and @egmontkob for consensus on these types of things (RIP terminal-wg) based on their breadth of experience
@j4james commented on GitHub (Sep 14, 2021):
I'm not a fan of inventing new functionality like this, because it's so easy to get wrong. You often end up with something that only works for your one specific use case, which leads to someone else implement something slightly different that meets their needs, and before you know it you've got a half a dozen new modes doing almost exactly the same thing (just look at all the existing mouse modes to see how that pans out).
So the first thing I'd want to know was if you could achieve what you want using existing functionality. I haven't done much work with the DEC locator sequences, but I was wondering whether perhaps the filter rectangle could be of use for this sort of thing. The idea being that you would set a filter to track the areas of the screen in which you want to take control of the mouse, and when the mouse enter your area you enable mouse capture, and when it leaves your area you disable the mouse capture.
I don't know if the filters can actually be used that way, but that's the first thing I'd want to try.
@softworkz commented on GitHub (Oct 14, 2021):
This is the one feature that I'm missing the most in WT.
A possibly useful information: ConEmu can do this as well.
And it has a BSD3 license..
@DHowett commented on GitHub (Oct 14, 2021):
Our disagreement is not over finding an implementation, it's about whether it is worth implementing given the risks, downsides and opportunity for confusion. 😄
@softworkz commented on GitHub (Oct 14, 2021):
You mean "confusion" at the user side?
How could it be confusing that the cursor is getting repositioned on click, like everywhere else on Windows?
PS: I don't understand the hiding of the comments above.
@zadjii-msft commented on GitHub (Oct 14, 2021):
The whole thread is full of examples of weird edge cases where the user might be confused by what happens. It's not necessarily as simple as "just move the cursor there". Cool and magical when it works, “something is a bit off” when it doesn’t.
In general, we tend to minimize comments like that because it basically amounts to a "+1" in the midst of a thread that's otherwise filled with productive conversation on the details of how we might actually implement this.
@softworkz commented on GitHub (Oct 14, 2021):
There was a conversation about mintty at the top and it was mentioned that it can't be looked at due to it's licensing.
Then @j4james was talking about risks and how easy it would be to get it wrong, which looked like this subject might have gotten stalled.
That's why I had posted the reference to ConEMU. No matter how good you're considering and relying on your own skills: taking a look at an implementation that is confirmed to be working well, does for once provide proof that it can be done without/low risk and might also give some inspiration or ideas.
I didn't want to turn this into a mee-too feature-voting conversation, I guess I shouldn't have written the first sentence.
@j4james commented on GitHub (Oct 21, 2021):
I just realised that one approach to implementing this would be using the Final Term prompt markup sequences supported by iTerm2 and others (for the details, search for
FTCSin the iTerm2 documentation).If a shell has been configured to output those sequences, a terminal should be able to determine exactly which area of the screen is within the active command line, so if we see a mouse click in that range, it's probably safe to send the appropriate key sequences to move the cursor (possibly still as an optional feature).
It's also worth noting that the Final Term sequences have been discussed before as a solution to issues #6232 and #9881, so there are multiple benefits we can get from this approach.
@KalleOlaviNiemitalo commented on GitHub (Jan 11, 2022):
If the user has pressed Ctrl+V Ctrl+G in a shell to type the BEL control character, and the shell displays that as
^Gbut treats it as a single character for line editing, how can the terminal know that it needs to send just one arrow-key event to get past that character, rather than two?@zadjii-msft commented on GitHub (Jan 11, 2022):
That's a great example of an edge case where I would expect this to not work correctly.
@j4james commented on GitHub (Jan 11, 2022):
Just checked how Mintty handles it, and it looks like it just gets everything off by one (or more if you've got multiple instances of those characters). Technically I think we could potentially correct for that sort of thing, because we know exactly where the cursor is, so we can adjust how many keypresses we send based on where the cursor ends up.
@zadjii-msft commented on GitHub (Jan 11, 2022):
Some tips, courtesy of @Tyriar
Impl: https://github.com/xtermjs/xterm.js/blob/master/src/browser/input/MoveToCell.ts
@con-dog commented on GitHub (Jan 13, 2022):
VSCode for me is able to move the cursor with alt+click on any terminal I've tried, though admittedly there is weird behaviour that sometimes clears the line completely and leaves a [C or [D
@Suncatcher commented on GitHub (Jun 22, 2022):
Agree. I see no reason why we cannot grab that piece of code and port this functionality from VSCode, provided it were open-source
@zadjii-msft commented on GitHub (Jun 22, 2022):
I literally linked the VsCode implementation just two comments above: https://github.com/microsoft/terminal/issues/8573#issuecomment-1010137633. I worry that there'll be plenty of edge cases where this doesn't work as expected, but maybe that's not a reason to reject it entirely. I'd certainly be interested if someone could take that vscode example and translate it to the Windows Terminal (under an experimental setting for now).
TermControlandControlCoreare probably the parts of the code that would likely need to be responsible for handling this. If anyone's interested, @ me in this thread and I can try and give more tips of where I'd start.@christianparpart commented on GitHub (Jun 22, 2022):
To be fair, I think that implementing such a thing in a terminal emulator in the suggested way is not how it should be done. Instead, an application (this includes bash and ZSH) should utilize the already existing protocols, to receive mouse click events. Having that implemented in a shell instantly enables this functionality in all terminals utilizing mouse support. Implementing such a feature the other way around would be wrong, in my opinion (if that matters).
Programs like vim and emacs are doing that for decades, a shell is no different (from the TEs point of view).
@zadjii-msft commented on GitHub (Jun 22, 2022):
FWIW, from a purely technical standpoint, I totally agree. I'd wish there was a better way for a shell to request sensible mouse input, and I love your proposal.
I also don't want the perfect to be the enemy of good - if someone wants to contribute this as a workaround while "the maintainers formerly known as Terminal WG" discuss an ideal solution, I'm fine taking that as an "experimental" feature. Never describing it as anything more than "something that will have a lot of edge cases".
I've got a fixation myself to do the rest of the final term sequences soon (#11000), but even those aren't perfect.
cmd.exedoesn't have a way for us to emit something equivalent topreexec, nor can it get the error level at the prompt, so it'd be limited to133;Aand133;B. Maybe if we're thinking of tying this with the final term feature, we could at least limit mouse clicks to the region [wherever the last133;Bwas, the end of the viewport]. I suppose even in bash, that is all there would be for the current active prompt. Okay I talked myself into that.@softworkz commented on GitHub (Jun 22, 2022):
This is probably the only ever GH conversation where I'm writing as a pure user rather than a developer and I also learned above that user comments are undesired, but I'd still like to add that - even though I very well understand the motivation for perfection - it would be an improvement of incredibly high value for average users of the terminal who are using it for nothing more than issuing cmd or PS commands, which surely makes the largest share of use cases. Many of the advanced capabilities of the terminal are targeting a relatively small audience and use cases, especially when including WT as replacement to the legacy command prompt.
Even as advanced user and developer (7 years MS MVP for Windows API and C++), very few of the many planned or discussed terminal-level features are of much interest. On the other side, it happens every second or third day that I wish I could position the cursor in the terminal somewhere inside a lengthy command instead of spending time moving the cursor with left/right all the way through to the right position.
It doesn't need to work in all possible cases. When it would just work in the very most simple case, which is going back to a previous command (w up/down) and then positioning the cursor somewhere inside this command to make modifications - that alone would be a huge value for everyday use - and for a wide range of users.
@zadjii-msft commented on GitHub (Jun 22, 2022):
FWIW, we take comments like the above into account, but hide them because of the visual noise they add to the thread. IMO, in the middle of the technical discussion of how to implement this, it's best to collapse comments reiterating a desire for the requested feature. Sorry, we certainly meant no offense!
@softworkz commented on GitHub (Jun 22, 2022):
Sometimes, dev discussions need a little tear-down "back to earth and reality". That was my impression while following the discussion and my motivation for posting the above. I removed my last sentence and you might want to hide this and your previous comment to avoid "pollution" :-)
@DHowett commented on GitHub (Jun 22, 2022):
Naw, you're totally right. Thanks for bearing with us!
@zadjii-msft commented on GitHub (Feb 24, 2023):
x-linking a thread that looks relevant: "Passive Mouse Tracking & Text Selection Tracking VT extensions.", terminal-wg/specifications#31
@christianparpart commented on GitHub (Feb 24, 2023):
@zadjii-msft this is exactly what I was aiming for, while the spec I wrote it as general purpose as it can get, I also wrote a small sample CLI app to demo the event reporting. If you find design flaws, please /cc me in any way. :)
@zadjii-msft commented on GitHub (Jul 12, 2023):
huh, just noticed this block on invisible-island
and also on https://github.com/mintty/mintty/wiki/CtrlSeqs#readline-mouse-modes
did this get added to xterm while no one was looking?
@j4james commented on GitHub (Jul 12, 2023):
I think that stuff has existed for years - it's only just been documented recently. And I think it was (possibly still is) behind a build flag, so maybe wasn't enabled by default.
@GaryAtlan82 commented on GitHub (Jul 20, 2023):
This has been a long issues of mine, my sentiments are the same as @softworkz.
I am still fairly new to this opposing Terminal vs GUI world. I really dont like seeing them as two diametrically oppossed approaches to using a PC and have been trying to reduce this friction as much as I can.
This feature is really at the core of this friction. A universal means of setting cursor position and even selecting words, regardless of the underlying client, would be such a watershed momment.
You guys have done some amazing stuff with windows terminal, I know you will achieve this too.
@zadjii-msft commented on GitHub (Jul 20, 2023):
The dumbest possible solution: Only emit keys WHEN:
and even then just blindly emit one arrow key per cell. Literally as dumb as possible.
Does it work for wrapped lines? Nope.
Does it work for
vim? Nope.Does it work for emoji/wide glyphs? I mean, emoji input is fucked anyways, right?
Does it do selections? Nope.
Lines with continuation prompts? As long as you don't click on the
>, sure?In VT mouse mode? Don't do it. The app wanted mouse.
Pressed
shift? Don't do it. Make a selection.I hate that I feel okay with this. Like, yes, yes, the shell should handle this, there's so many ways for it to not work, but like... idk. Now that I see it in action... it seems more okay. We could probably round out some of the edge cases to make it a little more accurate.
Maybe just cause I'm high on shell integration so anything that looks like an application for it, I'm like YEA LET'S DO IT. I need an unbiased opinion.
This means it requires shell integration to be enabled. ↩︎
@j4james commented on GitHub (Jul 20, 2023):
I think this is perfectly reasonable. Tying it to the active command makes it feel a lot safer than just triggering it on arbitrary clicks. I'd even go so far as to say that we could probably accept clicks on any line from the active command mark and below (assuming the cursor is also past the active command mark).
@softworkz commented on GitHub (Jul 20, 2023):
If it doesn't work for wrapped lines, it's not much useful, because it's those wrapped lines where it 's most tedious to navigate to a specific position via cursor keys.
@zadjii-msft commented on GitHub (Aug 23, 2023):
I'm tempted to call this closed by #15758 - I'm not sure what more we'd do here.
I'm also not sure I'd know when to call this not experimental. It's like, pretty definitively not going to work all the time, so I want that to be clear. But it does work most of the time?
@christianparpart commented on GitHub (Aug 29, 2023):
@zadjii-msft while I am aware that this might be the most straight forward solution in terms of getting it quickly done, it comes with its caveats, as very well known.
Some months ago, I was drafting a potentially better solution and also gathered some feedback from @jerch, textshell and others directly or over there on IRC.
What would you think about a solution such as:
This should probably not change the decision on closing this ticket here, but I'd like to raise your interest in thinking more forward for a potential better solution.
NB: I've experimentally implemented the above proposals on my TE end along with a simple CLI example. But shells so far (the one I asked for) is still a little conservative on change, but that's nothing new to me. Looks like I'll also end up implementing a shell, eventually :)
@softworkz commented on GitHub (Apr 3, 2024):
I think there's a bunch of things left to do:
(it's currently neither in in https://aka.ms/terminal-profiles-schema nor in https://aka.ms/terminal-profiles-schema-preview)
After half an hour, I still haven't figured out how to enable it. The docs are pointing to "How to enable shell integration marks", but this page is only talking about "marrks on scrollbar", "right-click menu" and "automarkPrompts".
Seriously: I want none of that. I also don't want to modify the prompts, nor even deal with this in any way. I just want to be able to "click to position the cursor" - that's all. How to do it without messing around with those things?
It is currently hidden deeply amongst a hundred of features, most of which I had never thought of anybody would ever want or need, while this is the single most important one of all (IMHO)
Note: I got it working a while ago on a different machine with the preview, but it took me a long time to get there and I don't remember what I did. It's incredibly painful, having to deal with changing the prompts (even though I don't want to change them actually).
But what I can say from the time where I had it working: It's all fine they way it is and how it works. None of those cases you are frequently talking about - where it doesn't work - is of any interest or will ever be of any interest to me with regards to this feature.
IMO it's all good, except the way for enabling it.
@sarim commented on GitHub (Apr 3, 2024):
It is called experimental because it is experimental. Few weeks ago I tried to use it, but its unstable for daily usage. It frequently hanged the terminal by putting itself in infinite loop of sending left arrow keystroke, activate itself while trying to copy text by left click and dragging etc... I didn't had the time to debug so stopped using it for now. Will try to debug and report issue when I get the time.
Should be fixed when #16652 lands.
@zadjii-msft commented on GitHub (Apr 3, 2024):
(as mentioned above: https://github.com/microsoft/terminal/issues/8573#issuecomment-2035197181)
Yea, I think I've lined out at length in this thread why I believe that this needs to remain an "experimental" feature. A permanent one, but one that's got enough edge cases that the average user will likely run into one and not understand why.
Already done in #16809
I've got designs of my own to make "automatic shell integration" work, in the same vein as the way VsCode does. That however, is far beyond the scope of this thread. #13445 is probably the closest in spirit, though I'll probably fork off a dedicated thread when that gets closer to landing. I'd much rather keep threads more tightly coupled with atomic bits of work, and I'm not about to hold this one open, waiting on some piece of work that can be done independently.
@christianparpart Sorry I missed that comment! I don't even think I was on vacation or anything, so I have no idea how it slipped by. Passive mouse tracking looks great for shells that can support it. I think this is a good example of "yes, and" - passive mouse tracking is better for the shells that can support that. For crochety old men like me who like CMD, then I'll have to make do with this experimental mode
wait
can we have OpenConsole just opt in to passive tracking? Like, always send openconsole passive events, if we're not in VT mouse input mode? This is a half backed thought. But maybe there's a way for us to know that
I'd need think on that for a while. Feels like the dough is under-proved on that thought.
@softworkz commented on GitHub (Apr 3, 2024):
Awesome!
Yea sure, I didn't mean to say this needs to be kept open, I was merely afraid that this might remain an unknown and forgotten feature, which is hardly accessible and lastly will make me hate all this each time I'm on a different machine ;-)
Would you kindly help me out with what exactly I need to do to enable this for cmd and PowerShell without changing anything else (it's all at defaults)?
And maybe add it to the docs page to which the text about the setting is linking to but which doesn't even mention it and neither discriminates which modification is needed for which feature exactly.
@cow1337killer3 commented on GitHub (Apr 29, 2024):
Wow it's 2024 and we still can't move a terminal cursor up and down. Welcome to the future, it's mind blowing.
@zadjii-msft commented on GitHub (Apr 29, 2024):
@cow1337killer3 If you read the thread, you'll probably learn how that's a responsibility of the shell, not the terminal emulator itself. Up is pretty universally "go to the previous command in the history" across shells. And as discussed, we'd all love for the shells to support clicking to move the cursor in the prompt themselves, but there's myriad reasons why that's Hard. That's why the terminal added this feature to attempt to work around that issue.
@vblazhkun commented on GitHub (Dec 12, 2024):
I guess the following behaviour is related to this feature. When I click with the
LMBin any console app waiting for an input (ssh-keygen,cat, etc.) the whole screen is filled with^[[Daka\x1b5b44:And it infinitely fills up with just 2-3 consecutive clicks.
@DHowett commented on GitHub (Dec 12, 2024):
Yes. If you don't have shell integration enabled to indicate where your prompt starts/ends and you are trying to use this feature (which is not enabled by default! for this reason!) you may see an unexpected spew of cursor positioning input.
@vblazhkun commented on GitHub (Dec 12, 2024):
I have the shell integration enabled (all 4 escape sequences implemented) and its markers are visible on the right side of the screenshot.
@cow1337killer3 commented on GitHub (Jan 10, 2025):
Yup I understand that, but what I've been wondering is why there can't just be a fully-featured command line GUI. It would basically just be a textarea that relays every keystroke to an underlying terminal instance, and then outputs anything the terminal spits out into a display window. For example, someone could make an Electron app, code everything in JavaScript, then just have the app start its own PowerShell/terminal process that it relays input/output to between the GUI, using some kind of IPC.
I mean, I originally thought this was the design/intent of Windows Terminal (I'm not familiar with how it's constructed). If you just relay the keystrokes, translate mouse actions into cursor/selection commands, and relay the output, you can do anything you want with the GUI pretty easily. Like with Electron you can use the Selection API, listen for
selectionchangeevents, then update the underlying terminal's cursor and selection using PSReadLine. Could also do drag and drop text.@jerch commented on GitHub (Jan 10, 2025):
@cow1337killer3
What you describe considers only the screen output side of a terminal ("GUI") and misses one crucial aspect - that part of a terminal is only a text canvas device for the active application (e.g. a shell), which is in fact in operative control. In that sense a terminal (emulator) is just a "textual graphic card", which receives drawing primitives for text output. Now you can ask yourself, whether you'd ask a graphics card vendor to implement drag&drop functionality, or ask instead the application, that is responsible for the content in the first place and knows all about the content's semantics.
@Cufoon commented on GitHub (Sep 3, 2025):
OK, I’ve read through the issue comments. I’m not particularly attached to using mouse clicks. In fact, I was thinking that we could provide a method—such as a multi-line command line editor—for editing long commands. For example, pressing Ctrl + Enter could pop up a dedicated command editor, and I could input the command after clicking "Confirm" or "Submit" in the pop-up. This approach would eliminate the need to manage mouse events and offer better compatibility. Additionally, it could be applied in any scenario that requires text input.
@sosnik commented on GitHub (Sep 3, 2025):
@Cufoon That would be a very hacky partial solution - one which we can already accomplish by copy-pasting the command line into a text editor or text input field (like opening another Windows Terminal with
WIN+~). The UX would not be great.On top of that, you wouldn't get any terminal completions in your multiline edit box, and you'd need to intelligently treat newlines and text-wrapping, as well. In many shells it is perfectly legitimate to enter a multiline command by leaving a
\at the end of the line. Does this 'multiline edit area' then strip all these slashes? But what if you're running a for-loop (etc) where the backslash is not needed?@softworkz commented on GitHub (Sep 4, 2025):
I like the feature! But what I said above still stands:
It's still unclear what exactly is needed for this feature to work properly and what not. I understand that configuration is required from several sides, but this is not directly clear for many users and especially it's hard to understand why and when the behavior is not exactly as expected.
As far as I understand, the feature requires prompts to be marked in order to determine whether a mouse click is inside or outside of a prompt.
BUT: When prompts are not being marked - the feature is still acting upon mouse clicks - but with side effects:
^[[D(like @vblazhkun reported above)
Suggestion
In those cases, the feature implementation is surely aware that there is no prompt marking enabled.
So it should display a warning (once per session) like:
"The cursor repositioning feature is enabled, but there's no prompt marking. Without prompt marking, you may experience undesired side-effects like [...]. Please make sure to enable 'autoMarkPrompts' or adjust the prompt according to the documentation at https://....."
Improve Documentation
The documentation currently states that the "reposition cursor" feature requires "Shell Integration" to be enabled.
The Shell Integration page is a long article, but from my experience, it is NOT REQUIRED to do all the things that are described on this page.
All I had to do was:
"autoMarkPrompts": trueto the settings.json filesetx PROMPT $e]133;D$e\$e]133;A$e\$e]9;9;$P$e\$P$G$e]133;B$e\for CMDI didn't need to make any changes to any powershell profile or bash profile files on WSL
It would be great when the documentation would be more clear about what's really needed and that those painful profile changes are not required at all.
Thanks
@Cufoon commented on GitHub (Sep 4, 2025):
Indeed, you are quite right. This is a rather hacky approach and it does lead to the inability to perform command auto-completion. Regarding the issue you mentioned about multi-line backslashes, it could be automatically converted to a single line or retain the backslashes after confirmation in this "editor". This is a matter of choice in behavior. As for the auto-completion issue, the need to switch the cursor position by mouse click often arises when I have a very long command and there is a problem at a certain position that needs to be modified, or when I have a batch of commands where only the beginning parts are different. In such cases, mouse clicking rather than holding down the left and right arrow keys, or using the vim mode for editing, is the fastest and most convenient way. However, from the context of this discussion, it seems that supporting this feature requires the shell and terminal to work together well. In the case where such cooperation is difficult to achieve, I think providing such a method is not a bad idea. It's like a single-line text box where we can allow it to pop up a large input box for content entry. I think this interaction is quite reasonable. Of course, I have methods, such as copying the command to a real editor for editing and then copying it back to execute. This is certainly feasible. In the past few years, I have always copied a long command to VSCode, edited it there, and then copied it back to execute. But I'm fed up with this. The experience is too bad. I don't want to shuttle between two software, and I don't want to close the temporary file in VSCode when I close VSCode. This is too bad. If that's the case, I might as well just use the built-in terminal in VSCode.
@nffaruk commented on GitHub (Jan 13, 2026):
@softworkz that minimal set of changes required for the integration that you suggested doesn't work for me with WSL Ubuntu with bash shell. Can you share what your bash prompt is set to?
@softworkz commented on GitHub (Jan 13, 2026):
@nffaruk - As you can read above, I have asked several times about it and it remained unanswered, neither documented (last time I looked at it).