scroll/src/deno/mod.ts

18 lines
338 B
JavaScript
Raw Normal View History

/**
* The main entrypoint when using Deno as the runtime
*/
2023-11-08 11:11:19 -05:00
import { getTermios } from '../common/mod.ts';
2023-11-01 15:05:31 -04:00
export * from './terminal_io.ts';
export async function init() {
const t = await getTermios();
2023-11-06 18:49:29 -05:00
t.enableRawMode();
globalThis.onbeforeunload = (): void => {
2023-11-06 18:49:29 -05:00
console.info('Disabling raw mode');
t.disableRawMode();
};
2023-11-01 15:27:31 -04:00
}