René's URL Explorer Experiment


Title: fix: Windows Terminal Shift+Enter 无法换行 — 改用动态 modifier 位解析 by dengmik-commits · Pull Request #70 · lessweb/deepcode-cli · GitHub

Open Graph Title: fix: Windows Terminal Shift+Enter 无法换行 — 改用动态 modifier 位解析 by dengmik-commits · Pull Request #70 · lessweb/deepcode-cli

X Title: fix: Windows Terminal Shift+Enter 无法换行 — 改用动态 modifier 位解析 by dengmik-commits · Pull Request #70 · lessweb/deepcode-cli

Description: 问题 Windows Terminal 下 Shift+Enter 无法换行,行为等同于普通回车,直接提交输入。 此问题在 #52 (e56a112) 中曾尝试修复,当时添加了 enableTerminalExtendedKeys(xterm modifyOtherKeys level 1)和两个额外序列(�[13;2~、�[27;2;13~)。 #52 为什么没修好 根本原因是 SHIFT_RETURN_SEQUENCES 使用精确字符串匹配(Set.has())来比对 modifier 值。xterm 标准中 Shift 修饰键 = 2,序列为 �[13;2u。但 Windows Terminal 会在 modifier 上附加额外的标志位,实际发送的序列是: �[13;130u (modifier = 130 = 128 + 2) 其中 128 是终端特有的标志位。130 & 2 === 2,Shift 确实被按下了——但精确字符串 �[13;130u 不在 Set 中,被视为未知转义序列,key.meta 被设为 true,按键被静默丢弃。 此外,仅靠 xterm modifyOtherKeys(�[>4;1m)不够——Windows Terminal 需要 Kitty 渐进增强协议(�[>1u)才会以 CSI 格式上报修饰键。 修复内容 改动两个文件: src/ui/prompt/useTerminalInput.ts isShiftReturn(raw) — 动态解析 CSI 序列,提取 modifier 参数,用 (mod & 2) !== 0 按位检测 Shift。不关心 terminal 附加的其他标志位,能匹配 2、6、130 等任意包含 Shift 位的 modifier 值。 isReturn(raw) — 识别任意 CSI 格式的 Enter(�[13u、�[13;\d+u 等),兜底处理终端将 Enter 转义为 CSI 格式的情况。 两个函数都优先回退到已有的 SHIFT_RETURN_SEQUENCES 和 META_RETURN_SEQUENCES Set,保证向后兼容。 key.return 检测简化为 isReturn(raw),key.shift 检测使用 isShiftReturn(raw)。 src/ui/prompt/cursor.ts enableTerminalExtendedKeys() 同时发送 xterm modifyOtherKeys(�[>4;1m)和 Kitty 渐进增强(�[>1u)。终端会忽略不认识的序列,同时发送两者安全无副作用。 disableTerminalExtendedKeys() 发送对应的关闭序列(�[>4;0m + �[

Open Graph Description: 问题 Windows Terminal 下 Shift+Enter 无法换行,行为等同于普通回车,直接提交输入。 此问题在 #52 (e56a112) 中曾尝试修复,当时添加了 enableTerminalExtendedKeys(xterm modifyOtherKeys level 1)和两个额外序列(�[13;2~、�[27;2;13~)。 #52 为什么没修好 根本原因是 SHIFT...

X Description: 问题 Windows Terminal 下 Shift+Enter 无法换行,行为等同于普通回车,直接提交输入。 此问题在 #52 (e56a112) 中曾尝试修复,当时添加了 enableTerminalExtendedKeys(xterm modifyOtherKeys level 1)和两个额外序列(�[13;2~、�[27;2;13~)。 #52 为什么没修好 根本原因是 SHIFT...

