templeos-info/public/Wb/Home/Doc/KeyDev.DD.HTML

52 lines
4.0 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
<pre style="font-family: courier, monospace; font-size: 10pt;">
<a name="l1"></a><span class=cF0>The editor mostly stays in a </span><a href="/Wb/Kernel/SerialDev/Message.HC#l142"><span class=cF4>GetKey</span></a><span class=cF0>()/</span><a href="/Wb/Kernel/KeyDev.HC#l1"><span class=cF4>PutKey</span></a><span class=cF0>() loop. The putkey portion is
<a name="l2"></a>where keys are acted-upon. TempleOS has a chain of putkey hndlrs in a </span><span class=cF4>
<a name="l3"></a><u>Circular Queue</u></span><span class=cF0> with priorities. The highest priority hndlrs can choose to
<a name="l4"></a>terminate handling, otherwise, the keys get sent on down the chain.
<a name="l5"></a></span><span class=cF4>
<a name="l6"></a></span><a href="/Wb/Kernel/KeyDev.HC#l70"><span class=cF4>KeyDevAdd</span></a><span class=cF0>() defines a putkey device with a priority. &quot;Device&quot; might be a
<a name="l7"></a>misnomer. Currently, the following are defined:
<a name="l8"></a>
<a name="l9"></a>Priority Hndlr
<a name="l10"></a>---------- ---------
<a name="l11"></a></span><span class=cF2>0x20000000</span><span class=cF0> </span><a href="/Wb/Home/HomeKeyPlugIns.HC#l11"><span class=cF4>MyPutKey</span></a><span class=cF0>() user hndlr
<a name="l12"></a></span><span class=cF2>0x40000000</span><span class=cF0> </span><a href="/Wb/Kernel/KeyDev.HC#l108"><span class=cF4>KDInputFilterPutKey</span></a><span class=cF0>() for </span><a href="/Wb/Kernel/Job.HC#l482"><span class=cF4>In</span></a><span class=cF0>(), </span><a href="/Wb/Kernel/Job.HC#l464"><span class=cF4>InStr</span></a><span class=cF0>(), and </span><a href="/Wb/Kernel/Job.HC#l474"><span class=cF4>InFile</span></a><span class=cF0>() handling.
<a name="l13"></a></span><span class=cF2>0x60000000</span><span class=cF0> </span><a href="/Wb/Kernel/KeyDev.HC#l88"><span class=cF4>KDRawPutKey</span></a><span class=cF0>() nonwindowed direct to video mem debug output.
<a name="l14"></a></span><span class=cF2>0x80000000</span><span class=cF0> </span><a href="/Wb/Adam/DolDoc/DocPutKey.HC#l723"><span class=cF4>KDDocPutKey</span></a><span class=cF0>() standard document cmds
<a name="l15"></a>
<a name="l16"></a>Since handling individual keys is slow, TempleOS supports PutS() as well. If no
<a name="l17"></a>puts hndlr is defined, individual keys are sent.
<a name="l18"></a></span><span class=cF4>
<a name="l19"></a></span><a href="/Wb/Kernel/KernelA.HH#l1367"><span class=cF4>CDoc</span></a><span class=cF2>.user_put_key</span><span class=cF0> and </span><a href="/Wb/Kernel/KernelA.HH#l1367"><span class=cF4>CDoc</span></a><span class=cF2>.user_put_s</span><span class=cF0> are call back routines which offer some
<a name="l20"></a>neat tricks. See </span><a href="/Wb/Apps/Psalmody/JukeBox.HC#l1"><span class=cF4>::/Apps/Psalmody/JukeBox.HC</span></a><span class=cF0>. There is a var </span><a href="/Wb/Kernel/KernelA.HH#l1367"><span class=cF4>CDoc</span></a><span class=cF2>.user_put_dat
<a name="l21"></a>a</span><span class=cF0> which gets passed to them.
</span></pre></body>
</html>