# Keyboard shortcuts wish list

**URL:** https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952
**Category:** Feature
**Tags:** keyboard-shortcuts
**Created:** [25.Май.2014 10:36:55 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952 "2014-05-25T10:36:55Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![fysics](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fysics/32/34080_2.png) [@fysics](https://meta.discourse.org/u/fysics)
#### Post date: [29.Август.2014 08:54:09 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/21 "2014-08-29T08:54:09Z")

</div>

Aha neat.

Shift+t would make more sense, but otherwise I agree.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [29.Август.2014 08:57:48 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/22 "2014-08-29T08:57:48Z")

</div>

I swithered over that, but left off the Shift because it’s replying to a post (as new topic), not to the topic. But either way, I’d be delighted to hacve it.

---

<div class="post-metadata">

### Author: ![fysics](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fysics/32/34080_2.png) [@fysics](https://meta.discourse.org/u/fysics)
#### Post date: [29.Август.2014 09:24:00 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/23 "2014-08-29T09:24:00Z")

</div>

It would just be difficult to target the correct post from a keyboard shortcut if you’re opening it as a reply.

I figured the Shift+T would just target the first post in the topic as its source.

Shift+T from the topic list would open a topic in whatever category you’re browsing.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [29.Август.2014 10:22:07 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/24 "2014-08-29T10:22:07Z")

</div>

[quote=“fysics, post:23, topic:15952”]  
It would just be difficult to target the correct post from a keyboard shortcut if you’re opening it as a reply.  
[/quote]Actually, it’s a doddle. 😄  
Use j/k to move through the thread to the relevant post, which brings it into focus to use the appropriate keyboard shortcut for the post action.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [29.Август.2014 14:07:54 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/25 "2014-08-29T14:07:54Z")

</div>

I have this programmed. Once my other PRs are accepted, I’ll push this one through too.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [29.Август.2014 21:21:43 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/26 "2014-08-29T21:21:43Z")

</div>

There is a lot of info in this thread, can everyone take a quick read again and verify the only missing item left is Reply to Topic.

Thanks!

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [29.Август.2014 23:25:06 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/27 "2014-08-29T23:25:06Z")

</div>

PR for Reply as New Topic:  
[https://github.com/discourse/discourse/pull/2724](https://github.com/discourse/discourse/pull/2724)

---

<div class="post-metadata">

### Author: ![fysics](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fysics/32/34080_2.png) [@fysics](https://meta.discourse.org/u/fysics)
#### Post date: [31.Август.2014 08:27:52 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/28 "2014-08-31T08:27:52Z")

</div>

Is it possible to set custom keyboard shortcuts or alter them without editing `app/assets/javascripts/discourse/lib/keyboard_shortcuts.js`?

I should rephrase. It’s definitely possible. What’s the easiest way to do that?

* * *

**EDIT** : Here’s what I did, roughly. I’m on a docker install.

1. Download `https://raw.githubusercontent.com/discourse/discourse/master/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js`

2. Make adjustments.

3. Create a diff file and move into the docker shared folder.

4. Add a line to app.yml to patch keyboard\_shortcuts.js:

5. Rebuild Discourse: `./launcher rebuild app`

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [31.Август.2014 10:30:12 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/29 "2014-08-31T10:30:12Z")

</div>

What changes did you make? Would it make more sense to have them in core?

---

<div class="post-metadata">

### Author: ![fysics](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fysics/32/34080_2.png) [@fysics](https://meta.discourse.org/u/fysics)
#### Post date: [02.Сентябрь.2014 04:53:13 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/30 "2014-09-02T04:53:13Z")

</div>

> [@cpradio](#):
>
> What changes did you make? Would it make more sense to have them in core?

I added a shortcut for ` to reply to the current topic by duplicating the shortcut for Shift+R.

I then removed the existing shortcuts for ` and ~. I wasn’t sure if it would interfere, but I wanted to play it safe.

I mainly did this because my userbase is used to that shortcut from another board and they appreciate the consistency.

The only useful request that I can make of this is that admin or possibly even per-user customization of default keyboard shortcuts would be great.

(fyi, my patch file broke after about 2 commits. So much for that quick fix 😝)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [02.Сентябрь.2014 10:05:07 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/31 "2014-09-02T10:05:07Z")

</div>

Yeah, I know one of my commits lately completely removes ` and ~ so that part is now done (because they weren’t good for German keyboard layouts, so they were replaced with shift k and shift j). The shift+R to ` would still need to exist.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [16.Сентябрь.2014 13:14:14 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/32 "2014-09-16T13:14:14Z")

</div>

Maybe I’m misunderstanding what you’ve said here, but my experience is that focus is not set on either the profile or the hamburger menus when first opened; they need to be closed then opened again and all is well. Nothing will set focus on the notification menu.

Is that what you meant, and I’m just misreading it, or…?

(Tested on Firefox and Chromium.)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [16.Сентябрь.2014 14:41:58 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/33 "2014-09-16T14:41:58Z")

</div>

Yeah, it is because the content is loaded after the menu is called, it is dynamically placed into the menu. But if you press it twice, it works the second time around. So definitely has room for improvement, low on the list though.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [16.Сентябрь.2014 14:43:50 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/34 "2014-09-16T14:43:50Z")

</div>

Thanks - it’s not a problem. I just wanted to clarify that this is the expected behaviour.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [16.Сентябрь.2014 14:44:56 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/35 "2014-09-16T14:44:56Z")

</div>

For now. I’d like to see that opened as a Bug though, as it really shouldn’t happen that way, and I’ll lose it in this thread ☹

I keep coming here and removing the Star because I think I’ve completed it.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [16.Сентябрь.2014 14:52:00 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/36 "2014-09-16T14:52:00Z")

</div>

> [@cpradio](#):
>
> I’d like to see that opened as a Bug though

Done. ![](https://global.discourse-cdn.com/meta/original/3X/0/4/0498df5e332762342012b3888726ecea7902ae6e.gif)

---

<div class="post-metadata">

### Author: ![cregox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cregox/32/115904_2.png) [@cregox](https://meta.discourse.org/u/cregox)
#### Post date: [16.Сентябрь.2014 15:03:09 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/37 "2014-09-16T15:03:09Z")

</div>

My “wishlist” for a couple keyboard shortcuts:

- H move selection to top (similar to current # + 1 + enter 
- L move selection to bottom (similar to current # + 999 + enter

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [16.Сентябрь.2014 15:04:24 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/38 "2014-09-16T15:04:24Z")

</div>

You mean the Home and End keys? Or am I missing something that yours does, mine doesn’t?

---

<div class="post-metadata">

### Author: ![cregox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cregox/32/115904_2.png) [@cregox](https://meta.discourse.org/u/cregox)
#### Post date: [16.Сентябрь.2014 15:06:54 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/39 "2014-09-16T15:06:54Z")

</div>

Aha! On my mac there are no such keys, unless I use Fn + Left arrow for Home. We hardly do that on macs, so much I’ve wrongly tried it with Up arrow, it didn’t work, and I gave up! 😛

Also that’s not on the ? Help! ☹

Thanks! 🙂

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [16.Сентябрь.2014 15:09:58 UTC](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952/40 "2014-09-16T15:09:58Z")

</div>

You are correct, that they aren’t listed. @codinghorror, I’m torn to add it because 1) there is code behind those buttons (since Discourse uses infinite scrolling), but 2) it is mimicking existing browser functionality, so it does what a browser would do if ALL the data already existed on the page.

Your thoughts?

[Предыдущая страница](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952.md?page=1)

[Следующая страница](https://meta.discourse.org/t/keyboard-shortcuts-wish-list/15952.md?page=3)
