This file is indexed.

/usr/share/doc/sludge/SLUDGEDevKitHelp/onKeyboard.html is in sludge-doc 2.2.1-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<TITLE>onKeyboard</TITLE>
  <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<BODY>
<HR>
<div align="center"><img id="headerGraphic" src="images/sludge300.png" alt="SLUDGE"/></div>
<h2>onKeyboard</h2>
<HR>

<H3>Syntax:</H3>

<P>
<pre class="syntax">onKeyboard (<i>handlerFunction</i>);</pre>
</P>

<P>
<pre class="syntax">onKeyboard ();</pre>
</P>

<H3>Purpose:</H3>

<P>
Tells the computer which function to call when a button on the keyboard is pressed. The value of <i>handlerFunction</i> must be a pointer to a function which takes one parameter. When a keyboard button is pressed, the function specified in <i>handlerFunction</i> will be called with the key which was pressed passed as a string to the parameter.
</P>

<P>
If no parameter is given, the program stops calling the current keyboard handler function. No function will be called when the user presses a keyboard button until another call to onKeyboard tells the machine otherwise.
</P>

<P>
Note that only one handler for the keyboard can be used at any one time. A subsequent call to onKeyboard will replace the current handler function.
</P>

<P>
For normal characters, your keyboard handler will simply by passed the individual character as a string. For some special characters, however, the handler will be passed a longer string, the content of which specifies what key has been pressed:
</P>

<P>
<b>&quot;ENTER&quot;   </b>The player pressed either the enter or return key
</P>

<P>
<b>&quot;BACKSPACE&quot;   </b>The player pressed the backspace key
</P>

<P>
<b>&quot;ESCAPE&quot;   </b>The player pressed the escape key
</P>

<P>
<b>&quot;F1&quot; - &quot;F12&quot;   </b>The player pressed one of the function keys
</P>

<P>
<b>&quot;DELETE&quot;   </b>The player pressed the delete key
</P>

<P>
<b>&quot;INSERT&quot;   </b>The player pressed the insert key
</P>

<P>
<b>&quot;HOME&quot;   </b>The player pressed the home key
</P>

<P>
<b>&quot;END&quot;   </b>The player pressed the end key
</P>

<P>
<b>&quot;PAGE UP&quot;   </b>The player pressed the page up key
</P>

<P>
<b>&quot;PAGE DOWN&quot;   </b>The player pressed the page down key
</P>

<P>
<b>&quot;UP&quot;, &quot;DOWN&quot;, &quot;LEFT&quot;, &quot;RIGHT&quot;   </b>The player pressed one of the cursor keys
</P>

<P>
<b>&quot;ALT+A&quot; - &quot;ALT+Z&quot;   </b>The player held down Alt and pressed a letter
</P>

<P>
<b>&quot;ALT+F1&quot; - &quot;ALT+F12&quot;   </b>The player held down Alt and pressed a function key
</P>

<P>
Note that, at least on the machines on which SLUDGE has been tested so far, pressing F10 will generate an &quot;ALT+F10&quot; message, <b>not</b> an &quot;F10&quot; message as you'd reasonably expect. Also, it seems to be oblivious to users holding down Alt and hitting F6 for some reason. Go figure.
</P>

<P>
To capture a wider range of keypresses, use the <a href="captureAllKeys.html">captureAllKeys</a> command.
</P>

<H3>Return value:</H3>

<P>
No return value.
</P>

<H3>See also:</H3>

<P>
<a href="Passing_Functions_as_Variables.html">Passing Functions as Variables</a>
</P>

<P>
<a href="onFocusChange.html">onFocusChange</a>
</P>

<P>
<a href="onFocusChange.html">onFocusChange</a>
</P>

<P>
<a href="onLeftMouse.html">onLeftMouse</a>
</P>

<P>
<a href="onLeftMouseUp.html">onLeftMouseUp</a>
</P>

<P>
<a href="onMoveMouse.html">onMoveMouse</a>
</P>

<P>
<a href="onRightMouse.html">onRightMouse</a>
</P>

<P>
<a href="onRightMouseUp.html">onRightMouseUp</a>
</P>

<P class="copyright-notice">SLUDGE and this SLUDGE documentation are <A HREF="Copyright.html">copyright</A> Hungry Software and contributors 2000-2012
</P>

<HR>
</BODY>
</html>