Enable hotkeys
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
d297998910
commit
2c796658dc
1 changed files with 26 additions and 26 deletions
|
@ -138,31 +138,31 @@ import 'soapbox/components/status';
|
||||||
const EmptyPage = HomePage;
|
const EmptyPage = HomePage;
|
||||||
|
|
||||||
const keyMap = {
|
const keyMap = {
|
||||||
// help: '?',
|
help: '?',
|
||||||
// new: 'n',
|
new: 'n',
|
||||||
// search: 's',
|
search: 's',
|
||||||
// forceNew: 'option+n',
|
forceNew: 'option+n',
|
||||||
// reply: 'r',
|
reply: 'r',
|
||||||
// favourite: 'f',
|
favourite: 'f',
|
||||||
// react: 'e',
|
react: 'e',
|
||||||
// boost: 'b',
|
boost: 'b',
|
||||||
// mention: 'm',
|
mention: 'm',
|
||||||
// open: ['enter', 'o'],
|
open: ['enter', 'o'],
|
||||||
// openProfile: 'p',
|
openProfile: 'p',
|
||||||
// moveDown: ['down', 'j'],
|
moveDown: ['down', 'j'],
|
||||||
// moveUp: ['up', 'k'],
|
moveUp: ['up', 'k'],
|
||||||
// back: 'backspace',
|
back: 'backspace',
|
||||||
// goToHome: 'g h',
|
goToHome: 'g h',
|
||||||
// goToNotifications: 'g n',
|
goToNotifications: 'g n',
|
||||||
// goToFavourites: 'g f',
|
goToFavourites: 'g f',
|
||||||
// goToPinned: 'g p',
|
goToPinned: 'g p',
|
||||||
// goToProfile: 'g u',
|
goToProfile: 'g u',
|
||||||
// goToBlocked: 'g b',
|
goToBlocked: 'g b',
|
||||||
// goToMuted: 'g m',
|
goToMuted: 'g m',
|
||||||
// goToRequests: 'g r',
|
goToRequests: 'g r',
|
||||||
// toggleHidden: 'x',
|
toggleHidden: 'x',
|
||||||
// toggleSensitive: 'h',
|
toggleSensitive: 'h',
|
||||||
// openMedia: 'a',
|
openMedia: 'a',
|
||||||
};
|
};
|
||||||
|
|
||||||
interface ISwitchingColumnsArea {
|
interface ISwitchingColumnsArea {
|
||||||
|
@ -587,7 +587,7 @@ const UI: React.FC<IUI> = ({ children }) => {
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
hotkeys.current.__mousetrap__.stopCallback = (_e, element) => {
|
hotkeys.current.__mousetrap__.stopCallback = (_e, element) => {
|
||||||
return ['TEXTAREA', 'SELECT', 'INPUT', 'EM-EMOJI-PICKER'].includes(element.tagName);
|
return ['TEXTAREA', 'SELECT', 'INPUT', 'EM-EMOJI-PICKER'].includes(element.tagName) || !!element.closest('[contenteditable]');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue