Keyboard shortcuts aren't rate limited

(Rikki Tooley) #1

Continuing the discussion from Keyboard shortcuts wish list:

  1. hold down any keyboard shortcut
  2. enjoy!

My personal favourite is to hold down = and p at the same time

Or for something reminiscent of Windows XP, hold down Shift+R while constructing a new topic on a topic page :smiley:

Keyboard shortcut J/K(Next/Previous) continues key down cause screen flickering and scroll jerkiness
(TechnoBear) #3

I’ve run into the j/k issue, but I can live with it. # to move to a given post number, plus Home and End are pretty helpful for “long-distance travelling”. :slight_smile:

Marking the topic as watched, etc., with m + r, m + t and m + w are all problematic for me. If I hesitate at all before pressing the second key, it registers as m + m and mutes the topic.

(This may be a problem with me, rather than the shortcuts, as my co-ordination is a bit iffy.)

Edit: Or maybe it’s not just me:

(Rikki Tooley) #4

J and K are particularly bad with this problem.

I think the solution is to only fire the trigger associated with the shortcut on key up - not repeatedly while the key is pressed. And then do some rate limiting to allow for holding down certain shortcuts (just J and K really).

(Jeff Atwood) #5

Maybe something you could look at, @cpradio.

(cpradio) #7

Yeah, I starred it. So as I work through my items, I’ll take a look into this as well :smile:

I’ll have to be extra careful with this one to ensure I don’t break existing functionality, so it won’t be quick :smile:

(cpradio) #8

J and K worked pretty well for me, but the way it is currently setup it is an all or nothing approach (per grouping). I’ve got a change that forces keyup to be used for all shortcuts right now and it definitely solves the problem indicated by this bug.

I haven’t run into any issues with it yet, but I want to play with it a bit longer before I send a PR for it (this change was a lot easier than I anticipated).

(cpradio) #9

PR Sent. It forces keyup to be used for all shortcuts except j/k. J/K are not rate limited yet, but this opens them up to be rate limited and the others should be single keypresses.

(TechnoBear) #10

@cpradio - do I take it from the discussion at github that this isn’t being deployed? (I ask because I still keep accidentally muting topics.)

(cpradio) #11

Yes. Need to find a better solution. Keyup works for some, but might not be best… and it won’t solve your scenario.

(Sam Saffron) #12