mirror of https://github.com/vector-im/riot-web
Merge pull request #4392 from matrix-org/t3chguy/electron-forward-back
Add riot-desktop shortcuts for forward/back matching browsers&slackpull/21833/head
commit
4c7bc61174
|
@ -188,4 +188,8 @@ export default class BasePlatform {
|
|||
const callbackUrl = this.getSSOCallbackUrl(mxClient.getHomeserverUrl(), mxClient.getIdentityServerUrl());
|
||||
window.location.href = mxClient.getSsoLoginUrl(callbackUrl.toString(), loginType); // redirect to SSO
|
||||
}
|
||||
|
||||
onKeyDown(ev: KeyboardEvent): boolean {
|
||||
return false; // no shortcuts implemented
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ export const Key = {
|
|||
BACKTICK: "`",
|
||||
SPACE: " ",
|
||||
SLASH: "/",
|
||||
SQUARE_BRACKET_LEFT: "[",
|
||||
SQUARE_BRACKET_RIGHT: "]",
|
||||
A: "a",
|
||||
B: "b",
|
||||
C: "c",
|
||||
|
|
|
@ -41,6 +41,7 @@ import MatrixClientContext from "../../contexts/MatrixClientContext";
|
|||
import * as KeyboardShortcuts from "../../accessibility/KeyboardShortcuts";
|
||||
import HomePage from "./HomePage";
|
||||
import ResizeNotifier from "../../utils/ResizeNotifier";
|
||||
import PlatformPeg from "../../PlatformPeg";
|
||||
// We need to fetch each pinned message individually (if we don't already have it)
|
||||
// so each pinned message may trigger a request. Limit the number per room for sanity.
|
||||
// NB. this is just for server notices rather than pinned messages in general.
|
||||
|
@ -462,6 +463,11 @@ class LoggedInView extends React.PureComponent<IProps, IState> {
|
|||
});
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// if we do not have a handler for it, pass it to the platform which might
|
||||
handled = PlatformPeg.get().onKeyDown(ev);
|
||||
}
|
||||
|
||||
if (handled) {
|
||||
|
|
Loading…
Reference in New Issue