Changeset af9a7c5 in mainline for generic/src/console/kconsole.c


Ignore:
Timestamp:
2005-12-12T15:38:44Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
93b84b3
Parents:
c0b7f00
Message:

Small kconsole readline changes.
Some mips tweaks to allow for real keyboard support in indy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/kconsole.c

    rc0b7f00 raf9a7c5  
    239239        char *current = history[histposition];
    240240        int i;
     241        char mod; /* Command Modifier */
    241242        char c;
    242243
     
    310311                }
    311312                if (c == 0x1b) {
     313                        mod = _getc(input);
    312314                        c = _getc(input);
    313                         if (c!= 0x5b)
     315
     316                        if (mod != 0x5b && mod != 0x4f)
    314317                                continue;
    315                         c = _getc(input);
    316                         if (c == 0x44) { /* Left */
     318
     319                        if (c == 0x33 && _getc(input) == 0x7e) {
     320                                if (position == curlen)
     321                                        continue;
     322                                for (i=position+1; i<curlen;i++) {
     323                                        putchar(current[i]);
     324                                        current[i-1] = current[i];
     325                                }
     326                                putchar(' ');
     327                                rdln_print_c('\b',curlen-position);
     328                                curlen--;
     329                        }
     330                        else if (c == 0x48) { /* Home */
     331                                rdln_print_c('\b',position);
     332                                position = 0;
     333                        }
     334                        else if (c == 0x46) {
     335                                for (i=position;i<curlen;i++)
     336                                        putchar(current[i]);
     337                                position = curlen;
     338                        }
     339                        else if (c == 0x44) { /* Left */
    317340                                if (position > 0) {
    318341                                        putchar('\b');
     
    321344                                continue;
    322345                        }
    323                         if (c == 0x43) { /* Right */
     346                        else if (c == 0x43) { /* Right */
    324347                                if (position < curlen) {
    325348                                        putchar(current[position]);
     
    328351                                continue;
    329352                        }
    330                         if (c == 0x41 || c == 0x42) { /* Up,down */
     353                        else if (c == 0x41 || c == 0x42) {
     354                                /* Up,down */
    331355                                rdln_print_c('\b',position);
    332356                                rdln_print_c(' ',curlen);
Note: See TracChangeset for help on using the changeset viewer.