# Use keyboard shortcuts, regardless of the keyboard layout

**URL:** https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149
**Category:** Feature
**Tags:** keyboard-shortcuts
**Created:** [2017 年 2 月 9 日午前 6:46 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149 "2017-02-09T06:46:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![youwiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/youwiki/32/89936_2.png) [@youwiki](https://meta.discourse.org/u/youwiki)
#### Post date: [2017 年 2 月 9 日午前 6:46 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/1 "2017-02-09T06:46:52Z")

</div>

Good afternoon!

To use keyboard shortcuts to the user with different from the Latin keyboard layout, must switch it first. It is not too convenient.

Maybe it makes sense to add bindings to the file `app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6` for the keys that relevant to Latin keys?

Here is implementation for users with a Cyrillic keyboard:

> ```
> '№': {handler: 'goToPost', anonymous: true},
> '\\': {handler: 'toggleSearch', anonymous: true},
> '+': {handler: 'toggleHamburgerMenu', anonymous: true},
> ',': {handler: 'showHelpModal', anonymous: true},
> 'ю': {click: '.alert.alert-info.clickable', anonymous: true}, // show incoming/updated topics
> 'и': {handler: 'toggleBookmark'},
> 'с': {handler: 'createTopic'},
> 'ctrl+а': {handler: 'showPageSearch', anonymous: true},
> 'command+а': {handler: 'showPageSearch', anonymous: true},
> 'ctrl+з': {handler: 'printTopic', anonymous: true},
> 'command+з': {handler: 'printTopic', anonymous: true},
> 'в': {postAction: 'deletePost'},
> 'у': {postAction: 'editPost'},
> 'end': {handler: 'goToLastPost', anonymous: true},
> 'command+down': {handler: 'goToLastPost', anonymous: true},
> 'а': {handler: 'toggleBookmarkTopic'},
> 'п р': {path: '/', anonymous: true},
> 'п д': {path: '/latest', anonymous: true},
> 'п т': {path: '/new'},
> 'п г': {path: '/unread'},
> 'п с': {path: '/categories', anonymous: true},
> 'п е': {path: '/top', anonymous: true},
> 'п и': {path: '/bookmarks'},
> 'п з': {path: '/my/activity'},
> 'п ь': {path: '/my/messages'},
> 'home': {handler: 'goToFirstPost', anonymous: true},
> 'command+up': {handler: 'goToFirstPost', anonymous: true},
> 'о': {handler: 'selectDown', anonymous: true},
> 'л': {handler: 'selectUp', anonymous: true},
> 'д': {click: '.topic-post.selected button.toggle-like'},
> 'ь ь': {handler: 'setTrackingToMuted'}, // mark topic as muted
> 'ь к': {handler: 'setTrackingToRegular'}, // mark topic as regular
> 'ь е': {handler: 'setTrackingToTracking'}, // mark topic as tracking
> 'ь ц': {handler: 'setTrackingToWatching'}, // mark topic as watching
> 'щ': {click: '.topic-list tr.selected a.title', anonymous: true}, // open selected topic
> 'з': {handler: 'showCurrentUser'},
> 'й': {handler: 'quoteReply'},
> 'к': {postAction: 'replyToPost'},
> 'ы': {click: '.topic-post.selected a.post-date', anonymous: true}, // share post
> 'shift+о': {handler: 'nextSection', anonymous: true},
> 'shift+л': {handler: 'prevSection', anonymous: true},
> 'shift+з': {handler: 'pinUnpinTopic'},
> 'shift+к': {handler: 'replyToTopic'},
> 'shift+ы': {click: '#topic-footer-buttons button.share', anonymous: true}, // share topic
> 'shift+я shift+я': {handler: 'logout'},
> 'е': {postAction: 'replyAsNewTopic'},
> 'г': {handler: 'goBack', anonymous: true},
> 'ч к': {click: '#dismiss-new,#dismiss-new-top,#dismiss-posts,#dismiss-posts-top'}, // dismiss new/posts
> 'ч е': {click: '#dismiss-topics,#dismiss-topics-top'} // dismiss topics
> 
> ```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017 年 2 月 9 日午後 1:44 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/2 "2017-02-09T13:44:44Z")

