File tree Expand file tree Collapse file tree 1 file changed +35
-3
lines changed Expand file tree Collapse file tree 1 file changed +35
-3
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,6 @@ function keyboard(p5, fn){
224
224
* if (code === 'ArrowRight') {
225
225
* // …
226
226
* }
227
- * ```
228
227
* if (key === 'ArrowRight') {
229
228
* // …
230
229
* }
@@ -241,8 +240,41 @@ function keyboard(p5, fn){
241
240
* }
242
241
* ```
243
242
*
244
- *
245
- *
243
+ *
244
+ * <p>The table below summarizes how the main keyboard-related system variables changed between p5.js 1.x and 2.x.</p>
245
+ * <table>
246
+ * <thead>
247
+ * <tr>
248
+ * <th>Variable</th>
249
+ * <th>p5.js 1.x </th>
250
+ * <th>p5.js 2.x </th>
251
+ * </tr>
252
+ * </thead>
253
+ * <tbody>
254
+ * <tr>
255
+ * <td><code>key</code></td>
256
+ * <td>Text string (e.g., <code>"ArrowUp"</code>).</td>
257
+ * <td>Text string (e.g., <code>"ArrowUp"</code>, <code>"f"</code> or <code>"F"</code>).</td>
258
+ * </tr>
259
+ * <tr>
260
+ * <td><code>code</code></td>
261
+ * <td><em>Not supported.</em></td>
262
+ * <td>Text String (e.g., <code>"ArrowUp"</code>, <code>"KeyF"</code>).</td>
263
+ * </tr>
264
+ * <tr>
265
+ * <td><code>keyCode</code></td>
266
+ * <td>Number (e.g., <code>70</code>).</td>
267
+ * <td>Number (unchanged; e.g., <code>70</code>).</td>
268
+ * </tr>
269
+ * <tr>
270
+ * <td>System variables (<code>BACKSPACE</code>, <code>UP_ARROW</code>, …)</td>
271
+ * <td>Number</td>
272
+ * <td>Text String (e.g., <code>"ArrowUp"</code>).</td>
273
+ * </tr>
274
+ * </tbody>
275
+ * </table>
276
+ *
277
+ *
246
278
* @property {String } code
247
279
* @readOnly
248
280
*
You can’t perform that action at this time.
0 commit comments