News for hackers. Stuff that matters.
Re:Elevator.js – A “back to top” button that behaves like a ... by cool-RR on Wednesday June 24, 2020 @02:27AM (#23624739)
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 text line, but I guess it wasn't obvious enough for the first 3 commentators.

Re:Elevator.js – A “back to top” button that behaves like a ... by retube on Wednesday June 24, 2020 @06:35AM (#23626336)
After 20 years of using keyboards, I have, thanks to this comment, discovered the "Home" button.
Re:Elevator.js – A “back to top” button that behaves like a ... by derefr on Wednesday June 24, 2020 @08:59AM (#23627325)
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.)

Re:Elevator.js – A “back to top” button that behaves like a ... by CGamesPlay on Wednesday June 24, 2020 @09:07AM (#23627399)
The actual keys are Fn+Left and Fn+End for Home and End (Fn+Up is PageUp, etc). These will also work in Terminal apps or other places that don’t have specific Cmd-Up / Down bindings.
Re:Elevator.js – A “back to top” button that behaves like a ... by derefr on Wednesday June 24, 2020 @09:36AM (#23627702)
True; but Cmd+Up and Cmd+Down are slightly more universal across the “Apple ecosystem”, given that iOS-specific keyboards don’t have Fn keys, but do support those shortcuts. :)

Interesting aside: the “Globe” key on an iPad keyboard-folio (the one that opens the IME chooser) has some but not all of the properties of an Fn key. Globe+Left and Globe+Right work as PgUp/PgDn, but Globe+Up and Globe+Down do not work as Home/End. (Or maybe they do, but Home/End just aren’t bound in any app I’ve tested? I don’t want to write+deploy an iOS keysym tester just to find this out...)

Re:Elevator.js – A “back to top” button that behaves like a ... by bobbylarrybobby on Wednesday June 24, 2020 @11:00AM (#23628590)
For the record, Cmd-up/down navigates between prompts in Terminal.app
Re:Elevator.js – A “back to top” button that behaves like a ... by core-questions on Wednesday June 24, 2020 @01:07PM (#23630738)
Lack of a working home/end function is literally the biggest reason I dislike working on a Mac. I don't understand what would be so hard about just having them work like they do on a PC.
Re:Elevator.js – A “back to top” button that behaves like a ... by derefr on Wednesday June 24, 2020 @02:26PM (#23631887)
Apple sells keyboards with Home/End keys, and they do what you'd expect (e.g. https://www.apple.com/shop/product/MQ052LL/A/magic-keyboard-...). iMacs and Mac Pros come with that type of keyboard.

You can also plug in arbitrary USB keyboards, or pair arbitrary Bluetooth keyboards, to a Mac, and the Home/End keys on those will also do what you'd expect.

Apple just doesn't bother to put Home/End/PgUp/PgDn keys on their laptops — presumably because they find that people don't need them very often; and that, when the keyboard's size is already constrained, people get more value out of fewer, larger keys (while requiring key-chords for some things) vs. more, smaller keys.

Re:Elevator.js – A “back to top” button that behaves like a ... by core-questions on Thursday June 25, 2020 @05:28PM (#23645929)
> and they do what you'd expect

No, they don't. I expect pressing Home to go to the beginning of the line I am on, and I have to hit Command-Left for that, and Home does nothing of value.

Re:Elevator.js – A “back to top” button that behaves like a ... by racl101 on Wednesday June 24, 2020 @10:49AM (#23628462)
Are Ctrl+e and ctrl+a Emacs conventions?
Re:Elevator.js – A “back to top” button that behaves like a ... by syncsynchalt on Wednesday June 24, 2020 @11:14AM (#23628791)
Yes, emacs navigation keybindings are native in Apple UI.

e.g. ^A ^K to clear an input line

Re:Elevator.js – A “back to top” button that behaves like a ... by jagger27 on Wednesday June 24, 2020 @11:24AM (#23628941)
It’s funny. Apple’s UI has taught me how to use emacs instead of the other way around.

I use Ctrl-A and Ctrl-E all the time.

Re:Elevator.js – A “back to top” button that behaves like a ... by hibbelig on Wednesday June 24, 2020 @09:56AM (#23627906)
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 ... by cool-RR on Wednesday June 24, 2020 @06:43AM (#23626383)
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.
Re:Elevator.js – A “back to top” button that behaves like a ... by vimslayer on Wednesday June 24, 2020 @07:03AM (#23626508)
* tries a "Wi-Fi toggle" button, looses internet and is unable to google for help
Re:Elevator.js – A “back to top” button that behaves like a ... by o-__-o on Thursday June 25, 2020 @10:10AM (#23640938)
We laugh, but I had to troubleshoot my dads laptop once upon a time and had to ask him what lights are on on his keyboard. “The airplane light is on”
Re:Elevator.js – A “back to top” button that behaves like a ... by zrobotics on Wednesday June 24, 2020 @08:52AM (#23627273)
I had a family member call me in a legitimate panic because her "Gmail got hacked, all of a sudden the whole screen changed and there a bunch of weird code all over the screen!"

Turns out the f12 key was the culprit; took me longer than it should have to realize she was describing the Firefox developer console.

Re:Elevator.js – A “back to top” button that behaves like a ... by retube on Wednesday June 24, 2020 @06:59AM (#23626488)
Thanks. And now I have discovered the "End" button!
Re:Elevator.js – A “back to top” button that behaves like a ... by nkrisc on Wednesday June 24, 2020 @10:42AM (#23628382)
The first thing I do with any new device is push all the buttons to see what they do.

Push, push-and-hold, and push multiple times quickly.

Re:Elevator.js – A “back to top” button that behaves like a ... by KineticLensman on Wednesday June 24, 2020 @07:37AM (#23626710)
> wouldn't hurt to look at all the different keys and give them a try.

TIL Enter key toggles comment collapsing.

Re:Elevator.js – A “back to top” button that behaves like a ... by graedus on Wednesday June 24, 2020 @10:01AM (#23627956)
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 ... by Jimmc414 on Wednesday June 24, 2020 @08:45AM (#23627223)
Since your brain is already in keyboard learning mode, give Shift + Home and Ctrl + Shift + Home a try. It works wonders when selecting text for cutting and pasting. The same combos work with End as well as the arrow keys.
Re:Elevator.js – A “back to top” button that behaves like a ... by umvi on Wednesday June 24, 2020 @09:21AM (#23627525)
Home and End are the amazing in VSCode for doing bulk line edits in conjunction with multi cursor.
Re:Elevator.js – A “back to top” button that behaves like a ... by cpfohl on Wednesday June 24, 2020 @10:03AM (#23627977)
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 ... by LeifCarrotson on Wednesday June 24, 2020 @10:23AM (#23628191)
Other keys that may be non-obvious:

- Insert toggles between shifting characters after the cursor to the right and deleting the character to the right of the cursor, replacing it with the new character you typed, but not replacing a newline character. While eg. Caps Lock is global, Insert mode is local to the text input that currently has focus - tab or mouse over to a new window and you've lost Insert mode, tab back to the one where you previously set it and you're back to Insert mode.

- Delete is like Backspace, but deletes stuff to the right of the cursor.

- Home, as you discovered, moves browsers to the top of the page. When composing text, it moves the cursor to the start of the line (and vice versa with "End"), CTRL+Home moves to the start of the text entry box.

- Page Up and Page Down shift the cursor by screenfulls of text, typically leaving a couple lines at the top and bottom for context. Note to web developers who are unfamiliar with keyboards: Make sure your fixed/sticky header/footer banners don't hide content when using "Page Up" and "Page Down". Also of note, CTRL+Page Up/Down and CTRL+Tab/CTRL+Shift+Tab shift the window or tab focus within an application, for example to go to the next tab in Chrome or the next file in your IDE.

- Print Screen creates a screenshot. Depending on your setup, this may either go to your Pictures folder, or may go to the clipboard (open an image editor eg. Win+R, mspaint, and CTRL+V to paste). It shares a key with SysRq, which can be accessed with Alt+SysRq+(magic letter), and used to recover from various crash conditions - be careful, if you start hitting letters at random, you'll invoke the bad kind of magic that will shut down your computer.

- Scroll lock was used to stop auto-scrolling an input buffer that was running too fast. Largely neutered in modern OSes, it's still useful in the BIOS when all the hardware initialization messages are scrolling by too fast to read. Sometimes it's also used to toggle keyboard backlighting because it had an LED attached and doesn't have a real function anymore, but depending on the manner in which your OS/hardware neuters this key your keyboard backlighting may not work.

- Pause/Break kills a process like CTRL+C, but sometimes has different specific modes of operation in various debuggers. Access the "break" alternate function with CTRL+Pause.

- Super/Windows key opens the Start menu or search tool. On Macs, it's the Command key and used for lots of keyboard shortcuts. Hyper useful for window management, Super+arrow keys move screens to the left or right half of the monitor, maximize, resize, or minimize them, and Shift+Super+arrow moves them between multiple monitors.

- Num lock toggles between entering numbers with the 10-key section of the keyboard and that section's alternate navigation functions, where 7 is home, 1 is end, 9 is page up, 3 is page down, and 4/8/6/2 are left/up/right/down respectively. Not really important if you've got an inverted-T arrow cluster and Super useful on some dumb 17" laptops that cram in a 10-key section but relegate all these normal navigation keys to arcane random Function invocations on tiny distant buttons crammed into the top of the keyboard if they're present at all. Uniquely, Num Lock is typically remembered across reboots.

Re:Elevator.js – A “back to top” button that behaves like a ... by drewzero1 on Wednesday June 24, 2020 @11:30AM (#23629042)
I had a support call yesterday where the computer was highlighting things and deleting them while the user was going back to change things in a document. I was initially suspecting either a faulty shift key or a double-click setting causing things to be highlighted. When I looked at the user's screen I recognized the block cursor and told him to press Insert.

I haven't seen that or heard of it happening for probably 10-odd years now. Didn't realize it still worked in Windows 10!

Re:Elevator.js – A “back to top” button that behaves like a ... by Tiksi on Wednesday June 24, 2020 @04:41PM (#23633593)
It still works in the latest macOS too. I end up accidentally hitting in on my work machine in slack all the time.
Re:Elevator.js – A “back to top” button that behaves like a ... by nyanpasu64 on Wednesday June 24, 2020 @12:08PM (#23629666)
> Note to web developers who are unfamiliar with keyboards: Make sure your fixed/sticky header/footer banners don't hide content when using "Page Up" and "Page Down".

Firefox has specific code to detect banners and reduce the Page Down distance. This code fails on new Twitter.

Re:Elevator.js – A “back to top” button that behaves like a ... by Ajedi32 on Wednesday June 24, 2020 @11:37AM (#23629165)
Since we're sharing tips, here's another one: Holding the middle mouse button and dragging the mouse up towards the top of the screen accomplishes basically the same thing as pressing "Home" without requiring you to take your hand off the mouse.
Re:Elevator.js – A “back to top” button that behaves like a ... by fomine3 on Wednesday June 24, 2020 @11:57PM (#23636765)
I only use NumLock(button and LED) for test whether kernel is alive or dead.
Re:Elevator.js – A “back to top” button that behaves like a ... by shanecp on Wednesday June 24, 2020 @10:16PM (#23636191)
6 years in university + 10 years of work experience.

Today I know what Home/End keys do, because of a random comment on the internet.

Re:Elevator.js – A “back to top” button that behaves like a ... by colmvp on Wednesday June 24, 2020 @02:52AM (#23624873)
Hacker News attracts a lot of smart readers, so I'm kind of surprised that your comment actually 'fooled' people. It was very obvious sarcasm.
Re:Elevator.js – A “back to top” button that behaves like a ... by heydabop on Wednesday June 24, 2020 @01:17PM (#23630873)
> Hacker News attracts a lot of smart readers

Ahh, I see you're also trying your hand at sarcasm!

Re:Elevator.js – A “back to top” button that behaves like a ... by wojcikstefan on Wednesday June 24, 2020 @03:55AM (#23625307)
Plenty of Mac users out there without a “Home” button.
Re:Elevator.js – A “back to top” button that behaves like a ... by FractalParadigm on Wednesday June 24, 2020 @04:03AM (#23625371)
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.
Re:Elevator.js – A “back to top” button that behaves like a ... by jasonkester on Wednesday June 24, 2020 @04:16AM (#23625460)
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?

Re:Elevator.js – A “back to top” button that behaves like a ... by OOPMan on Wednesday June 24, 2020 @09:32AM (#23627661)
Well, no.

Mac people expect their Butler to carefully hold the coffee cup for them and tilt it so they can take a sip.

Re:Elevator.js – A “back to top” button that behaves like a ... by IggleSniggle on Wednesday June 24, 2020 @10:32AM (#23628298)
My butler chortled
Re:Elevator.js – A “back to top” button that behaves like a ... by smichel17 on Wednesday June 24, 2020 @07:06AM (#23626527)
On my old Dell xps 14 laptop, the function button was close to the arrow keys, making it very convenient to use one-handed. I actually preferred it to a separate home button, because, in a text box, I often want to jump to the start/end of a line and then move a word or two inward -- do-able using control+arrows. It was almost as good as vim, although of course I had to take my hand off the home row.
Re:Elevator.js – A “back to top” button that behaves like a ... by jagged-chisel on Wednesday June 24, 2020 @07:27AM (#23626641)
Imagine vim editing across all text fields in an OS. Would be glorious.
Re:Elevator.js – A “back to top” button that behaves like a ... by evilduck on Wednesday June 24, 2020 @09:26AM (#23627583)
macOS has a lot of baked in emacs keybindings that work almost universally in text fields.

Control-A: Move to the beginning of the line or paragraph.

Control-E: Move to the end of a line or paragraph.

Control-F: Move one character forward.

Control-B: Move one character backward.

Control-L: Center the cursor or selection in the visible area.

Control-P: Move up one line.

Control-N: Move down one line.

Control-O: Insert a new line after the insertion point.

Control-T: Swap the character behind the insertion point with the character in front of the insertion point.

Re:Elevator.js – A “back to top” button that behaves like a ... by jen20 on Wednesday June 24, 2020 @11:07AM (#23628686)
"Almost universally" even includes Electron apps, surprisingly!
Re:Elevator.js – A “back to top” button that behaves like a ... by aglionby on Wednesday June 24, 2020 @07:13AM (#23626563)
Home and end are most useful for me when I'm writing or programming, so both of my hands are on the keyboard anyway. I think I actually find these key combos more useful than a dedicated home or end button, as I'd have to move my hands a lot further for those.
Re:Elevator.js – A “back to top” button that behaves like a ... by Wowfunhappy on Wednesday June 24, 2020 @09:51AM (#23627851)
> 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 ... by sildur on Wednesday June 24, 2020 @04:45AM (#23625667)
They don’t. A Starbucks cup is too heavy to hold it for a long period of time.
Re:Elevator.js – A “back to top” button that behaves like a ... by andy_ppp on Wednesday June 24, 2020 @06:27AM (#23626291)
I'm tired just thinking about this.
Re:Elevator.js – A “back to top” button that behaves like a ... by salttrail on Wednesday June 24, 2020 @04:20AM (#23625482)
right cmd + up arrow and you end up with free cofee-hand
Re:Elevator.js – A “back to top” button that behaves like a ... by httpsterio on Wednesday June 24, 2020 @06:08AM (#23626165)
it dorsnt work with cmd
Re:Elevator.js – A “back to top” button that behaves like a ... by Veen on Wednesday June 24, 2020 @06:31AM (#23626313)
It does for me. I've always used ⌘+up and ⌘+down to go to the top and bottom of the page. After eight years of using Macs, I didn't even know you could use the function key as suggested above.
Re:Elevator.js – A “back to top” button that behaves like a ... by qmmmur on Wednesday June 24, 2020 @09:07AM (#23627400)
Personally, I don't get caught up on pressing two buttons on my keyboard at the same time in the circumstance I'm literally doing something else.
Re:Elevator.js – A “back to top” button that behaves like a ... by yolomcsuperswag on Wednesday June 24, 2020 @06:33AM (#23626321)
Accelerated scrolling makes the home key superfluous. Just scroll "fast".
Re:Elevator.js – A “back to top” button that behaves like a ... by easygenes on Wednesday June 24, 2020 @06:43AM (#23626386)
Yeah, unless the doc is dozens+ pages long. Say, a book on a single page. Then it’s real nice to have a key sequence to get around. Going to the start or end of a long document is an infrequent enough operation I think a two hand sequence is fine.
Re:Elevator.js – A “back to top” button that behaves like a ... by raxxorrax on Wednesday June 24, 2020 @07:11AM (#23626555)
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...
Re:Elevator.js – A “back to top” button that behaves like a ... by Gracana on Wednesday June 24, 2020 @09:31AM (#23627655)
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

Re:Elevator.js – A “back to top” button that behaves like a ... by raxxorrax on Wednesday June 24, 2020 @10:04AM (#23627984)
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 ... by crooked-v on Wednesday June 24, 2020 @04:18AM (#23625471)
And, of course, you can always mess with key bindings for a user by creating a file at ~/Library/KeyBindings/DefaultKeyBinding.dict with custom overrides for whatever.
Re:Elevator.js – A “back to top” button that behaves like a ... by Angostura on Wednesday June 24, 2020 @04:38AM (#23625613)
CMD - up-arrow takes you to top of page.
Re:Elevator.js – A “back to top” button that behaves like a ... by tom_ on Wednesday June 24, 2020 @09:01AM (#23627342)
On OS X, this also moves the insertion point, which Home doesn't.
Re:Elevator.js – A “back to top” button that behaves like a ... by andreshb on Wednesday June 24, 2020 @08:17AM (#23627001)
Been a Mac user for 17 years, never knew that. Thank you.
Re:Elevator.js – A “back to top” button that behaves like a ... by Aeolun on Wednesday June 24, 2020 @08:24AM (#23627050)
I cannot imagine how painful those years must have been.

The moment I learned my macbook didn’t have a home button I was searching for how to emulate that.

Re:Elevator.js – A “back to top” button that behaves like a ... by st1ck on Wednesday June 24, 2020 @05:34AM (#23625934)
I have Home & End on my keyboard, but they are not very conveniently located. Mapping <Super>-A and <Super>-E to Home and End is much more ergonomic (or you can use other modifier like <Ctrl> or <Alt>). Not sure though which keys should be mapped to PageUp/PageDown. Those are not terribly useful keys anyway if you use touchpad or Space.
Re:Elevator.js – A “back to top” button that behaves like a ... by AnonC on Wednesday June 24, 2020 @09:08AM (#23627411)
Also, use Up Arrow to go to the beginning of the line and Down Arrow to go to the end of the line on single line text boxes (I use it often on browser address bars).
Re:Elevator.js – A “back to top” button that behaves like a ... by read_if_gay_ on Wednesday June 24, 2020 @09:17AM (#23627478)
Also, system-wide in basically any text field, cmd+left/right does the same, and alt+left/right moves the cursor to the previous/next word.
Re:Elevator.js – A “back to top” button that behaves like a ... by reaperducer on Wednesday June 24, 2020 @11:19AM (#23628865)
My work Apple keyboard has a home button. It's right there between Function and Page Up. https://www.apple.com/shop/product/MQ052LL/A/magic-keyboard-...

My home Apple keyboard has the Home button between Help and Page Up. Though, I will admit that keyboard is 2003ish. But I keep using it because it still has good action.

Re:Elevator.js – A “back to top” button that behaves like a ... by drewzero1 on Wednesday June 24, 2020 @11:41AM (#23629234)
Is that one of the A1048 [1] "crumb tray" keyboards with the clear rim around the edge? I recently switched to one of those from an original iMac keyboard (finally got fed up with not having a forward delete key) and the key edges and the action both feel crisper. Could just be that I've been using the other one for a decade or so though.

[1]:https://en.wikipedia.org/wiki/Apple_Keyboard#Apple_Keyboard_...

Re:Elevator.js – A “back to top” button that behaves like a ... by reaperducer on Wednesday June 24, 2020 @11:55AM (#23629448)
Almost. It's the Apple Pro Keyboard (M7803)

https://en.wikipedia.org/wiki/File:Apple_Pro_Keyboard_black....

I have to get a USB⇄USB-C dongle so I can use it on my Windows machine.

Re:Elevator.js – A “back to top” button that behaves like a ... by drewzero1 on Wednesday June 24, 2020 @03:04PM (#23632409)
Ooh, I need to get my hands on one of those. The best of both worlds!
Re:Elevator.js – A “back to top” button that behaves like a ... by simonklitj on Wednesday June 24, 2020 @06:42AM (#23626376)
Also, CMD + Arrow Up scrolls to top.
Re:Elevator.js – A “back to top” button that behaves like a ... by dwighttk on Wednesday June 24, 2020 @08:04AM (#23626904)
I have an Apple keyboard with a home key and I never use it.
Re:Elevator.js – A “back to top” button that behaves like a ... by jakear on Wednesday June 24, 2020 @04:01AM (#23625363)
Fn+LeftArrow. RightArrow for End.
Re:Elevator.js – A “back to top” button that behaves like a ... by chefandy on Wednesday June 24, 2020 @07:49AM (#23626788)
And phone users
Re:Elevator.js – A “back to top” button that behaves like a ... by ben509 on Wednesday June 24, 2020 @06:28AM (#23626296)
When people don't get humor, they're still picking up on the incongruity in it, and this bothers them.
Re:Elevator.js – A “back to top” button that behaves like a ... by apozem on Wednesday June 24, 2020 @12:41PM (#23630317)
> Hacker News attracts a lot of smart readers

Here's where I disagree

Re:Elevator.js – A “back to top” button that behaves like a ... by intpx on Wednesday June 24, 2020 @08:36AM (#23627150)
i have worked with way to many people that don't know what the navigation keys do, don't understand most of the control keys, and the only function key they know is F5.

Way too many people who have never used an actual console terminal

Re:Elevator.js – A “back to top” button that behaves like a ... by IggleSniggle on Wednesday June 24, 2020 @11:23AM (#23628927)
Only function keys I know off-hand are F2 and F12. Mostly because I prefer modal setups and only ever need those two during boot. Although without checking I have a suspicion that F5 refreshes a browser window. Am I right??
Re:Elevator.js – A “back to top” button that behaves like a ... by keosariel on Wednesday June 24, 2020 @04:36AM (#23625598)
its not a surprise at all
Re:Elevator.js – A “back to top” button that behaves like a ... by GoodJokes on Wednesday June 24, 2020 @03:23AM (#23625078)
Hacker News attracts a lot of readers who THINK they are smart or whatever that means.
Re:Elevator.js – A “back to top” button that behaves like a ... by fluential on Wednesday June 24, 2020 @03:45AM (#23625229)
Boom egos shaken
Re:Elevator.js – A “back to top” button that behaves like a ... by uppe on Wednesday June 24, 2020 @04:22AM (#23625498)
Use the keyboard? Do I look like some sort of hacker? I just mastered double clicking so I’ll just keep clicking thank you very much.
Re:Elevator.js – A “back to top” button that behaves like a ... by majkinetor on Wednesday June 24, 2020 @04:02AM (#23625369)
Vimum plugin

gg - go to top

G - go to bottom

You can also go anywhere on page (litterary) with single key (homework).

Much better then home/end as you usually need to hunt for those keys, or even use them with Fn modifier.

Re:Elevator.js – A “back to top” button that behaves like a ... by TekMol on Wednesday June 24, 2020 @08:43AM (#23627199)
The problem with plugins is that they give full control over your browsing to whoever controls the plugin.

I sometimes install plugins myself if the code is open source and it is small enough for me to vet it.

I would love vimium, but the code is way too big to vet it myself.

I wish there was some party that is trustworthy, vets codebases like these and publish hashes of trusted versions.

An alternative would be more modular codebases. So instead of publishing a giant box of code with all kinds of vim-like behavior, publish lots of small ones. Like the code to make gg work.

Re:Elevator.js – A “back to top” button that behaves like a ... by majkinetor on Wednesday June 24, 2020 @01:29PM (#23631039)
I think you are being overly paranoid.

If you want to fight for security on that level, your computer life must be miserable. You are also missing out a lot of great tools and are way less effective then folks that use them (and thus less competitive).

I am all up for great security in OS, emails, browsers, messangers etc, but it has to stop somewhere. Also, this kind of stuff like vimium is so widely used that somebody would probably notice if something funky is going on (everything leaves some traces, you dont really need to look at the code to notice it most of the time).

Your proposed way to solve this issue is way worse - now, instead of having one monolitic but still simple and well rounded app you have thousands of little scripts that combined are also hessle to review, belong to way more humans with different agendas (instead of single or couple) and would be horror to initialize (really sounds like nodejs ecosystem).

Just get the damn thing and relax a bit. Anything malicious that could be done by some developer is already done by big evil corps anyway (and more) and you cant really escape those.

Re:Elevator.js – A “back to top” button that behaves like a ... by IggleSniggle on Wednesday June 24, 2020 @05:13PM (#23633951)
I share your perspective, but it's not a good perspective to encourage, imho.
Re:Elevator.js – A “back to top” button that behaves like a ... by majkinetor on Thursday June 25, 2020 @02:42AM (#23637573)
I believe it is. You can say the same thing about anything else - do you inspect any TV or telephone you buy for hidden recording devices? Do you inspect any hotel/airbnb room ? Do you do that with supplements, cooking aparatures, plant checmials, mattress material, car breaks etc.. No you don't. You believe its good. Multiple times it did happen they were not good and stuff were spying, poisoning, leaking, killing etc. Yet nobody decides to not buy stuff in order to be 100% protected like there is such thing, because it is miserable life.

Life is risky by default. You calculate your ods.

Re:Elevator.js – A “back to top” button that behaves like a ... by IggleSniggle on Thursday June 25, 2020 @03:34PM (#23644588)
Great argument. The Pure Food and Drug Act of 1906 and it's fallout probably have some good lessons to learn on both sides of this question.
Re:Elevator.js – A “back to top” button that behaves like a ... by IggleSniggle on Wednesday June 24, 2020 @11:29AM (#23629016)
Honestly I'd rather have one big unified collection if I was going to review.
Re:Elevator.js – A “back to top” button that behaves like a ... by samcgraw on Wednesday June 24, 2020 @01:40PM (#23631220)
Came here to say this. Vimium is excellent! I've been using it for the last number of years and when I switch to a new computer without it, I still fire off the `gg` and wonder why the browser isn't picking it up. It's essential to me at this point.
Re:Elevator.js – A “back to top” button that behaves like a ... by fphilipe on Wednesday June 24, 2020 @03:36AM (#23625181)
I was quite amazed when I found out that not all developer colleagues of mine knew the "Home" button.
Re:Elevator.js – A “back to top” button that behaves like a ... by cm2187 on Wednesday June 24, 2020 @03:51AM (#23625277)
My laptop doesn't have this button (you have to use a weird combination of keys). The days of everyone using a full keyboard are long gone...
Re:Elevator.js – A “back to top” button that behaves like a ... by reddotX on Wednesday June 24, 2020 @03:55AM (#23625308)
what laptop?
Re:Elevator.js – A “back to top” button that behaves like a ... by cm2187 on Wednesday June 24, 2020 @03:58AM (#23625332)
Dell latitude.
Re:Elevator.js – A “back to top” button that behaves like a ... by wiether on Wednesday June 24, 2020 @04:38AM (#23625619)
The button is available on the Dell longitude I think
Re:Elevator.js – A “back to top” button that behaves like a ... by dorgo on Wednesday June 24, 2020 @03:51AM (#23625279)
I just found out that Home button ( without Ctrl ) works in browsers. I knew the Ctrl + Home combination ( which also works in other programs ).
Re:Elevator.js – A “back to top” button that behaves like a ... by jmiskovic on Wednesday June 24, 2020 @09:43AM (#23627770)
On tangent, it's strange that our keyboards mostly stayed the same while the screens got around x20 better.

I often need to make bigger and smaller jumps with keyboard. In Sublime I use a plug-in that can jump 10 lines up and down but I also need that functionality across the rest of OS. For navigating menus, scrolling through content, moving around spreadsheet. Page up/down is too large jump with the amount of content that can fit modern screens.

Re:Elevator.js – A “back to top” button that behaves like a ... by kieckerjan on Wednesday June 24, 2020 @11:55AM (#23629443)
Yeah, 10 line jumps are awesome when coding. In emacs I bind this behaviour to the ctrl-up and ctrl-down like so:

  (global-set-key [C-down] '(lambda () (interactive) (next-line 10) ))
  (global-set-key [C-up] '(lambda () (interactive) (previous-line 10) ))
Re:Elevator.js – A “back to top” button that behaves like a ... by jmiskovic on Wednesday June 24, 2020 @01:15PM (#23630837)
That's exactly it. Before that I tried AceJump, but it demanded attention while this method becomes like a second nature.

I probably need a scriptable keyboard to make it work across all programs. Some keyboards support Lua, but I think it's only for LED patterns which is pretty retarded.

Re:Elevator.js – A “back to top” button that behaves like a ... by bbx on Wednesday June 24, 2020 @03:23AM (#23625080)
The first half of your comment could have been sarcasm. But the second part, with the exclamation point, definitely sold it.

Sarcasm is definitely not impossible to detect in writing. You just to have to trust people and give them the benefit of the doubt.

Re:Elevator.js – A “back to top” button that behaves like a ... by globular-toast on Wednesday June 24, 2020 @04:21AM (#23625490)
Over the years I've tried to teach people about the Home key but to no avail. Similarly I've tried to teach people about using middle-click to open a link in a new tab, or some basic readline functionality like Ctrl-a, Ctrl-e for beginning end of line. But I've not seen a single other person use these features. Strange.

Thinking about it some more, I was being driven in a friend's BMW one day and there was some bad smell coming from outside so I asked if I should press the air recirculation button. It turns out he'd had that car for more than five years and had never pressed that button. In fact, he'd never pressed, nor seemingly even wondered about, most of the buttons in the car. Strange.

Re:Elevator.js – A “back to top” button that behaves like a ... by stronglikedan on Wednesday June 24, 2020 @10:59AM (#23628574)
Okay, but every time I try to hit the Home key with my mouse, I end up hitting the Insert and PageUp keys too, since they're so close together, so it doesn't solve the same problem that a back-to-top button does.
Re:Elevator.js – A “back to top” button that behaves like a ... by TomJansen on Wednesday June 24, 2020 @08:57AM (#23627308)
I know that it a dedicated button for keyboards, but on phone keyboards this is still a missing functionality which I really miss!
Re:Elevator.js – A “back to top” button that behaves like a ... by AnonC on Wednesday June 24, 2020 @09:05AM (#23627370)
At least on iPhone, tapping the status bar on the top of the screen usually scrolls to the top for all (well developed) applications that have a vertical scrolling view, but just web pages.
Re:Elevator.js – A “back to top” button that behaves like a ... by minikites on Wednesday June 24, 2020 @09:03AM (#23627362)
Tap the status bar on any iPhone?
Re:Elevator.js – A “back to top” button that behaves like a ... by notalexma on Wednesday June 24, 2020 @09:21AM (#23627523)
Touching the top-most part of the newer iPhones (with the notch) scrolls you back up to the top page.
Re:Elevator.js – A “back to top” button that behaves like a ... by artsyca on Wednesday June 24, 2020 @04:42AM (#23625652)
I predicted every comment before I read it down to the one about the right cmd button I too have used the Mac while eating a taco.
Re:Elevator.js – A “back to top” button that behaves like a ... by waltpad on Wednesday June 24, 2020 @03:26AM (#23625102)
Seriously though, the Opera web browser has this functionality built in, but it's a "toggle" back to top, by just clicking on the tab title.

It's very useful on web sites like HN, when you don't want to lose where you are in the thread, yet need to go back to the top to have a second look at the topic for instance.

Re:Elevator.js – A “back to top” button that behaves like a ... by eyelidlessness on Wednesday June 24, 2020 @10:26AM (#23628240)
I definitely got your joke and had a snicker. I wonder if part of the reason the obviousness is missing some people is that many of us use Macs, and the "beginning of a line" behavior is not the default behavior in most native Mac apps.
Re:Elevator.js – A “back to top” button that behaves like a ... by whiddershins on Wednesday June 24, 2020 @05:11AM (#23625808)
I fell for it because although I’ve used a computer constantly for over 20 years I don’t think I’ve ever touched that home button. At least not deliberately.

I never use escape or any function keys either.

I still can’t figure out how to get in and out of insert mode in sublime text. When it happens I just quit and restart.

I’m starting to wonder why I tolerate this level of ignorance in myself.

I mean, I use key commands constantly. That’s what is odd about all this.

Re:Elevator.js – A “back to top” button that behaves like a ... by recursive on Wednesday June 24, 2020 @12:42PM (#23630339)
> I still can’t figure out how to get in and out of insert mode in sublime text. When it happens I just quit and restart.

Not sure if joking, but you literally press the button labelled "Insert".

Re:Elevator.js – A “back to top” button that behaves like a ... by thedanbob on Wednesday June 24, 2020 @02:36PM (#23632039)
I'll be honest, even though I use the home and end keys on a daily basis while programming, I don't think it's ever occurred to me that I could use them to move around a webpage. I feel both dumb and enlightened!
Re:Elevator.js – A “back to top” button that behaves like a ... by supermatt on Wednesday June 24, 2020 @02:28AM (#23624748)
Cant tell if this is sarcasm or not, but "Home" key does this...
Re:Elevator.js – A “back to top” button that behaves like a ... by jspash on Wednesday June 24, 2020 @03:44AM (#23625225)
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.

Re:Elevator.js – A “back to top” button that behaves like a ... by eyelidlessness on Wednesday June 24, 2020 @10:33AM (#23628299)
Cmd + Up is similar in behavior to the macOS Home key behavior, but slightly different. On laptops (or any desktop keyboard with a Fn key), Home is Fn + Up. The differences are:

- Home (and Fn + Up) don't move your caret if you're in an editing context, except...

- Some apps have different behavior for Home than go-to-top. Typically these exceptions use the Windows behavior of go-to-start-of-line (obviously this does move your cursor).

Re:Elevator.js – A “back to top” button that behaves like a ... by itskwanyall on Wednesday June 24, 2020 @04:10AM (#23625426)
I’m normally a macOS guy but I’m currently using windows full time to give WSL a proper chance. The thing I miss most is CMD+Arrow to go to the start/end of something. I think it’s a beautiful system, alt+arrow to jump a word, cmd+arrow to jump to the start/end. The home/end keys are always so hard to find especially when they could be anywhere depending on your keyboard
Re:Elevator.js – A “back to top” button that behaves like a ... by innocenat on Wednesday June 24, 2020 @05:26AM (#23625886)
Alt+Arrow on OSX is Ctrl+Arrow on Windows.

I just switched to OS X recently and I am definitely having the reverse trouble getting used to the Cmd/Alt+Arrow I almost never have problem finding Home/End on any keyboards (been using Windows/Linux for 15+ years). Nowadays for laptop it's almost always fn+Arrow for Home/End.

Re:Elevator.js – A “back to top” button that behaves like a ... by itskwanyall on Wednesday June 24, 2020 @09:42PM (#23635969)
Once you get into mechanical keyboards, there are many custom layouts for anything outside the typewriter keys ;)
Re:Elevator.js – A “back to top” button that behaves like a ... by innocenat on Wednesday June 24, 2020 @10:24PM (#23636244)
How many percentage are there? I am not from English speaking countries, and I have never met anyone using non-standard layout before. So, like, do I need to care if I am not targeting software developer?
Re:Elevator.js – A “back to top” button that behaves like a ... by deadbunny on Wednesday June 24, 2020 @04:41AM (#23625644)
I'm not a Mac user so I may be missing something but can't you do that with Ctrl+left/right?
Re:Elevator.js – A “back to top” button that behaves like a ... by itskwanyall on Wednesday June 24, 2020 @09:38PM (#23635950)
Ctrl+left/right is equivalent to alt+left/right on mac, which jumps to the start/end of the word rather than the start/end of the line
Re:Elevator.js – A “back to top” button that behaves like a ... by Phrodo_00 on Wednesday June 24, 2020 @10:02AM (#23627966)
> 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 ... by Tiksi on Wednesday June 24, 2020 @04:50PM (#23633719)
The mouse button thing drove me mad at first, but https://sensible-side-buttons.archagon.net/ can fix it and give you the expected functionality.
Re:Elevator.js – A “back to top” button that behaves like a ... by lolftw on Wednesday June 24, 2020 @03:47AM (#23625238)
Or shift+space if you want to take steps until the top (maybe you just want to navigate up faster, and not to the top)
Re:Elevator.js – A “back to top” button that behaves like a ... by warp on Wednesday June 24, 2020 @08:20AM (#23627024)
Wow, thanks!

I use space all the time to scroll down on a web page, didn't know you could reverse direction, awesome :)

Re:Elevator.js – A “back to top” button that behaves like a ... by retpirato on Friday June 26, 2020 @07:22AM (#23650766)
You can create a bookmarklet with the code javascript:window.scrollTo(0,0); that will scroll back to the top, but it won't have an "elevator" effect.
Re:Elevator.js – A “back to top” button that behaves like a ... by glaberficken on Wednesday June 24, 2020 @06:09AM (#23626174)
Now if only the End key could go back to being usable...
Re:Elevator.js – A “back to top” button that behaves like a ... by mrunkel on Wednesday June 24, 2020 @02:45AM (#23624829)
Sarcasm is nearly impossible to detect in writing.

A tip: If it seems the whole world is a problem, it's probably not the world that is the problem.

Re:Elevator.js – A “back to top” button that behaves like a ... by ithkuil on Wednesday June 24, 2020 @02:50AM (#23624863)
Yeah, I wish somebody invented a sarcasm punctuation mark /s
Re:Elevator.js – A “back to top” button that behaves like a ... by leipert on Wednesday June 24, 2020 @03:08AM (#23624972)
Re:Elevator.js – A “back to top” button that behaves like a ... by speps on Wednesday June 24, 2020 @03:16AM (#23625023)
How ironic ؟
Re:Elevator.js – A “back to top” button that behaves like a ... by Kuraj on Wednesday June 24, 2020 @07:05AM (#23626516)
I always felt that this diluted the sarcasm and was a bit like explaining a joke
Re:Elevator.js – A “back to top” button that behaves like a ... by cecilpl2 on Wednesday June 24, 2020 @09:00AM (#23627336)
Well it's not like the entire point of sarcasm is to mean something other than what you say.
Re:Elevator.js – A “back to top” button that behaves like a ... by ithkuil on Thursday June 25, 2020 @03:55AM (#23638004)
Leonard: Hey, Penny. How's work?

Penny: Great! I hope I'm a waitress at the Cheesecake Factory for my whole life!

Sheldon: Was that sarcasm?

Penny: No.

Sheldon: Was that sarcasm?

Penny: Yes.

Re:Elevator.js – A “back to top” button that behaves like a ... by MaxikCZ on Thursday June 25, 2020 @03:49AM (#23637954)
> Sarcasm is nearly impossible to detect in writing.

SaRcASm iS NeARlY ImpOsSibLe To dEtecT iN WrITiNg.

Re:Elevator.js – A “back to top” button that behaves like a ... by Kronen on Wednesday June 24, 2020 @09:14AM (#23627454)
Hahaha you must be american, right? USA is not the whole world hihihi
Re:Elevator.js – A “back to top” button that behaves like a ... by xboxnolifes on Wednesday June 24, 2020 @06:33AM (#23626323)
It's very easy to detect if you knew the button existed.
Re:Elevator.js – A “back to top” button that behaves like a ... by lienne on Wednesday June 24, 2020 @05:29AM (#23625905)
Guess I’m the one who didn’t get the joke as well.
Re:Elevator.js – A “back to top” button that behaves like a ... by imdsm on Wednesday June 24, 2020 @04:05AM (#23625385)
Ha. Now imagine one which did the opposite? You could even call them Home and End, or use arrow icons.
Re:Elevator.js – A “back to top” button that behaves like a ... by nicbou on Friday June 26, 2020 @08:02AM (#23651027)
On Mac: Fn + left

On iOS: double-tap the top bar

On Windows: use the home key

On Android: swipe your thumb a dozen times really quickly

Re:Elevator.js – A “back to top” button that behaves like a ... by retpirato on Wednesday June 24, 2020 @04:17PM (#23633343)
There is Vim/gVim for going to the beginning of the line.
Re:Elevator.js – A “back to top” button that behaves like a ... by fortran77 on Wednesday June 24, 2020 @09:34AM (#23627677)
Many Apple keyboards have no "home" button.
Re:Elevator.js – A “back to top” button that behaves like a ... by remix2000 on Wednesday June 24, 2020 @05:04PM (#23633861)
Fn+Left Arrow emulates HOME on most Mac keebs lacking that key. Hope it works on your too :)
Re:Elevator.js – A “back to top” button that behaves like a ... by fortran77 on Wednesday June 24, 2020 @05:40PM (#23634191)
I don't know! I run Windows 10, BTW.
Re:Elevator.js – A “back to top” button that behaves like a ... by buboard on Wednesday June 24, 2020 @05:00AM (#23625748)
it's useful in mobile though!
Re:Elevator.js – A “back to top” button that behaves like a ... by remix2000 on Wednesday June 24, 2020 @02:29AM (#23624753)
If I understand correctly you are talking about a button that already exists on most keebs and is called HOME.
Re:Elevator.js – A “back to top” button that behaves like a ... by geniium on Wednesday June 24, 2020 @08:43AM (#23627200)
hahaha nice thread