</div>

My concern here is around the overlapping letters like a and e.

Perhaps a site setting to switch this for communities that use Cyrillic? Which locales do we have now that use this layout?

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [2017 年 2 月 9 日午後 6:00 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/3 "2017-02-09T18:00:30Z")

</div>

> [@sam](#):
>
> My concern here is around the overlapping letters like a and e.

**a** and **а** might look the same, but are different characters: [a а](http://qaz.wtf/u/show.cgi?show=a+%D0%B0&type=string)

Same with **e** and **е**. I expect users of Cyrillic keyboards will get that immediately.

---

<div class="post-metadata">

### Author: ![youwiki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/youwiki/32/89936_2.png) [@youwiki](https://meta.discourse.org/u/youwiki)
#### Post date: [2017 年 2 月 10 日午前 6:42 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/4 "2017-02-10T06:42:21Z")

</div>

Here are the Cyrillic-Latin keyboard:

 ![](https://global.discourse-cdn.com/meta/original/3X/4/7/47443cc50cb54d639c59cefa0f6f583262c6943b.png)

I mean here that if at the moment I have Cyrillic layout, then i should switch it (Shift+Alt) to Latin for Discourse keyboard shortcuts using.

I propose to add additional bindings to resolve this issue, for example:

- for share: `'s,ы': {click: '.topic-post.selected a.post-date', anonymous: true}`
- for likes: `'l,д': {click: '.topic-post.selected button.toggle-like'}`  
etc. There is no overlapping.

---

<div class="post-metadata">

### Author: ![Alex\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_p/32/163548_2.png) [@Alex\_P](https://meta.discourse.org/u/Alex_P)
#### Post date: [2019 年 12 月 15 日午後 12:35 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/5 "2019-12-15T12:35:06Z")

</div>

はい、同意します

一部のレイアウトでショートカットが機能しないのは面倒です。

例えば、Ctrl+Ыはほとんどのアプリで Ctrl+S として機能し、Discourse でも Ctrl+🇷🇺 А は Ctrl+F として機能します。しかし、k や j などの他のショートカットは、ロシア語レイアウトではここでは機能しません。

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2019 年 12 月 30 日午前 2:29 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/6 "2019-12-30T02:29:03Z")

</div>

この問題を修正するプルリクエスト（PR）は歓迎します。チームにはロシア語配列のキーボードを使う人がいないためです。

GMail はここで期待通りに動作しますか？

---

<div class="post-metadata">

### Author: ![Alex\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_p/32/163548_2.png) [@Alex\_P](https://meta.discourse.org/u/Alex_P)
#### Post date: [2019 年 12 月 30 日午前 10:18 UTC](https://meta.discourse.org/t/use-keyboard-shortcuts-regardless-of-the-keyboard-layout/57149/7 "2019-12-30T10:18:23Z")

</div>

> [@sam](#):
>
> GMail はここで期待通りに機能しますか？

はい、YouTube も同様です。

> [@sam](#):
>
> チームにはロシア語配列のキーボードを持つ人は誰もいません。

テストは簡単です。OS に別の配列を追加して、普段と同じキーを押すだけで済みます。また、すべての OS にはバーチャルキーボード（オンスクリーンキーボード）が標準搭載されています。

* * *

最初の投稿で提案された回避策について、すべての非ラテン配列の文字ではなく、キーコードを使用する方がよいかもしれません。私の理解では、キーコードはどこでも同じはずです。

 ![Peek 2019-12-30 12-11](https://global.discourse-cdn.com/meta/original/3X/c/5/c51a01a3fa414c5a97e8fdedd1bb82d8ca9a7baa.gif)
