Closed Bug 187650 Opened 22 years ago Closed 19 years ago

option-return in URL bar should download the link

Categories

(Camino Graveyard :: Location Bar & Autocomplete, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.5

People

(Reporter: bugzilla, Assigned: bugzilla-graveyard)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021227 Chimera/0.6+ Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021227 Chimera/0.6+ In the browser, option-click on a link or option-return on a focussed link begins a download. Currently, option-clicking adds a [CR] in the URL bar, which is of no use. There seems to be no way to download a URL that I've copied from another application without displaying it in the browser window, so this behaviour would add functionality. Reproducible: Always Steps to Reproduce: 1 Copy an URL from somewhere. 2 Paste it into the URL bar. 3 Hold the option key and press the return key. Actual Results: A [CR] character is added in the URL bar. You can now scroll up and down in it using the arrow keys. Expected Results: Chimera should have begun a download of the URL to disk. Running on Mac OS X 10.1.5.
See Bug 155863, for consistency Shift-Return : for a quick download. Cmd-Return : open selected link in a New Window Opt-Return : open selected link in a New Tab I did not check AAHIG, but doing the same also with the Enter key would be good too.
I like this idea. I would have found it useful already for download links that have the wrong content-type set on the server.
Status: UNCONFIRMED → NEW
Ever confirmed: true
while it shouldn't necessarily d/l the link, we should load the url just like normal return.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Great idea, anyone on this?
I'll see what I can work out in the next week or so. Someone with privileges can assign this one to me, and then if I haven't posted at least a preliminary patch within a week, someone yell at me. :) cl
Assignee: mikepinkerton → bugzilla
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
OK, I've got some logging code in there and I'm watching what keystrokes get sent to performKeyEquivalent (in BrowserWindow.mm). If I simply type a URL (or its first few characters) and hit return, I get no NSEvent triggering. I get sent to the proper URL. If I hold down option and hit return, nothing happens. I get an opt-return (whatever Unicode character that is) inserted in the location bar. No NSEvent is triggered at all, it seems. If I hold down command and option and hit return, I get the URL opened in a new tab, as per my preference. If I look for NSAlternateKeyMask in the resultant NSEvent, it's there, as expected. I may not be understanding NSEvent's notifications, but I've got no idea at all why this is happening. Anyone? cl
Perform key equivalent is only for command-key combinations. You should probably be testing [NSApp currentEvent] in the location field's action selector instead.
(In reply to comment #7) > Perform key equivalent Err, performKeyEquivalent: .
Er...that won't work anyway, because option-return is caught too early (I think).
Chris, take a look at http://developer.apple.com/documentation/Cocoa/Conceptual/TextEditing/Tasks/InterceptKeys.html It covers a couple of ways of doing what you want to do.
This should do it. cl
Attachment #209188 - Flags: review?
Re-targeting for 1.0 now that we have a patch. cl
Target Milestone: Future → Camino1.0
Forgot to autorelease the string copy. Woops. cl
Attachment #209188 - Attachment is obsolete: true
Attachment #209189 - Flags: review?
Attachment #209188 - Flags: review?
-> 1.1
Target Milestone: Camino1.0 → Camino1.1
Attachment #209189 - Flags: review? → review?(stuart.morgan)
Comment on attachment 209189 [details] [diff] [review] don't leak the URL string, break up into two lines for clarity r=me
Attachment #209189 - Flags: superreview?
Attachment #209189 - Flags: review?(stuart.morgan)
Attachment #209189 - Flags: review+
+ [bwc saveURL:nil url:[[[self string] copy] autorelease] suggestedFilename:nil]; who is responsible for not messing up if the string changes, the caller or the callee? what pattern do we generally follow here?
Good point; the underlying function that saveURL:suggestedFilename: calls creates its own internal representation of the URL, so it doesn't matter what happens to the original. The copy can be removed.
Here ya go, guys. cl
Attachment #209189 - Attachment is obsolete: true
Attachment #213970 - Flags: superreview?(mikepinkerton)
Attachment #213970 - Flags: review?(stuart.morgan)
Attachment #209189 - Flags: superreview?
Attachment #213970 - Flags: review?(stuart.morgan) → review+
Comment on attachment 213970 [details] [diff] [review] no more copying strings sr=pink
Attachment #213970 - Flags: superreview?(mikepinkerton) → superreview+
landed trunk and 18branch
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: