关闭主题的键盘快捷键

Is there a keyboard shortcut to close a topic?

4 个赞

No there is no such short cut, I think it makes sense to add a keyboard shortcut that opens the admin wrench, and then a second key like c could close a topic.

Going to mark this as a feature request.

Step 0 is figuring out what we want the shortcut to be for opening admin topic wrench.

14 个赞

Are there shortcuts not listed on the shortcut help modal?

Hey look, I can copy it!

Jump To

  • g, h Home
  • g, l Latest
  • g, n New
  • g, u Unread
  • g, c Categories
  • g, t Top
  • g, b Bookmarks
  • g, p Profile
  • g, m Messages
  • g, d Drafts

Navigation

  • u Back
  • # Go to post #
  • k/j Move selection ↑ ↓
  • o or Enter Open selected topic
  • Shift+j/Shift+k Next/previous section
  • Shift+l Go to the first unread post

Application

  • = Open hamburger menu
  • p Open user menu
  • . Show updated topics
  • / or Ctrl+Alt+f Search
  • ? Open keyboard help
  • x, r Dismiss New/Posts
  • x, t Dismiss Topics
  • Shift+z Shift+z Log Out

Composing

  • Shift+c Return to composer
  • Shift+F11 Fullscreen composer
  • c Create a new topic
  • t Reply as linked topic
  • Shift+r Reply to topic
  • r Reply to post
  • q Quote post

Actions

  • f Toggle bookmark topic
  • Shift+p Pin/Unpin topic
  • Shift+s Share topic
  • s Share post
  • l Like post
  • ! Flag post
  • b Bookmark post
  • e Edit post
  • d Delete post
  • m, m Mute topic
  • m, r Regular (default) topic
  • m, t Track topic
  • m, w Watch topic
  • Shift+u Defer topic
  • Ctrl+p Print topic

Aside from those, are any other reserved?

Also, I notice my keyboard is missing a wrench key (:wrench:), so my first choice is out. ¯\_(ツ)_/¯

I suggest Shift + a for opening the admin wrench.

6 个赞

I like Shift + a for opening the admin wrench. Can I work on it by opening a PR in GitHub? @sam

1 个赞

Yeah I think you can give it a shot in a PR the tricky thing though is that you need to be able to select stuff using the keyboard once it is open.

How do you foresee that working?

3 个赞

What about if once the admin wrench is open, navigate through it using the Up and Down keys? Then hitting Enter to select the option. I don’t know if this is possible, but just like an idea…

5 个赞

I support this if you can swing it, we do it on search, highlighting the selected button though may be a bit tricky, can you give it a shot and post a screenshot ?

3 个赞

Sure, I let you know when a I have something.

5 个赞

I have been having some trouble understanding ember.js, I have never worked with it before. I did this PR that only opens the topic admin menu, I hope this helps. If someone could help me with the other part, it will be greatly appreciated.

5 个赞

Shift+A 可以正常工作。但方向键在菜单中无效。希望能有一些快捷方式用于关闭、计时器等任务。

顺便问一下——有没有其他方式可以为我的一系列 UI 点击操作添加个人键盘快捷键?比如通过 Chrome 扩展?

1 个赞

更新:在代码中做了一些探索。关闭主题的快捷键可以与 pinUnpinTopic 和 deferTopic 快捷键非常相似。只需在主题类上调用 toggleClosed 即可。

 pinUnpinTopic() {
    this.container.lookup("controller:topic").togglePinnedState();
  },

@hectorbus - 你能把这个加进去吗?用 Shift+c 作为关闭快捷键怎么样?我本来可以自己做的,但目前还没配置好 GitHub 和编码环境。

1 个赞

我认为方向键功能从未被实现过,我尝试过但未能成功。关于个人键盘快捷键,我不确定是否有办法构建这个 Chrome 扩展,你可以尝试一下;此外,只要代码和功能获得批准,可以针对该新键盘快捷键提交新的 PR。

1 个赞

让我检查一下代码,看看 toggleClosed 是否可行,我觉得应该没问题。

1 个赞