Use Alt-UP/DOWN for Composer History instead of random room change
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
876acc0f76
commit
6a10f0068d
2 changed files with 1 additions and 11 deletions
|
@ -292,16 +292,6 @@ const LoggedInView = React.createClass({
|
||||||
const ctrlCmdOnly = isOnlyCtrlOrCmdKeyEvent(ev);
|
const ctrlCmdOnly = isOnlyCtrlOrCmdKeyEvent(ev);
|
||||||
|
|
||||||
switch (ev.keyCode) {
|
switch (ev.keyCode) {
|
||||||
case KeyCode.UP:
|
|
||||||
case KeyCode.DOWN:
|
|
||||||
if (ev.altKey && !ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {
|
|
||||||
const action = ev.keyCode == KeyCode.UP ?
|
|
||||||
'view_prev_room' : 'view_next_room';
|
|
||||||
dis.dispatch({action: action});
|
|
||||||
handled = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case KeyCode.PAGE_UP:
|
case KeyCode.PAGE_UP:
|
||||||
case KeyCode.PAGE_DOWN:
|
case KeyCode.PAGE_DOWN:
|
||||||
if (!ev.ctrlKey && !ev.shiftKey && !ev.altKey && !ev.metaKey) {
|
if (!ev.ctrlKey && !ev.shiftKey && !ev.altKey && !ev.metaKey) {
|
||||||
|
|
|
@ -1241,7 +1241,7 @@ export default class MessageComposerInput extends React.Component {
|
||||||
selectHistory = async (up) => {
|
selectHistory = async (up) => {
|
||||||
const delta = up ? -1 : 1;
|
const delta = up ? -1 : 1;
|
||||||
|
|
||||||
// True if we are not currently selecting history, but composing a messag
|
// True if we are not currently selecting history, but composing a message
|
||||||
if (this.historyManager.currentIndex === this.historyManager.history.length) {
|
if (this.historyManager.currentIndex === this.historyManager.history.length) {
|
||||||
// We can't go any further - there isn't any more history, so nop.
|
// We can't go any further - there isn't any more history, so nop.
|
||||||
if (!up) {
|
if (!up) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue