mirror of
https://github.com/zellij-org/zellij.git
synced 2026-10-02 08:02:17 +00:00
* initial chrome * mobile state * feat(mobile-web): implement browser→server actions (fit toggle, single-pane fullscreen, pane/tab focus) with fullscreen-truth reconciliation * panning * remove mobile plugin * fix first load race * improve web handshake * rustfmt * cleanups * moar cleanups * add bundle asset check to ci * fix(mobile-web): tab-scope co-presence, yield single-pane to desktop clients, fix render-mode desync * make mobile use no-ui fullscreen * client side welcome screen for mobile * attach web clients to first tab on tiles surface * fix: opening new pane in mobile single mode no longer exits mobile single mode * mobile chrome light theme support * fix server races and flaky tests * rustfmt * fix flakes * add pr
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
import { installImeBypass } from "./ime-bypass.js";
|
|
import {
|
|
installSoftKeyboardCapture,
|
|
suppressSoftKeyboardOnTouch,
|
|
} from "./soft-keyboard.js";
|
|
import { installCustomKeyHandler } from "./key-handler.js";
|
|
import { installMouseHandlers } from "./mouse.js";
|
|
import { createPinchController } from "./pinch.js";
|
|
import { installTouchGestures } from "./touch.js";
|
|
import { initMobilePan } from "./mobile-pan.js";
|
|
|
|
export { setSoftKeyboard } from "./soft-keyboard.js";
|
|
|
|
export function setupInputHandlers(term, fitAddon, sendFunction) {
|
|
installImeBypass(term, sendFunction);
|
|
installSoftKeyboardCapture(term, sendFunction);
|
|
suppressSoftKeyboardOnTouch(term);
|
|
installCustomKeyHandler(term, sendFunction);
|
|
|
|
const terminalElement = document.getElementById("terminal");
|
|
initMobilePan({ term });
|
|
installMouseHandlers(term, terminalElement, sendFunction);
|
|
|
|
const pinch = createPinchController(term);
|
|
installTouchGestures({ term, terminalElement, sendFunction, pinch });
|
|
|
|
term.onData((data) => {
|
|
sendFunction(data);
|
|
});
|
|
|
|
term.onBinary((data) => {
|
|
const buffer = new Uint8Array(data.length);
|
|
for (let i = 0; i < data.length; ++i) {
|
|
buffer[i] = data.charCodeAt(i) & 255;
|
|
}
|
|
sendFunction(buffer);
|
|
});
|
|
}
|