News for hackers. Stuff that matters.
Re:Comments by a developer inside the Windows Media Player s... by dijit on Saturday September 26, 2020 @08:05PM (#24603151)
I think you’re mistaken, YouTube (in all the forms I use it with a keyboard at least) supports spacebar as a pause key.

Your browser might try to pop you down half a page if the thing that is selected or highlighted on the page is not the video player itself though. But it works 100% of the time in fullscreen.

Re:Comments by a developer inside the Windows Media Player s... by exikyut on Sunday September 27, 2020 @12:11AM (#24604172)
YouTube's keyboard handling is Insanely Intuitive™, I must absolutely agree.

Usefully, the up/down keys don't change the volume unless the player is also focused.

What's incredibly sad is that j/k/l were agreed upon to rewind/pause/forward the video, and these generally work unless you're in a textbox... but dedicated keys were not similarly approved to control the volume.

--

My current winner for Absolutely Favorite Piece Of YouTube-Related Keyboard Functionality©®℠ is...

YouTube Music (https://music.youtube.com/)... which uses a different set of fundamental keyboard shortcuts to YouTube. [;]=pause, [j]=next, [k]=prev, [l]=forward, [h]=rewind.

There are two disasters here.

The first is that <YouTube/pause> == <YouTube Music/rewind to beginning>. "Nooooo! I was 2 hours?? and how many seconds??? into this video... >.<". Naturally, in this situation, I ReWoUnD ThE ViDeO To ThE BeGiNnInG MySeLf, so YouTube's "last play position" indicator can't help me here. YAYYY.

The second disaster is that it's obvious a Vim user clearly argued successfully for Music to use Vi-style hjkl, but both the key choices and how they are presented in the UI could not be less intuitive, regardless of whether the user also uses Vim or not.

I copied above exactly how the UI (in the [?] popup) lists the sequence. Specifically, the whole thing is shifted left by 1 position, wrapping [h] around to the right. Fixing that to show the sequence how a Vim user would expect, it looks like: [h]=rewind, [j]=next, [k]=prev, [l]=forward.

But then, any Vim user is going to be utterly confused by this sequence, not only because of the mild readjustment of assigning up/down to prev/next and left/right to seeking - but because Vim "up" [j] is assigned to "next", and Vim "down" [k] is assigned to "prev".

Upside down playlist much?!?!

I no longer use YouTube Music, solely because of the number of long videos I have rewound and lost my position in.

I'm also incidentally trying to passively commit hjkl to memory (you know, the whole spaced repetition thing), and all the above was just too confusing.

Re:Comments by a developer inside the Windows Media Player s... by ogurechny on Sunday September 27, 2020 @04:48AM (#24605195)
Not sure if whether it is intended, or a weird combination of my browser and extensions, but right now, if I click on the play/pause button on Youtube video page, it becomes focused (with a visual clue of a blue box), and then pressing space bar starts and stops (or stops and starts) the video in rapid succession because it is considered a keyboard command and a button activation at the same time.

Actually, not quite at the same time, and that returns us to the old question of viability of reinventing GUIs in Javascript. I guess that even around 1990 window messages of some kind appearing with such a delay from a single action would mean the GUI is based on wrong principles, or the programmer doesn't know how to use it.

It's even funnier to imagine what happens when you press and hold space. The button icon is mostly in in-between animation state from all the repeated presses, but the video starts or stops only on first press and on release. Guess how much fun people have programming window system inside a virtual machine inside a browser using window system inside real machine.

Re:Comments by a developer inside the Windows Media Player s... by senkora on Sunday September 27, 2020 @01:39AM (#24604463)
> Vim "up" [j] is assigned to "next", and Vim "down" [k] is assigned to "prev".

j is down and k is up in vim

Re:Comments by a developer inside the Windows Media Player s... by schoen on Sunday September 27, 2020 @02:18AM (#24604615)
Originally derived from https://en.wikipedia.org/wiki/ADM-3A#ADM-3A, which I only learned (maybe from HN) long after becoming a vi user.

Edit: I've wondered whether the Dance Dance Revolution on-screen arrow order https://en.wikipedia.org/wiki/Dance_Dance_Revolution#/media/..., which I also have deep in my muscle memory, is somehow also related to the hjkl arrows (as it also goes ← ↓ ↑ → horizontally).

Re:Comments by a developer inside the Windows Media Player s... by Moru on Sunday September 27, 2020 @03:21AM (#24604885)
Wait, a mouse driven application is using the right hand keys for shortcuts? Yes, that sounds very handy for a left hand mouse user.

I prefer to be able to set my keys myself. I use the left hand WASD keys together with ctrl+shift for most things so I can control the music in any application (with winamp). No need to find buttons, the hand is already there even if I'm using the mouse with the right hand.

Re:Comments by a developer inside the Windows Media Player s... by ThePadawan on Sunday September 27, 2020 @03:46PM (#24609581)
> (...) but dedicated keys were not similarly approved to control the volume.

Arrow-up and arrow-down?

Re:Comments by a developer inside the Windows Media Player s... by dkdk8283 on Saturday September 26, 2020 @11:31PM (#24604020)
Youtube itself changed the space bar behavior from context specific (pause if player in focus, scroll of comment in focus) but they rolled that back so space is always pause.

I like the context sensitive behavior and wrote a grease mo key script to restore it.

Re:Comments by a developer inside the Windows Media Player s... by jailbird_bd on Sunday September 27, 2020 @05:02AM (#24605247)
Run into a strange behavior though. When I pause the video with the mouse (and consequently, leave the pointer above the play button), and later try to continue the play with space, it will double-press the play button and pause the video again.
Re:Comments by a developer inside the Windows Media Player s... by chrismorgan on Sunday September 27, 2020 @08:03AM (#24605995)
The play button is focused, and pressing Space activates a button. So it resumes playback. Then the key handler kicks in, and recognises that Space should pause playback, so it does that.

(I don’t know which order the two things happen in, but clearly they should make sure both don’t happen.)

Re:Comments by a developer inside the Windows Media Player s... by II2II on Sunday September 27, 2020 @05:50AM (#24605482)
Thank you for pointing that out since it seems to explain why the space bar behaves erratically. I far prefer the space bar to hunting down the k-key when trying to relax.
Re:Comments by a developer inside the Windows Media Player s... by ezconnect on Sunday September 27, 2020 @07:44AM (#24605913)
My problem with Youtube is when you're not watching a video the spacebar doesn't respond to its default behavior in the browser of doing a page down.
Re:Comments by a developer inside the Windows Media Player s... by httpsterio on Sunday September 27, 2020 @08:02AM (#24605985)
Unless your tab focus is on the other controls like volume :)