https://wiki.bennugd.org/index.php?title=Special:NewPages&feed=atom&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=&size-mode=max&size=0Bennu Wiki - New pages [en]2024-03-29T06:54:37ZFrom Bennu WikiMediaWiki 1.36.2https://wiki.bennugd.org/index.php?title=Shift_statusShift status2014-10-28T01:05:41Z<p>Kloppix: </p>
<hr />
<div>[[category:variables]]<br />
[[category:predefined]]<br />
[[category:global variables]]<br />
[[category:mod_key]]<br />
<br />
[[Global variables|'''Up to Global Variables''']]<br />
<br />
----<br />
<br />
== Definition ==<br />
'''INT''' shift_status<br />
<br />
Shift_status is defined in the module [[mod_key]] and indicates whether a modifier key is being pressed. If more than a modifier key is pressed at the same time shift_status will return the sum.<br />
<br />
== List ==<br />
{|<br />
| ''Key'' || - ''Value''<br />
|-<br />
| Right Control || - 20 * <br />
|-<br />
| Left Control || - 36<br />
|-<br />
| Right Alt || - 72 *<br />
|-<br />
| Left Alt || - 136<br />
|-<br />
| NUM LOCK || - 256<br />
|-<br />
| CAPS LOCK || - 512<br />
|-<br />
| Right Shift || - 1025<br />
|-<br />
| Left Shift || - 1026<br />
|}<br />
<br />
* At the time of the writing of this article, right alt and right control didn't return anything. It is unknown whether it is a bug or just deprecated.<br />
<br />
{{Globals}}</div>58.106.143.148https://wiki.bennugd.org/index.php?title=Scan_codeScan code2014-10-27T14:15:20Z<p>Kloppix: </p>
<hr />
<div>[[category:variables]]<br />
[[category:predefined]]<br />
[[category:global variables]]<br />
[[category:mod_key]]<br />
<br />
[[Global variables|'''Up to Global Variables''']]<br />
<br />
----<br />
<br />
== Definition ==<br />
'''INT''' scan_code<br />
<br />
Scan_code is defined in the module [[mod_key]] and, in contrast to [[ascii]], it contains the last key pressed, not the last character. That means “A” and “a” will have the same scan_code, but different [[ascii]] value.<br />
<br />
== Notes ==<br />
Take a look at the [[scancodes]] for a complete list.<br />
<br />
== Example ==<br />
<br />
<pre><br />
import "mod_text"<br />
import "mod_key"<br />
import "mod_video"<br />
<br />
process main()<br />
begin<br />
set_mode(640,320);<br />
<br />
write( 0, 60, 10, 0, "Use lower and upper case characters to see the difference");<br />
write( 0, 60, 20, 0, "between ascii and scan_code. (ESC to exit) ");<br />
<br />
write( 0, 60, 40, 0, "ascii: ");<br />
write_var( 0, 110, 40, 0, ascii);<br />
<br />
write( 0, 26, 50, 0, "scan_code: ");<br />
write_var( 0, 110, 50, 0, scan_code);<br />
<br />
while ( !key(_esc))<br />
frame;<br />
end<br />
end <br />
</pre><br />
<br />
{{Globals}}</div>58.106.143.148https://wiki.bennugd.org/index.php?title=AsciiAscii2014-10-27T14:11:41Z<p>Kloppix: Created page with "category:variables category:predefined category:global variables category:mod_key '''Up to Global Variables''' ---- == Definition == ''..."</p>
<hr />
<div>[[category:variables]]<br />
[[category:predefined]]<br />
[[category:global variables]]<br />
[[category:mod_key]]<br />
<br />
[[Global variables|'''Up to Global Variables''']]<br />
<br />
----<br />
<br />
== Definition ==<br />
'''INT''' ascii<br />
<br />
Ascii is defined in the module [[mod_key]] and, in contrast to [[scan_code]], it contains the <u>last character</u> typed on the keyboard instead of the <u>last key</u>. That means “A” and “a” will have the same [[scan_code]], but different ascii value.<br />
<br />
== Example ==<br />
<br />
<pre><br />
import "mod_text"<br />
import "mod_key"<br />
import "mod_video"<br />
<br />
process main()<br />
begin<br />
set_mode(640,320);<br />
<br />
write( 0, 60, 10, 0, "Use lower and upper case characters to see the difference");<br />
write( 0, 60, 20, 0, "between ascii and scan_code. (ESC to exit) ");<br />
<br />
write( 0, 60, 40, 0, "ascii: ");<br />
write_var( 0, 110, 40, 0, ascii);<br />
<br />
write( 0, 26, 50, 0, "scan_code: ");<br />
write_var( 0, 110, 50, 0, scan_code);<br />
<br />
while ( !key(_esc))<br />
frame;<br />
end<br />
end <br />
</pre><br />
<br />
{{Globals}}</div>58.106.143.148