feat: basic terminal printing
This commit is contained in:
18
src/app.ts
18
src/app.ts
@@ -0,0 +1,18 @@
|
||||
import { CreateKeyboardListeners } from './input/keyboard'
|
||||
import { Terminal } from './terminal/Terminal'
|
||||
import { EventBroadcaster } from './utils/EventBroadcaster'
|
||||
|
||||
// Initializes the app
|
||||
const init = () => {
|
||||
const localBroadcaster = new EventBroadcaster()
|
||||
|
||||
// creates keyboard listeners for the local event broadcaster
|
||||
CreateKeyboardListeners(
|
||||
(key: string) => localBroadcaster.emit('keydown', key),
|
||||
(key: string) => localBroadcaster.emit('keyup', key),
|
||||
)
|
||||
|
||||
const terminal = new Terminal()
|
||||
}
|
||||
|
||||
init()
|
||||
|
||||
Reference in New Issue
Block a user