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?