TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

jwz: Apple recently broke Ctrl-Y

120 pointsby michaeltyover 13 years ago

13 comments

prawnover 13 years ago
"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>
natesmover 13 years ago
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 未加载
feralchimpover 13 years ago
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 未加载
Uhhrrrover 13 years ago
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 未加载
phren0logyover 13 years ago
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 未加载
dylangs1030over 13 years ago
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_over 13 years ago
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 未加载
mdangerover 13 years ago
As a non-emacs user: can someone explain what jwz is talking about here?
评论 #3317503 未加载
mhartlover 13 years ago
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.
js2over 13 years ago
Hmm, I can reproduce this in Safari, but not in TextEdit, nor TextMate, under 10.7.2.
评论 #3317692 未加载
评论 #3317851 未加载
xenophanesover 13 years ago
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...
sambeauover 13 years ago
Just to be clear, these are standard Shell keybindings that Emacs also uses—not 'Emacs keybindings'.
评论 #3317934 未加载
评论 #3317930 未加载
brudgersover 13 years ago
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 未加载