Live data from Hacker News

Elevator.js – A “back to top” button that behaves like a real elevator

tholman.com

241–250 of 336 posts

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#241

Earlier quoted context omitted.

If I'm not mistaken, Fn + Left Arrow is Home on a Mac. Similar to Fn + up/down is Page Up/Down, and IIRC Fn + Right is End.

It still amazes me that people tolerate that as a substitute. It's a key combo that requires two hands, for what on a regular keyboard is one finger. Perhaps Mac people never hold a cup of coffee in their hand while using a computer?

> Perhaps Mac people never hold a cup of coffee in their hand while using a computer?

I mean, not while using the keyboard, no. Typing is a two-handed activity.

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#243
post #202
post #156

Earlier quoted context omitted.

After 20 years of using keyboards, I have, thanks to this comment, discovered the "Home" button.

For Apple 101-key keyboard users, who don’t have a “Home” key: try Cmd+Up (and Cmd+Down.) Bonus: also try Ctrl+E (and Ctrl+A) in text fields, or on the command-line. (Both of these carry over to iOS, if you’re curious. I just tested them with the iPad keyboard-folio thing.)

cmd-up/cmd-down go to top/bottom of the document.

cmd-left/cmd-right go to beginning/end of the line.

It seems Word for Mac supports cmd-left/right but not cmd-up/down. Word also supports fn-left (home) and fn-right (end), and fn-opt-left does like ctrl+home on Windows.

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#244

Earlier quoted context omitted.

This amazes me. Thanks for your honesty, there are probably millions of people who are in the same position. While you're looking down, wouldn't hurt to look at all the different keys and give them a try.

> wouldn't hurt to look at all the different keys and give them a try. TIL Enter key toggles comment collapsing.

More generally Enter acts as a left-click on whatever element has focus in the browser. If you press tab, you cycle the focus to the next link/input/button/whatever. Shift+tab cycles through them in reverse order. If a normal hyperlink has focus, you can do things like CMD+Enter (MacOS) or CTRL+Enter (Windows) to open it in a new tab, etc

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#245

Earlier quoted context omitted.

To clarify, all browsers CAN handle the mailto link as long as the user configures it to open the correct email client. That’s key because there’s many oblivious users who don’t even know about this setting (we know from the number of support requests we get from users angry that the contact link they created on their websites “don’t work”!). :) Because of the prevalence of webmail like gmail (most of our users are o…

I still don't see how webmail has anything to do with it. In fact opening Gmail prompts me to make it my default mail handler. Users can fail to configure mailto links to point at their preferred email client irrespective of it being web-based or native. (Unless it is the default for the platform I guess)

> Users can fail to configure mailto links to point at their preferred email client irrespective of it being web-based or native. (Unless it is the default for the platform I guess)

That's more the issue. It's just misconfiguration and users who are oblivious to that setting. In the past, I don't believe that Gmail prompts you to make it your default handler, and from the number of support requests we received due to this issue, it's clear that a good number of users do not have their mailto handlers configured.

Cheers!

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#246
post #99

Earlier quoted context omitted.

Cant tell if this is sarcasm or not, but "Home" key does this...

The Home key is fine if you're on a PC. On a Mac the only time you'll see one is on some extended external keyboards. It's rare, if nonexistent on Mac laptops. So you need to press Cmd+Up. Yes, it's two keys instead of one but I would argue it's actually quicker since they are both usually located on the bottom row, meaning there is less distance for your hand to travel.

> On a Mac the only time you'll see one is on some extended external keyboards. It's rare, if nonexistent on Mac laptops.

What do you mean some keyboards? Any PC keyboard you connect to the mac will support home, end, page up, etc. (Unlike buttons 4 and up on mice)

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#248
post #156
post #68

The "back to top" functionality is so useful in web pages. I wish they would make a dedicated button on keyboards that just takes you to the top of the page. Better yet, it can work in other apps too! It could, for example, take you to the beginning of a line when you're writing text. Edit: Wow, I thought I was going the extra mile to make the joke obvious by saying the key should also take you to the beginning of a…

After 20 years of using keyboards, I have, thanks to this comment, discovered the "Home" button.

Obligatory XKCD: https://xkcd.com/1053/

Just to pile on with fun new keyboard tricks! Caveat: "linux" here is largely specific to the Desktop environments I've worked with. 'Good terminals' refers to termianls that support emacs keybindings by default, which is the mac os terminal, and most linux bash/zsh terminals at least. I know Cygwin and Conemu respect this under normal usage too.

## Start and end of line:

- Mac: CMD + left, CMD + right

- Linux/PC: Home and End Buttons

- Linux/Mac/Good Terminals: ctrl+a ctrl+e

## "Word-wise" movement:

- Mac: option+left, option+right

- Linux/PC: alt+left, alt+right

- Good Terminals: alt+b, alt+f (mnemonic: 'back' and 'forward')

The 'shift' key can be added to any of the above to select whole words or lines, or parts of lines at a time. Combined with multiple insertion points you've got superpowers.

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#249

Earlier quoted context omitted.

I use both home and end constantly while coding. Writing text not so much, but it still does happen. Sure, you could do without, but...

On a mac you'd use Control-A and Control-E to navigate to the beginning and end of a line. IIRC Home and End navigate the document, not the line. https://support.apple.com/en-ca/HT201236

Hm, that would indeed be an alternative. I never tried hooking up a (windows-) keyboard to a mac, but don't see why it shouldn't work. Question is if the software or editors support the key layout.

Re: Elevator.js – A “back to top” button that behaves like a real elevator

#250
post #30

It woke up my wife, as I tried it on my phone when the stupid elevator music played it out loud :/ In all seriousness, I hope this will not become another 250kb JS framework we use in our projects..

You don't keep your volume muted? That's a little silly
Post reply on HN