Opengraph URL: https://github.com/lessweb/deepcode-cli/pull/70

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:864840ff-b628-b7ed-ec3d-4f00ca62f1e5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB3F6:3566AB:286A99:3623CC:6A4D8A1F
html-safe-nonce382717b65362d8d60e3963b256c2c20b16076c2a17b69000f4eaad4300879ea1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0Y2OjM1NjZBQjoyODZBOTk6MzYyM0NDOjZBNEQ4QTFGIiwidmlzaXRvcl9pZCI6Ijc3NDQyMDI0MjU5MzA0NTE0ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7555474c3ad4de2c14283c753cde60361e3d6fedc0c8af3d24ec991daf201368
hovercard-subject-tagpull_request:3687097554
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/lessweb/deepcode-cli/pull/70/files
twitter:imagehttps://avatars.githubusercontent.com/u/270912164?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/270912164?s=400&v=4
og:image:alt问题 Windows Terminal 下 Shift+Enter 无法换行,行为等同于普通回车,直接提交输入。 此问题在 #52 (e56a112) 中曾尝试修复,当时添加了 enableTerminalExtendedKeys(xterm modifyOtherKeys level 1)和两个额外序列(�[13;2~、�[27;2;13~)。 #52 为什么没修好 根本原因是 SHIFT...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git
octolytics-dimension-user_id118287711
octolytics-dimension-user_loginlessweb
octolytics-dimension-repository_id1223512305
octolytics-dimension-repository_nwolessweb/deepcode-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1223512305
octolytics-dimension-repository_network_root_nwolessweb/deepcode-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebffd5484f01713a661b03469b77678f72b6574ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/lessweb/deepcode-cli/pull/70/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flessweb%2Fdeepcode-cli%2Fpull%2F70%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flessweb%2Fdeepcode-cli%2Fpull%2F70%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=lessweb%2Fdeepcode-cli
Reloadhttps://github.com/lessweb/deepcode-cli/pull/70/files
Reloadhttps://github.com/lessweb/deepcode-cli/pull/70/files
Reloadhttps://github.com/lessweb/deepcode-cli/pull/70/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/70/files
lessweb https://github.com/lessweb
deepcode-clihttps://github.com/lessweb/deepcode-cli
Notifications https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Fork 151 https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Star 1.7k https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Code https://github.com/lessweb/deepcode-cli
Issues 43 https://github.com/lessweb/deepcode-cli/issues
Pull requests 22 https://github.com/lessweb/deepcode-cli/pulls
Actions https://github.com/lessweb/deepcode-cli/actions
Projects https://github.com/lessweb/deepcode-cli/projects
Security and quality 0 https://github.com/lessweb/deepcode-cli/security
Insights https://github.com/lessweb/deepcode-cli/pulse
Code https://github.com/lessweb/deepcode-cli
Issues https://github.com/lessweb/deepcode-cli/issues
Pull requests https://github.com/lessweb/deepcode-cli/pulls
Actions https://github.com/lessweb/deepcode-cli/actions
Projects https://github.com/lessweb/deepcode-cli/projects
Security and quality https://github.com/lessweb/deepcode-cli/security
Insights https://github.com/lessweb/deepcode-cli/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Flessweb%2Fdeepcode-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli%2Fissues%2Fnew%2Fchoose
qorzjhttps://github.com/qorzj
lessweb:mainhttps://github.com/lessweb/deepcode-cli/tree/main
dengmik-commits:mainhttps://github.com/dengmik-commits/deepcode-cli/tree/main
Conversation 1 https://github.com/lessweb/deepcode-cli/pull/70
Commits 3 https://github.com/lessweb/deepcode-cli/pull/70/commits
Checks 0 https://github.com/lessweb/deepcode-cli/pull/70/checks
Files changed https://github.com/lessweb/deepcode-cli/pull/70/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/70/files
fix: Windows Terminal Shift+Enter 无法换行 — 改用动态 modifier 位解析 https://github.com/lessweb/deepcode-cli/pull/70/files#top
Show all changes 3 commits https://github.com/lessweb/deepcode-cli/pull/70/files
f3554df fix: add Kitty keyboard protocol Shift+Enter sequences for broader te… dengmik-commits May 15, 2026 https://github.com/lessweb/deepcode-cli/pull/70/commits/f3554dfedc321c67fe676ce593f98c38e816576b
bbc1ed5 merge upstream v0.1.20 dengmik-commits May 15, 2026 https://github.com/lessweb/deepcode-cli/pull/70/commits/bbc1ed5d9b3a9fbcb08f32a4fcb0684de140b5cc
efde004 fix: use dynamic modifier parsing for Shift+Enter recognition dengmik-commits May 15, 2026 https://github.com/lessweb/deepcode-cli/pull/70/commits/efde004299e5892b132412845d5a3f08e13242d2
Clear filters https://github.com/lessweb/deepcode-cli/pull/70/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/70/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/70/files
promptInputKeys.test.ts https://github.com/lessweb/deepcode-cli/pull/70/files#diff-713c9278b038b90666b32d319cdbd3247c31a5f96d4596a3a0785cd97a1eb847
cursor.ts https://github.com/lessweb/deepcode-cli/pull/70/files#diff-1ef2f1b44b73fcee13bf52cbed9f13f7185ba0217976531d8e3e1fd6c95dc5be
useTerminalInput.ts https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
src/tests/promptInputKeys.test.tshttps://github.com/lessweb/deepcode-cli/pull/70/files#diff-713c9278b038b90666b32d319cdbd3247c31a5f96d4596a3a0785cd97a1eb847
View file https://github.com/dengmik-commits/deepcode-cli/blob/efde004299e5892b132412845d5a3f08e13242d2/src/tests/promptInputKeys.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/70/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-713c9278b038b90666b32d319cdbd3247c31a5f96d4596a3a0785cd97a1eb847
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-713c9278b038b90666b32d319cdbd3247c31a5f96d4596a3a0785cd97a1eb847
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-713c9278b038b90666b32d319cdbd3247c31a5f96d4596a3a0785cd97a1eb847
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-713c9278b038b90666b32d319cdbd3247c31a5f96d4596a3a0785cd97a1eb847
src/ui/prompt/cursor.tshttps://github.com/lessweb/deepcode-cli/pull/70/files#diff-1ef2f1b44b73fcee13bf52cbed9f13f7185ba0217976531d8e3e1fd6c95dc5be
View file https://github.com/dengmik-commits/deepcode-cli/blob/efde004299e5892b132412845d5a3f08e13242d2/src/ui/prompt/cursor.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/70/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-1ef2f1b44b73fcee13bf52cbed9f13f7185ba0217976531d8e3e1fd6c95dc5be
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-1ef2f1b44b73fcee13bf52cbed9f13f7185ba0217976531d8e3e1fd6c95dc5be
src/ui/prompt/useTerminalInput.tshttps://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
View file https://github.com/dengmik-commits/deepcode-cli/blob/efde004299e5892b132412845d5a3f08e13242d2/src/ui/prompt/useTerminalInput.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/70/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
https://github.com/lessweb/deepcode-cli/pull/70/files#diff-f6c0e8110e67628fb13983eab6e596fb5615a429b47b89469c24555f64d90b26
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.