TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

jwz: Apple recently broke Ctrl-Y

120 点作者 michaelty超过 13 年前

13 条评论

prawn超过 13 年前
"Update: Holy shit! I am told that this bug was fixed FIVE HOURS after I posted this -- Webkit bug 73888 [1] and the patch [2]. Thanks, Alexey!"<p><pre><code> 1. https://bugs.webkit.org/show_bug.cgi?id=73888 2. https://bug-73888-attachments.webkit.org/attachment.cgi?id=117988</code></pre>
natesm超过 13 年前
HOKAY. So you can totally do this:<p>&#62; I'm guessing there's no easy way to replace the definition of the deleteToEndOfParagraph: action with something else...<p>with DYLD_INSERT_LIBRARIES and method_exchangeImplementations (and maybe launchd to apply that DYLD_INSERT_LIBRARIES to everything?).<p>What you have to do is:<p>Implement a category message that does what you want (my_deleteToEndOfParagraph:).<p>Write a function that uses method_exchangeImplementations to replace deleteToEndOfParagraph: with my_deleteToEndOfParagraph:. deleteToEndOfParagraph: probably depends on class (NSTextView, NSTextField, WebView, etc.)<p>Create a shared library that uses your function as an initialization routine.<p>Inject that shared library into every app on the system.<p>As you can see this is <i>very easy</i>. Har har har.
评论 #3317495 未加载
评论 #3317632 未加载
评论 #3317968 未加载
feralchimp超过 13 年前
Great comments thread on that post, including this gem after WebKit is fingered as the wrongdoer:<p>"Two different libraries to implement text-field editing -- because, you know, that's somewhere you might want to diverge and innovate."<p>LOL.
评论 #3318565 未加载
Uhhrrr超过 13 年前
I'm always agog when an organization changes something beloved like key bindings. Qui bono? Someone who uses them is in the same boat as everyone else, muscle memory-wise. And someone who doesn't shouldn't care. And in either case, there should be enough people with facial hair (or female equivalent) who will block it because toying with user expectations is bad.
评论 #3317521 未加载
评论 #3317557 未加载
phren0logy超过 13 年前
File a bug. This seems like the kind of thing that Apple would actually fix.<p><a href="https://bugreport.apple.com/" rel="nofollow">https://bugreport.apple.com/</a>
评论 #3317574 未加载
dylangs1030超过 13 年前
To clarify this a bit for non-Emacs users (as I saw a comment), the tl;dr version is that jwz wants Mac to maintain the Emacs key bindings that essentially amount to a specialized set of copy, cut and paste functions in text editing.<p>This is not because Apple particularly sponsors Emacs, but because historically, Mac key bindings and Emacs key bindings were the same for those functions. So it's the same (roughly) as finding that Command-A, Command-C and Command-V no longer work the way they used to.
评论 #3320260 未加载
vault_超过 13 年前
You can set per-user shortcuts for this. <a href="http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html" rel="nofollow">http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html</a><p>I'm unsure if it works in 10.7 though.
评论 #3317696 未加载
mdanger超过 13 年前
As a non-emacs user: can someone explain what jwz is talking about here?
评论 #3317503 未加载
mhartl超过 13 年前
I use ^K all the time, but somehow I didn't remember ^Y from my dalliance with Emacs a decade ago. And now that I know I want it, I can't have it. Crap.
js2超过 13 年前
Hmm, I can reproduce this in Safari, but not in TextEdit, nor TextMate, under 10.7.2.
评论 #3317692 未加载
评论 #3317851 未加载
xenophanes超过 13 年前
you can change the keybindings to do multiple things, not just pick a single preset command like deleteToEndOfParagraph. not sure how much help that is though, since what he wants is kind of adding "truncate buffer" (or at least "setLastCommandFlag") to ALL other commands, rather than actually changing ctrl-k itself. this is not a problem with the deleteToEndOfParagraph implementation though, and i don't see how hacking that could help, since he wants something to happen after hitting arrows keys, typing, etc...
sambeau超过 13 年前
Just to be clear, these are standard Shell keybindings that Emacs also uses—not 'Emacs keybindings'.
评论 #3317934 未加载
评论 #3317930 未加载
brudgers超过 13 年前
While I can understand the issue the change creates for the author, a nexus between the emacs interface and Apple's overall user experience philosophy would appear to be somewhat hard to find.
评论 #3317693 未加载