Add keybinding infrastructure

This commit is contained in:
Simon Ser 2020-07-23 09:58:05 +02:00
parent 4d3a1548fe
commit 2951c7810f
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 59 additions and 6 deletions

View file

@ -8,17 +8,13 @@ import Connect from "/components/connect.js";
import Composer from "/components/composer.js";
import ScrollManager from "/components/scroll-manager.js";
import { html, Component, createRef } from "/lib/index.js";
import { SERVER_BUFFER, BufferType, Status, Unread } from "/state.js";
import { SERVER_BUFFER, BufferType, ReceiptType, Status, Unread } from "/state.js";
import commands from "/commands.js";
import { setup as setupKeybindings } from "/keybindings.js";
const CHATHISTORY_PAGE_SIZE = 100;
const CHATHISTORY_MAX_SIZE = 4000;
const ReceiptType = {
DELIVERED: "delivered",
READ: "read",
};
var messagesCount = 0;
function parseQueryString() {
@ -758,6 +754,8 @@ export default class App extends Component {
if (this.state.connectParams.autoconnect) {
this.connect(this.state.connectParams);
}
setupKeybindings(this);
}
render() {