Aha neat.
Shift+t would make more sense, but otherwise I agree.
Aha neat.
Shift+t would make more sense, but otherwise I agree.
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.
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.
[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.
I have this programmed. Once my other PRs are accepted, Iāll push this one through too.
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!
PR for Reply as New Topic:
https://github.com/discourse/discourse/pull/2724
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.
Download https://raw.githubusercontent.com/discourse/discourse/master/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js
Make adjustments.
Create a diff file and move into the docker shared folder.
Add a line to app.yml to patch keyboard_shortcuts.js:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone https://github.com/discourse/docker_manager.git
- patch ../app/assets/javascripts/discourse/lib/keyboard_shortcuts.js < /shared/keys.diff
Rebuild Discourse: ./launcher rebuild app
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 )
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.
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.)
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.
Thanks - itās not a problem. I just wanted to clarify that this is the expected behaviour.
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.
Done.
My āwishlistā for a couple keyboard shortcuts:
You mean the Home and End keys? Or am I missing something that yours does, mine doesnāt?
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!
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?