diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx index 8eb97ac2a3..4e24a3e288 100644 --- a/app/javascript/flavours/glitch/components/status.jsx +++ b/app/javascript/flavours/glitch/components/status.jsx @@ -473,6 +473,7 @@ class Status extends ImmutablePureComponent { bookmark: this.handleHotkeyBookmark, toggleSensitive: this.handleHotkeyToggleSensitive, openMedia: this.handleHotkeyOpenMedia, + onTranslate: this.handleTranslate, }; let prepend, rebloggedByText; diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx index 8e5b4a9ea8..81fd947abd 100644 --- a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx @@ -70,6 +70,10 @@ class KeyboardShortcuts extends ImmutablePureComponent { enter, o + + t + + e diff --git a/app/javascript/flavours/glitch/features/status/index.jsx b/app/javascript/flavours/glitch/features/status/index.jsx index e977f02b7f..0247b67f81 100644 --- a/app/javascript/flavours/glitch/features/status/index.jsx +++ b/app/javascript/flavours/glitch/features/status/index.jsx @@ -485,6 +485,10 @@ class Status extends ImmutablePureComponent { this.props.history.push(`/@${this.props.status.getIn(['account', 'acct'])}`); }; + handleHotkeyTranslate = () => { + this.handleTranslate(this.props.status); + }; + handleMoveUp = id => { const { status, ancestorsIds, descendantsIds } = this.props; @@ -677,6 +681,7 @@ class Status extends ImmutablePureComponent { toggleHidden: this.handleToggleHidden, toggleSensitive: this.handleHotkeyToggleSensitive, openMedia: this.handleHotkeyOpenMedia, + onTranslate: this.handleHotkeyTranslate, }; return ( diff --git a/app/javascript/flavours/glitch/features/ui/index.jsx b/app/javascript/flavours/glitch/features/ui/index.jsx index ac29cee836..96a8fe89a3 100644 --- a/app/javascript/flavours/glitch/features/ui/index.jsx +++ b/app/javascript/flavours/glitch/features/ui/index.jsx @@ -136,6 +136,7 @@ const keyMap = { bookmark: 'd', toggleSensitive: 'h', openMedia: 'e', + onTranslate: 't', }; class SwitchingColumnsArea extends PureComponent {