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

67 lines
4.5 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<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 id="content">
<a name="l1"></a><span class=cF5> Char Overview</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a>A </span><span class=cF2>Char</span><span class=cF0>acter is a single byte holding an ASCII code for a letter, num or sym.
<a name="l4"></a>The </span><span class=cF2>TempleOS</span><span class=cF0> term is a </span><span class=cF2>U8</span><span class=cF0>.
<a name="l5"></a>
<a name="l6"></a>Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So,
<a name="l7"></a>an ASCII #3 is a </span><span class=cF2>&lt;CTRL-c&gt;</span><span class=cF0>. TempleOS uses a few nonstandard values below 32.
<a name="l8"></a>See </span><a href="/Wb/Kernel/KernelA.HH.HTML#l3456"><span class=cF4>Char Definitions</span></a><span class=cF0>.
<a name="l9"></a>
<a name="l10"></a>ASCII #5 is the cursor location in a saved file.
<a name="l11"></a>ASCII #28 is </span><span class=cF2>&lt;SHIFT-ESC&gt;</span><span class=cF0>.
<a name="l12"></a>ASCII #31 is a </span><span class=cF2>&lt;SHIFT-SPACE&gt;</span><span class=cF0>.
<a name="l13"></a>
<a name="l14"></a>TempleOS ASCII is 8-bit instead of 7-bit, so it also uses the range from
<a name="l15"></a>128-255. Press </span><span class=cF2>&lt;CTRL-ALT-a&gt;</span><span class=cF0> to see shapes for 128-255. Technically, </span><span class=cF2>&lt;CTRL-ALT-
<a name="l16"></a>a&gt;</span><span class=cF0> are </span><span class=cF4><u>scrn codes</u></span><span class=cF0>.
<a name="l17"></a>
<a name="l18"></a>A </span><span class=cF2>Key</span><span class=cF0> is typically specified with a scan code. TempleOS scan codes contain the
<a name="l19"></a>key value in the lowest </span><span class=cF2>U8</span><span class=cF0>, and flags in the upper 3 bytes. See </span><span class=cF4>
<a name="l20"></a></span><a href="/Wb/Kernel/KernelA.HH.HTML#l3481"><span class=cF4>Scan Code Flags</span></a><span class=cF0> and </span><a href="/Wb/Kernel/KernelA.HH.HTML#l3515"><span class=cF4>Scan Codes</span></a><span class=cF0>.
<a name="l21"></a>
<a name="l22"></a>TempleOS stores scan codes in 8 bytes.
<a name="l23"></a> </span><span class=cF2>Byte 0</span><span class=cF0> is the code. NumPad keys, SHIFT, ALT, CTRL and GUI keys combined.
<a name="l24"></a> </span><span class=cF2>Byte 1-3</span><span class=cF0> are </span><a href="/Wb/Kernel/KernelA.HH.HTML#l3464"><span class=cF4>flags</span></a><span class=cF0>
<a name="l25"></a>
<a name="l26"></a>The upper 4-bytes are copied from lower 4-bytes.
<a name="l27"></a> </span><span class=cF2>Byte 4</span><span class=cF0> is the code. Left, Right and NumPad keys distinct.
<a name="l28"></a> </span><span class=cF2>Byte 5-7</span><span class=cF0> are </span><a href="/Wb/Kernel/KernelA.HH.HTML#l3464"><span class=cF4>flags</span></a><span class=cF0>
<a name="l29"></a>
<a name="l30"></a>Run the program </span><a href="/Wb/Demo/MsgLoop.HC.HTML#l1"><span class=cF4>::/Demo/MsgLoop.HC</span></a><span class=cF0> to examine scan code. Press </span><span class=cF2>&lt;CTRL-SHIFT-l&gt;</span><span class=cF0>
<a name="l31"></a>and &quot;Insert ASCII/ScanCode&quot;.
<a name="l32"></a>
<a name="l33"></a>See </span><a href="/Wb/Doc/KeyAlloc.DD.HTML#l1"><span class=cF4>Key Allocations</span></a><span class=cF0> and </span><a href="/Wb/Kernel/KernelA.HH.HTML#l2958"><span class=cF4>CKbdStateGlbls</span></a><span class=cF0>.
<a name="l34"></a>
<a name="l35"></a>A </span><span class=cF2>String</span><span class=cF0> is a bunch of ASCII characters terminated with a zero.
</span></pre></body>
</html>