CoolFace
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes838downloads
KeyDev.txt23 linesDownload Raw Back to Doc
1 2The editor mostly stays in a GetKey()/PutKey() loop.  The putkey portion is3where keys are acted-upon.  TempleOS has a chain of putkey hndlrs in a4Circular Queue with priorities.  The highest priority hndlrs can choose to5terminate handling, otherwise, the keys get sent on down the chain.6 7KeyDevAdd() defines a putkey device with a priority.  "Device" might be a8misnomer.  Currently, the following are defined:9 10Priority    Hndlr11---------- ---------120x20000000 MyPutKey() user hndlr130x40000000 KDInputFilterPutKey() for In(), InStr(), and InFile() handling.140x60000000 KDRawPutKey() nonwindowed direct to video mem debug output.150x80000000 KDDocPutKey() standard document cmds16 17Since handling individual keys is slow, TempleOS supports PutS() as well.  If no18puts hndlr is defined, individual keys are sent.19 20CDoc.user_put_key and CDoc.user_put_s are call back routines which offer some21neat tricks.  See ::/Apps/Psalmody/JukeBox.HC.  There is a var CDoc.user_put_dat22a which gets passed to them.23