aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/boxes/handlekeys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/boxes/handlekeys.c')
-rw-r--r--src/boxes/handlekeys.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/boxes/handlekeys.c b/src/boxes/handlekeys.c
index 8bae529..115b7c6 100644
--- a/src/boxes/handlekeys.c
+++ b/src/boxes/handlekeys.c
@@ -26,7 +26,7 @@ struct key
26// TODO - Add other miscelany that does not use an escape sequence. 26// TODO - Add other miscelany that does not use an escape sequence.
27 27
28// This is sorted by type, though there is some overlap. 28// This is sorted by type, though there is some overlap.
29// Human typing speeds wont need fast searching speeds on this small table. 29// Human typing speeds won't need fast searching speeds on this small table.
30// So simple wins out over speed, and sorting by terminal type wins 30// So simple wins out over speed, and sorting by terminal type wins
31// the simple test. 31// the simple test.
32static struct key keys[] = 32static struct key keys[] =
@@ -242,7 +242,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
242 strcat(sequence, "Esc"); 242 strcat(sequence, "Esc");
243 buffer[0] = buffIndex = 0; 243 buffer[0] = buffIndex = 0;
244 } 244 }
245 // TODO - Call some sort of timer tick callback. This wont be 245 // TODO - Call some sort of timer tick callback. This won't be
246 // a precise timed event, but don't think we need one. 246 // a precise timed event, but don't think we need one.
247 } 247 }
248 else if ((0 < p) && FD_ISSET(0, &selectFds)) 248 else if ((0 < p) && FD_ISSET(0, &selectFds))
@@ -292,8 +292,8 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
292 292
293 // Check for known key sequences. 293 // Check for known key sequences.
294 // For a real timeout checked Esc, buffer is now empty, so this for loop 294 // For a real timeout checked Esc, buffer is now empty, so this for loop
295 // wont find it anyway. While it's true we could avoid it by checking, 295 // won't find it anyway. While it's true we could avoid it by checking,
296 // the user already had to wait for a time out, and this loop wont take THAT long. 296 // the user already had to wait for a time out, and this loop won't take THAT long.
297 for (j = 0; j < ARRAY_LEN(keys); j++) 297 for (j = 0; j < ARRAY_LEN(keys); j++)
298 { 298 {
299 if (strcmp(keys[j].code, buffer) == 0) 299 if (strcmp(keys[j].code, buffer) == 0)
@@ -322,7 +322,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
322 * Next is a semi colon separated list of parameters (n1, n2, etc), which 322 * Next is a semi colon separated list of parameters (n1, n2, etc), which
323 * can be any characters from this set "01234567890:;<=>?". What the non 323 * can be any characters from this set "01234567890:;<=>?". What the non
324 * digit ones mean is up to the command. Parameters can be left out, but 324 * digit ones mean is up to the command. Parameters can be left out, but
325 * their defaults are command dependant. 325 * their defaults are command dependent.
326 * 326 *
327 * Next is an optional [extra] part from this set of characters 327 * Next is an optional [extra] part from this set of characters
328 * "!#$%&'()*+,-./", which includes double quotes. Can be many of these, 328 * "!#$%&'()*+,-./", which includes double quotes. Can be many of these,
@@ -361,7 +361,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
361 csFinal[0] = 0; 361 csFinal[0] = 0;
362 p = 0; 362 p = 0;
363 363
364 // Unspecified params default to a value that is command dependant. 364 // Unspecified params default to a value that is command dependent.
365 // However, they will never be negative, so we can use -1 to flag 365 // However, they will never be negative, so we can use -1 to flag
366 // a default value. 366 // a default value.
367 for (j = 0; j < ARRAY_LEN(csParams); j++) 367 for (j = 0; j < ARRAY_LEN(csParams); j++)
@@ -381,7 +381,7 @@ void handle_keys(long extra, int (*handle_event)(long extra, struct keyevent *ev
381 { 381 {
382 // So we know when we get to the end of parameter space. 382 // So we know when we get to the end of parameter space.
383 t = index("01234567890:;<=>?", buffer[j + 1]); 383 t = index("01234567890:;<=>?", buffer[j + 1]);
384 // See if we passed a paremeter. 384 // See if we passed a parameter.
385 if ((';' == buffer[j]) || (!t)) 385 if ((';' == buffer[j]) || (!t))
386 { 386 {
387 // Only stomp on the ; if it's really the ;. 387 // Only stomp on the ; if it's really the ;.