diff options
author | David Walter Seikel | 2014-01-31 14:34:24 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-31 14:34:24 +1000 |
commit | ac31a15b825507b09f43302c20904137ec01c502 (patch) | |
tree | ede536d8f71e846044857e5a7c3b0a9ea27cbf2e | |
parent | Oops, left this bit out of the array null terminal removal. (diff) | |
download | opensim-SC_OLD-ac31a15b825507b09f43302c20904137ec01c502.zip opensim-SC_OLD-ac31a15b825507b09f43302c20904137ec01c502.tar.gz opensim-SC_OLD-ac31a15b825507b09f43302c20904137ec01c502.tar.bz2 opensim-SC_OLD-ac31a15b825507b09f43302c20904137ec01c502.tar.xz |
Make CSI docs more pretty.
-rw-r--r-- | handlekeys.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/handlekeys.c b/handlekeys.c index 3340a39..9ef3e76 100644 --- a/handlekeys.c +++ b/handlekeys.c | |||
@@ -319,18 +319,27 @@ void handle_keys(long extra, int (*handle_sequence)(long extra, char *sequence), | |||
319 | if (csi) | 319 | if (csi) |
320 | { | 320 | { |
321 | /* ECMA-048 section 5.2 defines this, and is unreadable. | 321 | /* ECMA-048 section 5.2 defines this, and is unreadable. |
322 | General CSI format - CSI [private] n1 ; n2 [extra] final | 322 | * General CSI format - CSI [private] n1 ; n2 [extra] final |
323 | private 0x3c to 0x3f "<=>?" if first byte is one of these, this is a private command, if it's one of the other n1 ones, it's not private. | 323 | * private 0x3c to 0x3f "<=>?" If first byte is one of these, |
324 | n1 0x30 to 0x3f "01234567890:;<=>?" ASCII digits forming a "number" | 324 | * this is a private command, if it's |
325 | 0x3a [:] used for floats, not expecting any. Could also be used as some other sort of inter digit separator. | 325 | * one of the other n1 ones, |
326 | 0x3b [;] separates the parameters | 326 | * it's not private. |
327 | extra 0x20 to 0x2f [ !"#$%&'()*+,-./] Can be multiple, likely isn't. | 327 | * n1 0x30 to 0x3f "01234567890:;<=>?" |
328 | final 0x40 to 0x7e "@A .. Z[\]^_`a .. z{|}~" it's private if 0x70 to 0x7e "p .. z{|}~" | 328 | * ASCII digits forming a "number" |
329 | Though the "private" ~ is used for key codes. | 329 | * 0x3a ":" Used for floats, not expecting any. |
330 | We also have SS3 "\x1BO" for other keys, but that's not a CSI. | 330 | * Could also be used as some other sort of |
331 | C0 controls, DEL (0x7f), or high characters are undefined. | 331 | * inter digit separator. |
332 | TODO So abort the current CSI and start from scratch. | 332 | * 0x3b [;] Separates the parameters. |
333 | */ | 333 | * extra 0x20 to 0x2f [ !"#$%&'()*+,-./] |
334 | * Can be multiple, likely isn't. | ||
335 | * final 0x40 to 0x7e "@A .. Z[\]^_`a .. z{|}~" | ||
336 | * It's private if 0x70 to 0x7e "p .. z{|}~" | ||
337 | * Though the "private" ~ is used for key codes. | ||
338 | * We also have SS3 "\x1BO" for other keys, | ||
339 | * but that's not a CSI. | ||
340 | * C0 controls, DEL (0x7f), or high characters are undefined. | ||
341 | * TODO - So abort the current CSI and start from scratch on one of those. | ||
342 | */ | ||
334 | 343 | ||
335 | if ('M' == buffer[1]) | 344 | if ('M' == buffer[1]) |
336 | { | 345 | { |